OFFSET
0,7
FORMULA
a(n)=4a(n-1)-2a(n-2)-5a(n-3)+2a(n-4)+a(n-5) (follows from the minimal polynomial of the matrix M).
G.f.:(2*x-1)*(x^2-3*x+1)/(-1+x^5+2*x^4-5*x^3-2*x^2+4*x). - Maksym Voznyy (voznyy(AT)mail.ru), Aug 11 2009
EXAMPLE
a(5)=0 because first row of M^5 is {6,-15,15,-10,4}.
MAPLE
with(linalg): M[1]:=matrix(5, 5, [0, -1, 0, 0, 0, -1, 1, -1, 0, 0, 0, -1, 1, -1, 0, 0, 0, -1, 1, -1, 0, 0, 0, -1, 1]): for n from 2 to 33 do M[n]:=multiply(M[1], M[n-1]) od: 1, seq(add(M[n][1, j], j=1..5), n=1..33);
a[0]:=1: a[1]:=-1: a[2]:=1: a[3]:=-1: a[4]:=1: for n from 5 to 33 do a[n]:=4*a[n-1]-2*a[n-2]-5*a[n-3]+2*a[n-4]+a[n-5] od: seq(a[n], n=0..33);
MATHEMATICA
M = {{0, -1, 0, 0, 0}, {-1, 1, -1, 0, 0}, {0, -1, 1, -1, 0}, {0, 0, -1, 1, -1}, {0, 0, 0, -1, 1}}; v[1] = {1, 1, 1, 1, 1}; v[n_] := v[n] = M.v[n - 1]; a1 = Table[v[n][[1]], {n, 1, 50}]
CROSSREFS
KEYWORD
sign
AUTHOR
Gary W. Adamson and Roger L. Bagula, Oct 24 2006
EXTENSIONS
Edited by N. J. A. Sloane, Nov 24 2006
STATUS
approved