OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
FORMULA
G.f.: (1 + 5*x + 5*x^2 + 7*x^3) / ((1 - x)^3*(1 + x)).
From Colin Barker, Jan 25 2018: (Start)
a(n) = (9*n^2 + 2) / 2 for n even.
a(n) = (9*n^2 + 5) / 2 for n odd.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n>3. (End)
a(4*k+r) = 36*k*(2*k + r) + a(r) for r = 0..3. Example: if n=29 then k=7 and r=1, hence a(29) = 36*7*(2*7 + 1) + 7 = 3787. - Bruno Berselli, Jan 25 2018
PROG
(PARI) Vec((1 + 5*x + 5*x^2 + 7*x^3) / ((1 - x)^3*(1 + x)) + O(x^50)) \\ Colin Barker, Jan 25 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Jan 21 2018, corrected Jan 24 2018
STATUS
approved