login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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
OFFSET
0,2
LINKS
Jean-Luc Baril, Sergey Kirgizov, José L. Ramírez, and Diego Villamizar, The Combinatorics of Motzkin Polyominoes, arXiv:2401.06228 [math.CO], 2024.
Taras Goy and Mark Shattuck, Determinant identities for the Catalan, Motzkin and Schröder numbers, Art Disc. Appl. Math., Vol. 7, No. 1 (2024).
FORMULA
From Paul Barry, Jan 20 2008: (Start)
Binomial transform of A117186.
G.f.: (1+x-sqrt(1-2x-3x^2))/(2x*(1-2x-3x^2)).
a(n) = (3^(n+1) + A002426(n+1))/2. (End)
From Vladimir Kruchinin, Aug 11 2010: (Start)
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 * 3/2 + O(3^n/sqrt(n)). - Charles R Greathouse IV, Dec 02 2015
From Peter Luschny, May 12 2016: (Start)
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):
seq(a(n), n=0..25); # Peter Luschny, May 12 2016
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)
-- Reinhard Zumkeller, Jan 22 2013
(PARI) a(n) = my(v=Vec((1+'x+'x^2)^n)); sum(k=1, n, v[k]);
CROSSREFS
T(2n+1, n), array T as in A055216.
Sequence in context: A192337 A106517 A363780 * A097472 A068094 A100058
KEYWORD
nonn
AUTHOR
Clark Kimberling, May 07 2000
EXTENSIONS
New description from Paul D. Hanna, Oct 09 2003
STATUS
approved