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) = 9*n^2 - 7*n = A051682(n)*2.
a(n) = a(n-1) + 18*n - 16 (with a(0)=0). - Vincenzo Librandi, Nov 27 2010
a(0)=0, a(1)=2, a(2)=22, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Nov 02 2011
From G. C. Greubel, Sep 01 2019: (Start)
G.f.: 2*x*(1+8*x)/(1-x)^3.
E.g.f.: x*(2+9*x)*exp(x). (End)
MAPLE
seq(n*(9*n-7), n=0..50); # G. C. Greubel, Sep 01 2019
MATHEMATICA
Table[n(9n-7), {n, 0, 40}] (* or *) LinearRecurrence[{3, -3, 1}, {0, 2, 22}, 40] (* Harvey P. Dale, Nov 02 2011 *)
2*PolygonalNumber[11, Range[0, 40]] (* Harvey P. Dale, May 31 2024 *)
PROG
(Magma) [n*(9*n-7): n in [0..50]];
(PARI) a(n)=n*(9*n-7) \\ Charles R Greathouse IV, Jun 17 2017
(Sage) [n*(9*n-7) for n in (0..50)] # G. C. Greubel, Sep 01 2019
(GAP) List([0..50], n-> n*(9*n-7)); # G. C. Greubel, Sep 01 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, Dec 22 2008
STATUS
approved