OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n) = n + A051871(n).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: x*(2+15*x)/(1-x)^3. - R. J. Mathar, Aug 29 2010
E.g.f.: x *(4 + 17*x)*exp(x)/2. - G. C. Greubel, Aug 30 2019
MAPLE
seq(n*(17*n-13)/2, n=0..40); # G. C. Greubel, Aug 30 2019
MATHEMATICA
Table[(n(17n-13))/2, {n, 0, 50}] (* or *) LinearRecurrence[{3, -3, 1}, {0, 2, 21}, 50] (* Harvey P. Dale, Sep 14 2011 *)
PROG
(PARI) a(n)=1/2*(17*n^2 - 13*n);
(Magma) [n*(17*n-13)/2:n in [0..40]]; // Vincenzo Librandi, Sep 15 2011
(Sage) [n*(17*n-13)/2 for n in (0..40)] # G. C. Greubel, Aug 30 2019
(GAP) List([0..40], n-> n*(17*n-13)/2); # G. C. Greubel, Aug 30 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Graziano Aglietti (mg5055(AT)mclink.it), Aug 18 2010
EXTENSIONS
More terms from R. J. Mathar, Aug 29 2010
STATUS
approved