OFFSET
0,2
COMMENTS
The old definition of this sequence was "Generalized polygonal numbers".
Column T(n,6) of A080853.
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) = C(6,0) + C(6,1)*n + C(6,2)*n^2.
G.f.: (C(5,0) + (C(7,2)-2)*x + C(5,2)*x^2)/(1-x)^3 = (1 + 19*x + 10*x^2)/(1-x)^3.
From Elmo R. Oliveira, Oct 20 2024: (Start)
E.g.f.: exp(x)*(1 + 21*x + 15*x^2).
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n > 2. (End)
MATHEMATICA
CoefficientList[Series[(1 + 19 x + 10 x^2) / (1 - x)^3, {x, 0, 40}], x] (* Vincenzo Librandi, Aug 05 2013 *)
LinearRecurrence[{3, -3, 1}, {1, 22, 73}, 40] (* Harvey P. Dale, Sep 28 2019 *)
PROG
(Magma) [15*n^2 + 6*n + 1 : n in [0..40]]; // Vincenzo Librandi, Aug 05 2013
(PARI) a(n)=15*n^2+6*n+1 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Feb 23 2003
EXTENSIONS
Definition replaced with the closed form by Bruno Berselli, Jan 16 2013
STATUS
approved