|
|
A055217
|
|
a(n) = sum of the first n coefficients of (1+x+x^2)^n.
|
|
5
|
|
|
1, 3, 10, 31, 96, 294, 897, 2727, 8272, 25048, 75747, 228826, 690691, 2083371, 6280650, 18925047, 57002616, 171633840, 516632307, 1554702516, 4677501237, 14069962041, 42314975352, 127240600050, 382555886571, 1150026301089
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
G.f.: (1+x-sqrt(1-2x-3x^2))/(2x*(1-2x-3x^2)).
a(n) = (3^(n+1) + A002426(n+1))/2. (End)
Logarithm g.f.: log(1/(1-M(x)) = Sum_{n>0} a(n)/n*x^n, M(x) - o.g.f Motzkin numbers (A001006).
a(n) = sum(sum(binomial(n,j)*binomial(j,2*j-n-k),j,ceiling((n+k)/2),n),k,1,n), n>0. (End)
Conjecture: (n+1)*a(n) -(5*n+1)*a(n-1) +3*(n-1)*a(n-2) +9*(n-1)*a(n-3)=0. - R. J. Mathar, Nov 14 2011
a(n) = (3^(n+1) - hypergeom([-(n+1)/2, -n/2], [1], 4))/2.
a(n) = (3^(n+1) - GegenbauerC(n+1,-n-1,-1/2))/2. (End)
|
|
MAPLE
|
a := n -> simplify((3^(n+1) - GegenbauerC(n+1, -n-1, -1/2))/2):
|
|
MATHEMATICA
|
Total/@Table[Take[CoefficientList[Expand[(1+x+x^2)^n], x], n], {n, 30}] (* Harvey P. Dale, Aug 14 2011 *)
|
|
PROG
|
(Maxima) a(n):=sum(sum(binomial(n, j)*binomial(j, 2*j-n-k), j, ceiling((n+k)/2), n), k, 1, n); \\ Vladimir Kruchinin, Aug 11 2010
(Haskell)
a055217 n = sum $ take (n + 1) $ a027907_row (n + 1)
(PARI) a(n) = my(v=Vec((1+'x+'x^2)^n)); sum(k=1, n, v[k]);
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|