|
|
A185058
|
|
a(n) = n^n! mod 7.
|
|
1
|
|
|
0, 1, 4, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
For n > 2, periodic with period 7: repeat [1, 1, 1, 1, 0, 1, 1].
|
|
LINKS
|
|
|
FORMULA
|
G.f.: x*(3*x^8 - x^5 - x^4 - x^3 - x^2 - 4*x - 1)/(x^7 - 1). - Chai Wah Wu, Jun 04 2016
|
|
MAPLE
|
A185058:= n -> [0, 1, 1, 1, 1, 1, 1][(n mod 7)+1]: 0, 1, 4, seq(A185058(n), n=3..100); # Wesley Ivan Hurt, Dec 23 2016
|
|
MATHEMATICA
|
Table[PowerMod[n, n!, 7], {n, 0, 84}]
Join[{0, 1, 4}, LinearRecurrence[{0, 0, 0, 0, 0, 0, 1}, {1, 1, 1, 1, 0, 1, 1}, 82]] (* Ray Chandler, Aug 26 2015 *)
PadRight[{0, 1, 4}, 120, {0, 1, 1, 1, 1, 1, 1}] (* Harvey P. Dale, May 29 2020 *)
|
|
PROG
|
(Magma) [0, 1, 4] cat &cat [[1, 1, 1, 1, 0, 1, 1]^^20]; // Wesley Ivan Hurt, Dec 23 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|