OFFSET
0,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1).
FORMULA
G.f.: (-1-x+x^2-x^3+x^4)/(x-1)/(1+x+x^2+x^3+x^4). - R. J. Mathar, Nov 14 2007
a(0)=1, a(1)=1, a(2)=-1, a(3)=1, a(4)=-1, a(n)=a(n-5). - Harvey P. Dale, Jul 05 2013
a(n) = (1 - 4*(cos(4*(n-4)*Pi/5) + cos(2*(n-2)*Pi/5) + cos(4*(n-2)*Pi/5) + cos(2*(n+1)*Pi/5)))/5. - Wesley Ivan Hurt, Sep 27 2018
MATHEMATICA
PadRight[{}, 120, {1, 1, -1, 1, -1}] (* or *) LinearRecurrence[{0, 0, 0, 0, 1}, {1, 1, -1, 1, -1}, 120] (* Harvey P. Dale, Jul 05 2013 *)
PROG
(PARI) Vec((1+x-x^2+x^3-x^4)/(1-x)/(1+x+x^2+x^3+x^4)+O(x^99)) \\ Charles R Greathouse IV, Jun 13 2013
CROSSREFS
KEYWORD
sign,easy,less
AUTHOR
Paul Curtz, Aug 26 2007
STATUS
approved