login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A185057
a(n) = n^n! (mod 5).
0
0, 1, 4, 4, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1
OFFSET
0,3
COMMENTS
For n > 3, periodic with period 5: repeat [1, 0, 1, 1, 1].
FORMULA
a(n) = (2/5)*(2 - cos(2*n*Pi/5) - cos(4*n*Pi/5)) for n > 3. - Wesley Ivan Hurt, Sep 27 2018
MATHEMATICA
Table[PowerMod[n, n!, 5], {n, 0, 84}]
Join[{0, 1, 4, 4}, LinearRecurrence[{0, 0, 0, 0, 1}, {1, 0, 1, 1, 1}, 81]] (* Ray Chandler, Aug 25 2015 *)
PadRight[{0, 1, 4, 4}, 120, {0, 1, 1, 1, 1}] (* Harvey P. Dale, Dec 22 2022 *)
CROSSREFS
Sequence in context: A366467 A366464 A373749 * A343720 A048152 A350037
KEYWORD
nonn,easy
AUTHOR
STATUS
approved