OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-2,-2,3,-1).
FORMULA
a(n) = 3*a(n-1) -2*a(n-2) -2*a(n-3) +3*a(n-4) -a(n-5).
G.f.: (x^2+4*x+1)*(x^2+6*x+1)/((1+x)*(x-1)^4).
MAPLE
MATHEMATICA
CoefficientList[Series[(x^2 + 4*x + 1)*(x^2 + 6*x + 1)/((1 + x)*(x - 1)^4), {x, 0, 40}], x] (* Vincenzo Librandi, Dec 19 2012 *)
PROG
(Magma) I:=[1, 13, 63, 171, 365]; [n le 5 select I[n] else 3*Self(n-1) - 2*Self(n-2) - 2*Self(n-3) + 3*Self(n-4) - Self(n-5): n in [1..40]]; // Vincenzo Librandi, Dec 19 2012
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
R. J. Mathar, Feb 13 2010
STATUS
approved