OFFSET
0,2
COMMENTS
The same as A004444 except for first 3 terms. - Pietro Battiston, Jan 19 2008
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
From Colin Barker, Oct 06 2014: (Start)
a(n) = (3-(-1)^n-(1-i)*((-i)^n+i*i^n)+n) where i=sqrt(-1).
a(n) = a(n-1)+a(n-4)-a(n-5).
G.f.: -x*(x^3+x^2+x-7) / ((x-1)^2*(x+1)*(x^2+1)).
(End)
MATHEMATICA
LinearRecurrence[{1, 0, 0, 1, -1}, {0, 7, 6, 5, 4}, 80] (* Harvey P. Dale, May 10 2015 *)
PROG
(PARI) concat(0, Vec(-x*(x^3+x^2+x-7)/((x-1)^2*(x+1)*(x^2+1)) + O(x^100))) \\ Colin Barker, Oct 06 2014
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Joshua Zucker, Jun 21 2006
STATUS
approved