OFFSET
0,2
LINKS
Index entries for linear recurrences with constant coefficients, signature (0,0,0,1).
FORMULA
Final digits of A082311.
O.g.f.: (1+5*x+3*x^2+x^3)/((1-x)*(x+1)*(1+x^2)) = (5/2)/(1-x)-(1/2)/(x+1)+(2*x-1)/(1+x^2). - R. J. Mathar, Nov 28 2007
From Wesley Ivan Hurt, Jul 09 2016: (Start)
a(n) = a(n-4) for n>3.
a(n) = (5-cos(n*Pi)-2*cos(n*Pi/2)+4*sin(n*Pi/2)-I*sin(n*Pi))/2. (End)
MAPLE
seq(op([1, 5, 3, 1]), n=0..40); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
PadRight[{}, 120, {1, 5, 3, 1}] (* Harvey P. Dale, Sep 15 2014 *)
PROG
(PARI) a(n)=[1, 5, 3, 1][n%4+1] \\ Charles R Greathouse IV, Jun 02 2011
(Magma) &cat [[1, 5, 3, 1]^^30]; // Wesley Ivan Hurt, Jul 09 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 20 2007
STATUS
approved