OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (4,0,-8,4).
FORMULA
a(n) = 4*a(n-1) - 8*a(n-3) + 4*a(n-4), a(0)=0, a(1)=1, a(2)=2, a(3)=10.
a(n) = ((2+sqrt(2))^n + (2-sqrt(2))^n - sqrt(2)^n - (-sqrt(2))^n)/4.
G.f.: x*(1-2*x+2*x^2)/((1-2*x^2)*(1-4*x+2*x^2)).
E.g.f.: exp(x)*sinh(x)*cosh(sqrt(2)*x).
MATHEMATICA
With[{nn=30}, CoefficientList[Series[Exp[x]Sinh[x]Cosh[Sqrt[2]x], {x, 0, nn}], x] Range[0, nn]!] (* or *) LinearRecurrence[{4, 0, -8, 4}, {0, 1, 2, 10}, 30] (* Harvey P. Dale, Jun 19 2016 *)
PROG
(PARI) x='x+O('x^30); concat([0], Vec(x*(1-2*x+2*x^2)/((1-2*x^2)*(1-4*x+2*x^2)))) \\ G. C. Greubel, Aug 16 2018
(Magma) m:=30; R<x>:=PowerSeriesRing(Integers(), m); Coefficients(R!(x*(1-2*x+2*x^2)/((1-2*x^2)*(1-4*x+2*x^2)))); // G. C. Greubel, Aug 16 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, May 16 2003
STATUS
approved