A182017 Row square-sums of triangle A182013.
1, 5, 29, 165, 1020, 6606, 44805, 314299, 2266834, 16714004, 125501364, 956725836, 7387322749, 57669478609, 454492588153, 3611698593169, 28911762536992, 232949503809562, 1887883708627582, 15380196764853214, 125893997550676627, 1034945699861044243
Offset: 0
Keywords
Programs
-
Mathematica
M[n_]:=If[n==0,1,Coefficient[(1+x+x^2)^(n+1),x^n]/(n+1)]; Table[Sum[Sum[M[i],{i,k,n}]^2,{k,0,n}],{n,0,40}]
-
Maxima
M(n):=coeff(expand((1+x+x^2)^(n+1)),x^n)/(n+1); makelist(sum(sum(M(i),i,k,n)^2,k,0,n),n,0,20);
Formula
a(n) = Sum_{k=0..n} (Sum_{i=k..n} M(i))^2, where the M(n)'s are the Motzkin numbers (A001006).