OFFSET
0,2
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) = a(n-1) + 36*n - 30 (with a(0)=0). - Vincenzo Librandi, Dec 15 2010
From G. C. Greubel, Aug 29 2016: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>2.
G.f.: 6*x*(1 + 5*x)/(1 - x)^3.
E.g.f.: 6*x*(1 + 3*x)*exp(x). (End)
MAPLE
MATHEMATICA
s=0; lst={s}; Do[s+=n; AppendTo[lst, s], {n, 6, 8!, 36}]; lst (* Vladimir Joseph Stephan Orlovsky, Apr 03 2009 *)
Table[6*n*(3*n-2), {n, 0, 25}] (* or *) LinearRecurrence[{3, -3, 1}, {0, 6, 48}, 25] (* G. C. Greubel, Aug 29 2016 *)
6*PolygonalNumber[8, Range[0, 50]] (* Harvey P. Dale, Dec 17 2023 *)
PROG
(Magma) [6*n*(3*n-2): n in [0..60]]; // Wesley Ivan Hurt, Aug 29 2016
(PARI) a(n)=6*n*(3*n-2) \\ Charles R Greathouse IV, Aug 29 2016
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, Jan 19 2009
STATUS
approved