A104969 Sum of squares of terms in rows of triangle A104967.
1, 2, 6, 12, 18, 36, 92, 184, 298, 596, 1444, 2888, 4852, 9704, 22840, 45680, 78490, 156980, 362580, 725160, 1265564, 2531128, 5767688, 11535376, 20366596, 40733192, 91866984, 183733968, 327351336, 654702672, 1464522864, 2929045728
Offset: 0
Keywords
Links
- G. C. Greubel, Table of n, a(n) for n = 0..500
Programs
-
Mathematica
A104967[n_, k_]:= A104967[n, k]= Sum[(-2)^j*Binomial[k+1, j]*Binomial[n-j, k], {j, 0, n-k}]; A104969[n_]:= A104969[n]= Sum[A104967[n, k]^2, {k,0,n}]; Table[A104969[n], {n, 0, 50}] (* G. C. Greubel, Jun 09 2021 *)
-
PARI
{a(n)=local(X=x+x*O(x^n)); sum(k=0,n,polcoeff(polcoeff((1-2*X)/(1-X-X*y*(1-2*X)),n,x),k,y)^2)}
-
Sage
@cached_function def A104967(n,k): return sum( (-2)^j*binomial(k+1,j)*binomial(n-j,k) for j in (0..n-k)) def A104969(n): return sum((A104967(n,k))^2 for k in (0..n)) [A104969(n) for n in (0..50)] # G. C. Greubel, Jun 09 2021