OFFSET
0,4
LINKS
Index entries for linear recurrences with constant coefficients, signature (4,-5,2,2).
FORMULA
G.f.: x^2 / ( (1 - 2*x - x^2) * (1 - 2*x + 2*x^2) ).
E.g.f.: exp(x)*(2*cosh(sqrt(2)*x) - 2*(cos(x)+sin(x)) + sqrt(2)*sinh(sqrt(2)*x))/6.
a(n) = 4*a(n-1) -5*a(n-2) +2*a(n-3) +2*a(n-4) for n >= 4.
From Thomas Scheuerle, Jun 03 2024: (Start)
a(n) = (-i*sqrt(2)*(1-i)^(n+1) + i*sqrt(2)*(1+i)^(n+1) - (1-sqrt(2))^(n+1) + (1+sqrt(2))^(n+1))/(6*sqrt(2)).
a(n) = 2^n*(hypergeom([1/2 - n/2, -n/2], [-n], -1) - hypergeom([1/2 - n/2, -n/2], [-n], 2))/3. (End)
MATHEMATICA
LinearRecurrence[{4, -5, 2, 2}, {0, 0, 1, 4}, 50] (* Paolo Xausa, Jun 19 2024 *)
PROG
(PARI) a(n) = ((([2, 1; 1, 0]^(n+1))[2, 1]) - (1+I)^(n-1) - (1-I)^(n-1))/3 \\ Thomas Scheuerle, Jun 03 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Jun 02 2024
STATUS
approved