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,-1,1,-2,1).
FORMULA
From Colin Barker, Mar 26 2018: (Start)
G.f.: (1 + x)^4 / ((1 - x)^3*(1 + x + x^2)).
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5) for n>4. (End)
From G. C. Greubel, May 27 2020: (Start)
a(n) = (ChebyshevU(n, -1/2) - ChebyshevU(n-1, -1/2) + 8*(3*n*(n+1) +1))/9.
MAPLE
A301696:= n-> (8*(3*n*(n+1) +1) + `mod`(n+2, 3) - `mod`(n+1, 3))/9;
seq(A301696(n), n=0..60); # G. C. Greubel, May 27 2020
MATHEMATICA
Table[(Mod[n+2, 3] - Mod[n+1, 3] + 8*(3*n*(n+1) +1))/9, {n, 0, 60}] (* G. C. Greubel, May 27 2020 *)
PROG
(PARI) Vec((1 + x)^4 / ((1 - x)^3*(1 + x + x^2)) + O(x^60)) \\ Colin Barker, Mar 26 2018
(Sage) [(24*n*(n+1)+8 + (n+2)%3 - (n+1)%3 )/9 for n in (0..60)] # G. C. Greubel, May 27 2020
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Mar 25 2018
STATUS
approved