OFFSET
0,2
COMMENTS
Binomial transform of 1+n*(n+1)/2, A000124.
Number of 123-avoiding ternary words of length n-1.
Row sums of triangle A134247. Also double binomial transform of (1, 1, 1, 0, 0, 0, ...). - Gary W. Adamson, Oct 15 2007
Equals row sums of triangle A144333. - Gary W. Adamson, Sep 18 2008
From Enrique Navarrete, Nov 22 2025: (Start)
Partial sums of A190050.
Number of ternary strings of length n with at most two 0's. (End)
LINKS
Petter Brändén and Toufik Mansour, Finite automata and pattern avoidance in words, arXiv:math/0309269 [math.CO], 2003.
Ratko Tosic, Dragan Masulovic, Ivan Stojmenovic, Jon Brunvoll, Bjorg N. Cyvin, and Sven J. Cyvin, Enumeration of polyhex hydrocarbons to h = 17, J. Chem. Inf. Comput. Sci., 1995, 35, 181-187, Table 1, with an error at h=16.
Index entries for linear recurrences with constant coefficients, signature (6,-12,8).
FORMULA
From Paul Barry, Jul 22 2004: (Start)
G.f.: (1-3*x+3*x^2)/(1-2*x)^3;
a(n) = 2^(n-3)*(n^2+3*n+8). (End)
From Paul Barry, Mar 27 2007: (Start)
E.g.f.: exp(2*x)*(1+x+x^2/2);
a(n) = Sum_{k=0..2} binomial(n,k)*2^(n-k). (End)
From Enrique Navarrete, Nov 22 2025: (Start)
a(n) = 6*a(n-1) - 12*a(n-2) + 8*a(n-3).
a(n) = 3^n - A345954(n). (End)
MAPLE
MATHEMATICA
Table[Sum[Binomial[m-1, k](#^2/2 -#/2 +1 &)[k+1], {k, 0, m}], {m, 36}]
LinearRecurrence[{6, -12, 8}, {1, 3, 9}, 30] (* Harvey P. Dale, May 15 2019 *)
PROG
(PARI) a(n)=2^(n-3)*(n^2+3*n+8); \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Michael A. Childers (childers_moof(AT)yahoo.com), Jul 27 2002
EXTENSIONS
Corrected and extended by Wouter Meeussen, Jul 30 2002
Title and offset corrected by R. J. Mathar, May 21 2018
New name using explicit formula by Joerg Arndt, May 21 2018
STATUS
approved
