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) = (27*n^2 - 21*n)/2 = A051682(n)*3.
a(n) = 27*n + a(n-1) - 24, with n>0, a(0)=0. - Vincenzo Librandi, Aug 03 2010
G.f.: 3*x*(1 + 8*x)/(1-x)^3. - Bruno Berselli, Jan 21 2011
From G. C. Greubel, Aug 28 2016: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
E.g.f.: (3/2)*x*(2 + 9*x)*exp(x). (End)
MATHEMATICA
s=0; lst={s}; Do[s+=n; AppendTo[lst, s], {n, 3, 6!, 27}]; lst (* Vladimir Joseph Stephan Orlovsky, Apr 02 2009 *)
Table[3*n*(9*n-7)/2, {n, 0, 25}] (* or *) LinearRecurrence[{3, -3, 1}, {0, 3, 33}, 25] (* G. C. Greubel, Aug 28 2016 *)
PROG
(PARI) a(n)=3*n*(9*n-7)/2 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, Jan 02 2009
STATUS
approved