login
A070371
a(n) = 5^n mod 17.
3
1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7, 1, 5, 8, 6, 13, 14
OFFSET
0,2
COMMENTS
Periodic with period 16 (5 is a primitive root of 17). [Joerg Arndt, Mar 06 2016]
LINKS
Index entries for linear recurrences with constant coefficients, signature (1,0,0,0,0,0,0,-1,1). [From R. J. Mathar, Apr 20 2010]
FORMULA
From R. J. Mathar, Apr 20 2010: (Start)
a(n) = a(n-1) - a(n-8) + a(n-9).
G.f.: (-1-4*x-3*x^2+2*x^3-7*x^4-x^5+12*x^6-8*x^7-7*x^8) / ((x-1)*(1+x^8)). (End)
a(n) = a(n-16). - G. C. Greubel, Mar 05 2016
MATHEMATICA
PowerMod[5, Range[0, 90], 17] (* or *) LinearRecurrence[ {1, 0, 0, 0, 0, 0, 0, -1, 1}, {1, 5, 8, 6, 13, 14, 2, 10, 16}, 90] (* Harvey P. Dale, Jun 26 2013 *)
Table[Mod[5^n, 17], {n, 0, 100}] (* G. C. Greubel, Mar 05 2016 *)
PROG
(Sage) [power_mod(5, n, 17) for n in range(0, 86)] # Zerinvary Lajos, Nov 26 2009
(PARI) a(n) = lift(Mod(5, 17)^n); \\ Michel Marcus, Mar 05 2016
(PARI) x='x+O('x^100); Vec((-1-4*x-3*x^2+2*x^3-7*x^4-x^5+12*x^6-8*x^7-7*x^8)/((x-1)*(1+x^8))) \\ Altug Alkan, Mar 05 2016
(Magma) &cat[[1, 5, 8, 6, 13, 14, 2, 10, 16, 12, 9, 11, 4, 3, 15, 7]^^5]; // Vincenzo Librandi, Mar 06 2016
CROSSREFS
Cf. A000351.
Sequence in context: A145432 A335565 A365793 * A199444 A005120 A362975
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, May 12 2002
STATUS
approved