OFFSET
0,2
COMMENTS
Residues mod 5 of Lucas numbers: for n>=1, a(n-1) = A000032(n) mod 5. - Clark Kimberling, Aug 28 2008
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,-1,1).
FORMULA
From R. J. Mathar, Apr 13 2010: (Start)
a(n) = a(n-1) - a(n-2) + a(n-3) for n>2.
G.f.: (1+2*x+2*x^2) / ((1-x)*(1+x^2)). (End)
a(n) = 2^(3*n) mod 5. - Gary Detlefs, May 18 2014
E.g.f.: (1/2)*(5*exp(x) + sin(x) - 3*cos(x)). - G. C. Greubel, Mar 11 2016
a(n) = a(n-4) for n>3. - Wesley Ivan Hurt, Jul 09 2016
MAPLE
seq(op([1, 3, 4, 2]), n=0..50); # Wesley Ivan Hurt, Jul 09 2016
MATHEMATICA
Table[PowerMod[3, n, 5], {n, 0, 200}] (* Vladimir Joseph Stephan Orlovsky, Jun 10 2011 *)
PROG
(Sage) [power_mod(2, -n, 5) for n in range(0, 101)] # Zerinvary Lajos, Jun 08 2009
(Magma) &cat [[1, 3, 4, 2]^^27]; // Bruno Berselli, Dec 10 2015
(Magma) [Modexp(3, n, 5): n in [0..100]]; // Bruno Berselli, Mar 23 2016
(PARI) a(n) = lift(Mod(3, 5)^n); \\ Michel Marcus, Mar 16 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved