Hi Iulian,
That’s certainly not what we’d expect from Gauss’ formula.
But it is true that for integer n ≤ 1:
In[]:=
{Sum[k,{k,n,1}],n<=1}
Out[]=
-
1
2
(-2+n)(1+n),n≤1
In fact the WL assumes n ≤ 1 from the summation definition:
In[]:=
Sum[k,{k,n,1}]
Out[]=
-
1
2
(-2+n)(1+n)
Now computing a few values, it is working correctly :
In[]:=
{{Sum[k,{k,1,1}],Sum[k,{k,0,0}],Sum[k,{k,-1,-1}],Sum[k,{k,-2,-2}],Sum[k,{k,-3,-3}]},Sum[k,{k,-3,1}]}
Out[]=
{{1,0,-1,-2,-3},-5}
However, W|A then ERRONEOUSLY evaluates the formula without the constraints, taking n to be a real number with no maximum.
Oops!!