OFFSET
0,2
COMMENTS
Sequence found by reading the segment (0, 4) together with the line from 4, in the direction 4, 32, ..., in the square spiral whose vertices are the generalized octagonal numbers A001082. - Omar E. Pol, Jul 18 2012
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = 24*n + a(n-1) - 20 (with a(0)=0). - Vincenzo Librandi, Aug 03 2010
a(0)=0, a(1)=4, a(2)=32, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Jul 14 2011
G.f.: 4*(x + 5*x^2)/(1-x)^3. - Harvey P. Dale, Jul 14 2011
E.g.f.: 4*x*(1 + 3*x)*exp(x). - G. C. Greubel, Aug 29 2016
MATHEMATICA
s=0; lst={s}; Do[s+=n; AppendTo[lst, s], {n, 4, 7!, 24}]; lst (* Vladimir Joseph Stephan Orlovsky, Apr 02 2009 *)
Table[4n(3n-2), {n, 0, 40}] (* or *) LinearRecurrence[{3, -3, 1}, {0, 4, 32}, 41] (* Harvey P. Dale, Jul 14 2011 *)
4*PolygonalNumber[8, Range[0, 40]] (* Harvey P. Dale, Dec 04 2022 *)
PROG
(PARI) a(n) = 12*n^2 - 8*n; \\ Altug Alkan, Aug 29 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, Jan 19 2009
STATUS
approved