OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..2700
Richard Choulet, Curtz-like transformation.
Index entries for linear recurrences with constant coefficients, signature (3,-3,4,-2,1).
FORMULA
O.g.f.: (1-z)^2/((1-3*z+2*z^2-z^3)*(1+z^2)).
a(n) = 3*a(n-1) - 3*a(n-2) + 4*a(n-3) - 2*a(n-4) + a(n-5) for n >= 5, with a(0)=1, a(1)=1, a(2)=1, a(3)=4, a(4)=11.
MAPLE
a(0):=1: a(1):=1: a(2):=1: a(3):=4: a(4):=11: for n from 0 to 31 do a(n+5):=3*a(n+4)-3*a(n+3)+4*a(n+2)-2*a(n+1)+a(n): od: seq(a(i), i=0..31);
MATHEMATICA
LinearRecurrence[{3, -3, 4, -2, 1}, {1, 1, 1, 4, 11}, 50] (* G. C. Greubel, Jun 15 2018 *)
PROG
(PARI) x='x+O('x^50); Vec((1-x)^2/((1-3*x+2*x^2-x^3)*(1+x^2))) \\ G. C. Greubel, Jun 15 2018
(Magma) I:=[1, 1, 1, 4, 11]; [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 15 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Richard Choulet, Apr 11 2009
STATUS
approved