OFFSET
0,2
LINKS
B. Berselli, Table of n, a(n) for n = 0..10000.
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
FORMULA
G.f.: (1+10*x^2-4*x^3+x^4)/((1+x)*(1-x)^4); exp(-x)+(2/3)*exp(x)*x*(6+6*x+x^2).
a(n) = 3*a(n-1)-2*a(n-2)-2*a(n-3)+3*a(n-4)-a(n-5) for n>4.
a(n) = 4*A000292(n)+(-1)^n.
MATHEMATICA
LinearRecurrence[{3, -2, -2, 3, -1}, {1, 3, 17, 39, 81}, 40] (* Harvey P. Dale, Mar 04 2023 *)
PROG
(Magma) [(2/3)*n*(n+1)*(n+2)+(-1)^n: n in [0..35]];
(PARI) for(n=0, 35, print1((2/3)*n*(n+1)*(n+2)+(-1)^n", "));
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bruno Berselli, Jul 29 2010 - Sep 07 2010
STATUS
approved