Question: print a summation of binomial coefficients

 

Hi, I want to print     t[n] / (-1)^n * sum   as following, but I don't know where the error is. Please help me.

Thank you very much.



``

help("sum")

 

(-1)^n*(sum(binom(n, j)^2*binom(2*j, j)*binom(2*n-2*j, n-j), j = 0 .. n));

 

(-1)^n*(sum(binom(n, j)^2*binom(2*j, j)*binom(2*n-2*j, n-j), j = 0 .. n))

(1)

 

a := 10:

 

t := array(-2 .. 100):

 

for n from 0 to 10 do print(n, t[n]); t[n+1] := ((2*n+1)*(a*n^2+a*n+b)*t[n]+n*(c*n^2+d)*t[n-1]+e*n*(n-1)*(2*n-1)*t[n-2])/(n+1)^3 end do:

 

0, 1

1, 4

2, 28

3, 268

4, 3004

5, 36784

6, 476476

7, 6418192

8, 88986172

9, 1261473136

10, 18200713168

(2)

 

for n from 0 to 10 do print(n, t[n]/((-1)^n*(sum(binom(n, j)^2*binom(2*j, j)*binom(2*n-2*j, n-j), j = 0 .. n)))) end do:

 

Error, (in sum) summation variable previously assigned, second argument evaluates to 0 = 0 .. 0

 

``

 

``



Download calculation.mw

Please Wait...