OFFSET
0,2
COMMENTS
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (6,-12,8).
FORMULA
Binomial transform of the pentagonal numbers (A000326 starting 1, 5, 12, 22, ...).
From Colin Barker, Aug 12 2012: (Start)
a(n) = 6*a(n-1) - 12*a(n-2) + 8*a(n-3).
G.f.: (1+x)*(1-x)/(1-2*x)^3. (End)
E.g.f.: (1/2)*(2 + 8*x + 3*x^2)*exp(2*x). - G. C. Greubel, Oct 03 2022
EXAMPLE
a(3) = 23 = (1, 2, 1) dot (1, 5, 12) = (1 + 10 + 12).
MATHEMATICA
Table[2^n(3n^2+13n+8)/8, {n, 0, 30}] (* or *) LinearRecurrence[{6, -12, 8}, {1, 6, 23}, 30] (* Harvey P. Dale, May 22 2021 *)
PROG
(Magma) [2^(n-3)*(3*n^2+13*n+8): n in [0..30]]; // G. C. Greubel, Oct 03 2022
(SageMath) [2^(n-3)*(3*n^2+13*n+8) for n in range(31)] # G. C. Greubel, Oct 03 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson, Jan 03 2008
EXTENSIONS
More terms from Carl Najafi, Sep 08 2011
STATUS
approved