login
A070370
a(n) = 5^n mod 16.
2
1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1, 5, 9, 13, 1
OFFSET
0,2
COMMENTS
Period 4: repeat [1, 5, 9, 13].
FORMULA
From R. J. Mathar, Apr 20 2010: (Start)
a(n) = a(n-4) for n>3.
G.f.: ( 1+5*x+9*x^2+13*x^3 ) / ( (1-x)*(1+x)*(1+x^2) ). (End)
a(n) = 7-2*((1+I)*(-I)^n+(1-I)*I^n+(-1)^n). - Bruno Berselli, Feb 07 2011
E.g.f.: 5*cosh(x) + 9*sinh(x) - 4*cos(x) - 4*sin(x). - G. C. Greubel, Mar 05 2016
a(n) = A130909(A000351(n)). - Michel Marcus, Jul 06 2016
MAPLE
seq(op([1, 5, 9, 13]), n=0..50); # Wesley Ivan Hurt, Jul 06 2016
MATHEMATICA
Table[Mod[5^n, 16], {n, 0, 100}] (* G. C. Greubel, Mar 05 2016 *)
PROG
(Sage) [power_mod(5, n, 16)for n in range(0, 93)] # Zerinvary Lajos, Nov 26 2009
(PARI) a(n) = lift(Mod(5, 16)^n); \\ Michel Marcus, Mar 05 2016
(Magma) &cat [[1, 5, 9, 13]^^30]; // Wesley Ivan Hurt, Jul 06 2016
CROSSREFS
Sequence in context: A314650 A220187 A073853 * A277617 A103703 A143706
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved