OFFSET
0,2
LINKS
Ivan Panchenko, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
G.f.: 9*x*(1+2*x)/(1-x)^3. - Colin Barker, Feb 21 2012
a(0)=0, a(1)=9, a(2)=45, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Jan 14 2016
E.g.f.: 9*x*(2 + 3*x)*exp(x)/2. - G. C. Greubel, Sep 01 2019
MAPLE
seq(9*n*(3*n-1)/2, n=0..40); # G. C. Greubel, Sep 01 2019
MATHEMATICA
Table[9n(3n-1)/2, {n, 0, 40}] (* or *) LinearRecurrence[{3, -3, 1}, {0, 9, 45}, 40] (* Harvey P. Dale, Jan 14 2016 *)
PROG
(Magma) [9*n*(3*n-1)/2: n in [0..50]];
(PARI) a(n)=9*n*(3*n-1)/2 \\ Charles R Greathouse IV, Jun 17 2017
(Sage) [9*n*(3*n-1)/2 for n in (0..40)] # G. C. Greubel, Sep 01 2019
(GAP) List([0..40], n-> 9*n*(3*n-1)/2); # G. C. Greubel, Sep 01 2019
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, Dec 22 2008
STATUS
approved