OFFSET
0,4
COMMENTS
Imaginary part of the sequence of complex numbers defined by c(0) = 1, c(1) = 1, for n>1 c(n) = c(n-1) + i*c(n-2). - Gerald McGarvey, Apr 24 2005
a(n) = sqrt(3)*y where (x,y,y,y) is the quaternion b(n) of the sequence b of quaternions defined by b(0)=1,b(1)=1, b(n) = b(n-1) + b(n-2)*(0,s,s,s) where s = 1/sqrt(3). - Gerald McGarvey, Apr 25 2005
For n>=1, a(n) is equal to -1 times the imaginary part of the determinant of the n X n matrix with the sqrt(i)'s along the superdiagonal and the subdiagonal (i is the imaginary unit), 1's along the main diagonal, and 0's everywhere else (see Mathematica code below). - John M. Campbell, Jun 04 2011
LINKS
G. C. Greubel, 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) = Sum_{k=0..floor((n+2)/2)} binomial(n-k+2, k)*sin(Pi*k/2). - Paul Barry, Apr 25 2005
G.f.: x^2/(1 - 2*x + x^2 + x^4). - R. J. Mathar, Oct 22 2008
MATHEMATICA
Table[-Im[Det[Array[KroneckerDelta[#1 + 1, #2]*Sqrt[I] &, {n, n}] + Array[KroneckerDelta[#1 - 1, #2]*Sqrt[I] &, {n, n}] + IdentityMatrix[n]]], {n, 1, 40}] (* John M. Campbell, Jun 04 2011 *)
LinearRecurrence[{2, -1, 0, -1}, {0, 0, 1, 2}, 40] (* G. C. Greubel, Jun 12 2019 *)
PROG
(PARI) my(x='x+O('x^40)); concat([0, 0], Vec(x^2/(1-2*x+x^2+x^4))) \\ G. C. Greubel, Jun 12 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); [0, 0] cat Coefficients(R!( x^2/(1-2*x+x^2+x^4) )); // G. C. Greubel, Jun 12 2019
(Sage) (x^2/(1-2*x+x^2+x^4)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jun 12 2019
(GAP) a:=[0, 0, 1, 2];; for n in [5..40] do a[n]:=2*a[n-1]-a[n-2]-a[n-4]; od; a; # G. C. Greubel, Jun 12 2019
CROSSREFS
KEYWORD
sign
AUTHOR
STATUS
approved