OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,1).
FORMULA
a(n) == 5*a(n-1) mod 11.
From Richard Choulet, Jan 02 2008: (Start)
a(n) = (11/5) - ((3+2*5^0.5)/5)*cos(2*Pi*n/5) - (1/10)*((20-4*5^0.5)^0.5 - 7*(20+4*5^0.5)^0.5)*sin(2*Pi*n/5)) - ((3-2*5^0.5)/5)*cos(4*Pi*n/5) + (1/10)*((20+4*5^0.5)^0.5 + 7*(20-4*5^0.5)^0.5)*sin(4*Pi*n/5).
G.f. = ((1 + 5*z + 3*z^2 + 4*z^3 - 2*z^4)/(1-z^5)). (End)
Equivalently, g.f. = (-1 - 5*x - 3*x^2 - 4*x^3 + 2*x^4)/((x-1)*(1 + x + x^2 + x^3 + x^4)). - R. J. Mathar, Jan 07 2008
From Wesley Ivan Hurt, Sep 18 2015: (Start)
a(n) = a(n-5) for n>4.
a(n) = (1-n-5*floor(-n/5)-floor((n-2)/5)+2*floor((n-3)/5)-floor[(n-4)/5)) * (-1)^(floor((n+1)/5)-floor(n/5)). (End)
MAPLE
A135448 := proc(n) op((n mod 5)+1, [1, 5, 3, 4, -2]) ; end: seq(A135448(n), n=0..150) ; # R. J. Mathar, Feb 07 2009
MATHEMATICA
PadRight[{}, 100, {1, 5, 3, 4, -2}] (* Vincenzo Librandi, Sep 19 2015 *)
PROG
(PARI) a(n)=[1, 5, 3, 4, -2][n%5+1] \\ Charles R Greathouse IV, Jun 02 2011
CROSSREFS
KEYWORD
sign,easy,less
AUTHOR
Paul Curtz, Dec 14 2007
EXTENSIONS
More periods from R. J. Mathar, Feb 07 2009
STATUS
approved