5
$\begingroup$

Bug introduced in 9.0 or earlier and persisting through 11.0.1 or later


To evaluate $ \sum_{\substack{\text{even }k\\ 2\leq k\leq m-2}} \binom{m-2}{k-1}(k-1) $, where $m$ is an even integer.

Running the following in Mathematica 10.3.0 (October 9, 2015)

Simplify[Sum[Binomial[m - 2, k - 1] (k - 1), {k, 2, m-2, 2}], m/2 \[Element] Integers && m > 10]

gives

0

which is obviously wrong. It may not have a closed form but it shouldn't return 0.

$\endgroup$
5
  • $\begingroup$ Seems like a bug Is that your question? $\endgroup$ Commented Feb 8, 2016 at 22:26
  • $\begingroup$ @Dr.belisarius Yes $\endgroup$
    – user58955
    Commented Feb 8, 2016 at 23:11
  • $\begingroup$ Note that the Simplify is irrelevant. This sort of problem has been noted before. Example: mathematica.stackexchange.com/questions/78945/… $\endgroup$
    – Michael E2
    Commented Feb 9, 2016 at 1:26
  • $\begingroup$ In my original answer I had made a mistake in the conversion between Binomail and Factorial. With the correction Sum[ (m - 2)!/((k - 2)! (m - k - 1)!), {k, 2, m - 2, 2}, Assumptions -> m/2 \[Element] Integers && m > 10] also returns 0 which is wrong. It appears that there is indeed a bug here. I have removed the original answer. $\endgroup$ Commented Feb 9, 2016 at 8:14
  • $\begingroup$ Bug still exists in 10.4 $\endgroup$
    – user58955
    Commented Mar 26, 2016 at 4:06

3 Answers 3

6
$\begingroup$

This is a bug in Sum.

In addition to the nice workarounds proposed by others, the substitution $m = 2p$ also leads to a correct answer for this example.

In[1]:= Sum[
   Binomial[2 p - 2, k - 1] (k - 1), {k, 2, 2 p - 2, 2}] /. {p -> 
    m/2} // Simplify


Out[1]= 2^(-4 + m) (-2 + m)

Sorry for the inconvenience caused by this problem.

$\endgroup$
3
$\begingroup$

I would suggest defining your sum as a function

f[m_?NumericQ] := Sum[Binomial[m - 2, k - 1] (k - 1), {k, 2, m, 2}] /; EvenQ[m];

This evaluates fine and does not give zero when given numeric values.

The root of the problem seems to me to have to do with the definition of Binomial internaly as a combination of Gamma functions.

"In general,Binomial[n,m] is defined by [CapitalGamma] (n+1)/([CapitalGamma](m+1)[CapitalGamma](n-m+1)) or suitable limits of this."

As evidence, the expression

Sum[Binomial[m - 2, k - 1] (k - 1), {k, 2, m, 2}]

Evaluates to zero.

$\endgroup$
3
$\begingroup$

As a workaround for this incorrect simplification, you could use FindSequenceFunction on a sample of concrete results:

Clear[m,n,k];
Simplify[FindSequenceFunction[
   Table[
    Sum[Binomial[m - 2, k - 1] (k - 1), {k, 2, m, 2}], {m, 2, 12, 2}],
    n] /. n -> m/2]

(* ==> 2^(-4 + m) (-2 + m) *)

This is similar to the answer by @Coolwater here.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.