#9635: symbolic sum gives wrong answer
--------------------------------+-------------------------------------------
Reporter: Henryk.Trappmann | Owner: AlexGhitza
Type: defect | Status: new
Priority: major | Milestone:
Component: basic arithmetic | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
--------------------------------+-------------------------------------------
{{{
sage: (n,k,j)=var('n,k,j')
sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j+1,n)
0
sage: (n,j)=(5,3)
sage: sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j) for k in range(j
+1,n+1))
1
}}}
The above sum should be 1 for n>=j and 0 otherwise.
From kcrisman:
This appears to be a bug in Maxima.
{{{
(%i1) load(simplify_sum);
<snip>
(%i3) simplify_sum(sum(binomial(n,k)*binomial(k-1,j)*(-1)**(k-1-j),k,j
+1,n));
(%o3) 0
(%i4) simplify_sum(sum(binomial(5,k)*binomial(k-1,3)*(-1)**(k-1-3),k,
4,5));
(%o4) 1
(%i5) 5*1*1+1*4*(-1);
(%o5) 1
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9635>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.