OFFSET
0,5
COMMENTS
Second differences give -a(n-2).
REFERENCES
Charles Gely, "Lapins imaginaires et valeurs propres". Quadrature Quarterly #30.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-1,0,-1).
FORMULA
a(n) = 2*a(n-1) - a(n-2) - a(n-4).
G.f.: (1-x)*(1-2*x)/(1-2*x+x^2+x^4).
a(n) = Im( -i*J(n, -i) + J(n-1, -i) ), where J(n,x) is the Jacobsthal polynomial, whose coefficient array is A128099, and i = sqrt(-1). - G. C. Greubel, Jun 15 2019
MATHEMATICA
CoefficientList[Series[(2*x-1)*(x-1)/(x^4+x^2-2*x+1), {x, 0, 50}], x] (* Vincenzo Librandi, Oct 23 2012 *)
PROG
(Magma) I:=[1, -1, -1, -1]; [n le 4 select I[n] else 2*Self(n-1) - Self(n-2) - Self(n-4): n in [1..50]]; // Vincenzo Librandi, Oct 23 2012
(PARI) my(x='x+O('x^50)); Vec((1-x)*(1-2*x)/(1-2*x+x^2+x^4)) \\ G. C. Greubel, Jun 13 2019
(Sage) ((1-x)*(1-2*x)/(1-2*x+x^2+x^4)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 13 2019
(GAP) a:=[1, -1, -1, -1];; for n in [5..50] do a[n]:=2*a[n-1]-a[n-2]-a[n-4]; od; a; # G. C. Greubel, Jun 13 2019
CROSSREFS
KEYWORD
sign,easy
AUTHOR
STATUS
approved