OFFSET
1,2
COMMENTS
Equals binomial transform of [1, 1, 3, 1, 0, 0, 0, ...]. - Gary W. Adamson, Aug 25 2010
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..5000
FORMULA
a(n) = (6 + n(-1 + n(6 + n)))/6 = C(n+1, 3) + n^2 + 1 = C(n+2, 3) + C(n, 2) + 1.
G.f.: (1 - 2*x + 4*x^2 - 2*x^3)/(1 - x)^4. - Robert G. Wilson v, Sep 11 2006
MATHEMATICA
a[n_] := (6 + n(-1 + n(6 + n)))/6; Table[a[n], {n, 0, 45}] (* or *)
a[0] = 1; a[1] = 2; a[n_] := a[n] = 2a[n - 1] - a[n - 2] + n + 1; Table[ a[n], {n, 0, 45}] (* or *)
CoefficientList[ Series[(1 - 2x + 4x^2 - 2x^3)/(x - 1)^4, {x, 0, 45}], x] (* Robert G. Wilson v, Sep 11 2006 *)
PROG
(PARI) x='x+O('x^50); Vec((1-2*x+4*x^2-2*x^3)/(1-x)^4) \\ G. C. Greubel, Sep 13 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula, Sep 04 2006
EXTENSIONS
Edited and extended by Robert G. Wilson v, Sep 11 2006
STATUS
approved