The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
a(n) = sign(n mod 7) for n > 2. - Wesley Ivan Hurt, Dec 23 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
Sequence in context: A122777 A103524 A110916 * A368474 A369935 A368169
KEYWORD
nonn,easy
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 12 07:01 EDT 2024. Contains 373325 sequences. (Running on oeis4.)