OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = (21n^2 - 15n)/2 = A001106(n)*3.
a(n) = a(n-1)+21*n-18 with n>0, a(0)=0. - Vincenzo Librandi, Nov 26 2010
G.f.: 3*x*(1+6*x)/(1-x)^3. - Bruno Berselli, Jan 21 2011
a(n) = n + A226491(n). - Bruno Berselli, Jun 11 2013
MATHEMATICA
s=0; lst={s}; Do[s+=n; AppendTo[lst, s], {n, 3, 6!, 21}]; lst (* Vladimir Joseph Stephan Orlovsky, Apr 02 2009 *)
CoefficientList[Series[3 x (1 + 6 x) / (1 - x)^3, {x, 0, 60}], x] (* Vincenzo Librandi, Jun 05 2013 *)
LinearRecurrence[{3, -3, 1}, {0, 3, 27}, 40] (* Harvey P. Dale, May 26 2015 *)
PROG
(PARI) a(n)=3*n*(7*n-5)/2 \\ Charles R Greathouse IV, Sep 24 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Dec 14 2008
STATUS
approved