MathGroup Archive 2007

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: binomial sum bug

  • To: mathgroup at smc.vnet.net
  • Subject: [mg82594] Re: binomial sum bug
  • From: Jean-Marc Gulliet <jeanmarc.gulliet at gmail.com>
  • Date: Fri, 26 Oct 2007 05:11:06 -0400 (EDT)
  • Organization: The Open University, Milton Keynes, UK
  • References: <ffpq7m$lf7$1@smc.vnet.net>

Jack Kennedy wrote:

> In:  Sum[Binomial[5,2k],{k,0,5}]
> Out: 16
> 
> In:  Sum[Binomial[n,2k],{k,0,n}] /. n->5
> Out:  -16
> 
> What the?
> 
> This has been addressed before 
> about a year ago and a work around was posted
> but I have two questions:
> 
> 1. Was it declared a bug by Wolfrram, and
> 2. In general does Wolfram issue bug fixes, and specifically is there
> a patch for this problem?
> 
> $Version = 5.1 for Microsoft Windows (October 25, 2004)

Apparently, this bug has not been fixed in version 5.2. Version 6.0.1 
works as expected, however.

In[1]:= Sum[Binomial[5, 2 k], {k, 0, 5}]

Out[1]= 16

In[2]:= Sum[Binomial[n, 2 k], {k, 0, n}] /. n -> 5

Out[2]= 16

In[3]:= $Version

Out[3]= "6.0 for Microsoft Windows (32-bit) (June 19, 2007)"

(* Version 5.2 *)
In[1]:=
Sum[Binomial[5,2k],{k,0,5}]

Out[1]=
16

In[2]:=
Sum[Binomial[n,2k],{k,0,n}]/.n\[Rule]5

Out[2]=
-16

In[3]:=
$Version

Out[3]=
5.2 for Microsoft Windows (June 20, 2005)

Regards,
-- 
Jean-Marc


  • Prev by Date: Re: Selecting Rows Where All Columns Satisfy a Condition
  • Next by Date: Re: eigenvectors is taking lot of time
  • Previous by thread: Re: binomial sum bug
  • Next by thread: Re: binomial sum bug