login
A204690
n^n (mod 5).
2
1, 1, 4, 2, 1, 0, 1, 3, 1, 4, 0, 1, 1, 3, 1, 0, 1, 2, 4, 4, 0, 1, 4, 2, 1, 0, 1, 3, 1, 4, 0, 1, 1, 3, 1, 0, 1, 2, 4, 4, 0, 1, 4, 2, 1, 0, 1, 3, 1, 4, 0, 1, 1, 3, 1, 0, 1, 2, 4, 4, 0, 1, 4, 2, 1, 0, 1, 3, 1, 4, 0, 1, 1, 3, 1, 0, 1, 2, 4, 4, 0, 1, 4, 2, 1, 0, 1
OFFSET
0,3
COMMENTS
For n>0, periodic with period 20 = A174824(5): repeat [1, 4, 2, 1, 0, 1, 3, 1, 4, 0, 1, 1, 3, 1, 0, 1, 2, 4, 4, 0].
LINKS
Index entries for linear recurrences with constant coefficients, signature (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1).
MATHEMATICA
Table[PowerMod[n, n, 5], {n, 0, 140}]
Join[{1}, LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, {1, 4, 2, 1, 0, 1, 3, 1, 4, 0, 1, 1, 3, 1, 0, 1, 2, 4, 4, 0}, 86]] (* Ray Chandler, Aug 26 2015 *)
CROSSREFS
Sequence in context: A177715 A164789 A203986 * A309784 A331160 A325146
KEYWORD
nonn,easy
AUTHOR
STATUS
approved