Question: Bug report - tested versions 14 and 15

I found following bug:

p := proc (k) sum((-1)^n*n/(factorial(k-n)*factorial(n)), n = 1 .. k) end proc; 
sum(p(k), k = 1 .. 1); 
sum(p(1), k = 1 .. 1); 
p(1)

Results must be same, but output is 0 (bug!), -1 (correct), -1 (correct)

 

Please Wait...