OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
R. Choulet, Curtz-like transformation
Index entries for linear recurrences with constant coefficients, signature (3,-3,4,-2,1).
FORMULA
O.g.f.: -(2-2*x+3*x^2+x^4)/((x^2+1)*(x^3-2*x^2+3*x-1)).
for n>=0 a(n+5)=3*a(n+4)-3*a(n+3)+4*a(n+2)-2*a(n+1)+a(n)
MATHEMATICA
Join[{2, 4, 9, 23, 55, 126}, LinearRecurrence[{3, -3, 4, -2, 1}, {291, 678, 1578, 3667, 8523}, 45]] (* G. C. Greubel, Jun 25 2018 *)
PROG
(PARI) x='x+O('x^50); Vec(-(2-2*x+3*x^2+x^4)/((x^2+1)*(x^3-2*x^2+3*x-1))) \\ G. C. Greubel, Jun 25 2018
(Magma) I:=[291, 678, 1578, 3667, 8523]; [2, 4, 9, 23, 55, 126] cat [n le 5 select I[n] else 3*Self(n-1) - 3*Self(n-2) + 4*Self(n-3) -2*Self(n-4) +Self(n-5): n in [1..50]]; // G. C. Greubel, Jun 25 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Richard Choulet, Apr 10 2009
STATUS
approved