login
a(n) = 2^(n-3)*(n^2+3*n+8).
7

%I #35 Feb 06 2022 21:16:43

%S 1,3,9,26,72,192,496,1248,3072,7424,17664,41472,96256,221184,503808,

%T 1138688,2555904,5701632,12648448,27918336,61341696,134217728,

%U 292552704,635437056,1375731712,2969567232,6392119296,13723762688

%N a(n) = 2^(n-3)*(n^2+3*n+8).

%C Binomial transform of 1+n*(n+1)/2, A000124.

%C Number of 123-avoiding ternary words of length n-1.

%C Row sums of triangle A134247. Also double binomial transform of (1, 1, 1, 0, 0, 0, ...). - _Gary W. Adamson_, Oct 15 2007

%C Equals row sums of triangle A144333. - _Gary W. Adamson_, Sep 18 2008

%H P. Braendeen and T. Mansour, <a href="http://arXiv.org/abs/math.CO/0309269">Finite automata and pattern avoidance in words</a>

%H Tosic R., Masulovic D., Stojmenovic I., Brunvoll J., Cyvin B. N. and Cyvin S. J., <a href="http://dx.doi.org/10.1021/ci00024a002">Enumeration of polyhex hydrocarbons to h = 17</a>, J. Chem. Inf. Comput. Sci., 1995, 35, 181-187, Table 1, with an error at h=16.

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (6,-12,8).

%F From _Paul Barry_, Jul 22 2004: (Start)

%F G.f.: (1-3x+3x^2)/(1-2x)^3;

%F a(n) = 2^(n-3)*(n^2+3n+8). (End)

%F From _Paul Barry_, Mar 27 2007: (Start)

%F E.g.f.: e^(2*x)*(1+x+x^2/2);

%F a(n) = Sum_{k=0..2} binomial(n,k)*2^(n-k). (End)

%F a(n-1) + A001788(n-2) = A104270(n). - _R. J. Mathar_, May 21 2018

%p A072863 := proc(n)

%p 2^(n-3)*(n^2+3*n+8) ;

%p end proc: # _R. J. Mathar_, May 21 2018

%t Table[Sum[Binomial[m-1, k](#^2/2 -#/2 +1 &)[k+1], {k, 0, m}], {m, 36}]

%t LinearRecurrence[{6,-12,8},{1,3,9},30] (* _Harvey P. Dale_, May 15 2019 *)

%o (PARI) a(n)=2^(n-3)*(n^2+3*n+8); \\ _Charles R Greathouse IV_, Oct 07 2015

%Y Cf. A134247, A000124, A144333.

%K nonn,easy

%O 0,2

%A Michael A. Childers (childers_moof(AT)yahoo.com), Jul 27 2002

%E Corrected and extended by _Wouter Meeussen_, Jul 30 2002

%E Title and offset corrected. - _R. J. Mathar_, May 21 2018

%E New name using explicit formula. - _Joerg Arndt_, May 21 2018