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!)
A094403 a(1) = 1; a(n) = (sum of previous terms)^n mod n. 0
1, 1, 2, 0, 4, 4, 5, 1, 0, 4, 0, 4, 0, 4, 0, 0, 13, 1, 6, 0, 8, 20, 9, 9, 1, 23, 0, 8, 12, 10, 26, 0, 11, 17, 29, 1, 12, 20, 8, 16, 3, 1, 36, 0, 0, 18, 19, 1, 18, 26, 13, 9, 10, 0, 34, 32, 30, 34, 43, 1, 8, 36, 8, 0, 50, 60, 43, 21, 25, 1, 18, 0, 12, 70, 25, 45, 30, 40, 4, 16, 80, 72, 37, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
LINKS
EXAMPLE
a(4) = 0 because the previous terms 1, 1, 2 sum to 4 and 4^4 mod 4 is 0. a(5) = 4 because the previous terms 1, 1, 2, 0 sum to 4 and 4^5 mod 5 is 4.
MAPLE
L := [1]; s := 1; p := 2; while (nops(L) < 90) do; if 1>0 then; t := (s^p) mod p; L := [op(L), t]; s := s+t; p := p+1; fi; od; L;
MATHEMATICA
Module[{aa={1}, n=1}, Do[n=n+1; AppendTo[aa, PowerMod[Total[aa], n, n]], {90}]; aa] (* Harvey P. Dale, Apr 04 2013 *)
CROSSREFS
Sequence in context: A116578 A078050 A134271 * A244340 A363062 A316987
KEYWORD
nonn
AUTHOR
Chuck Seggelin (seqfan(AT)plastereddragon.com), Jun 03 2004
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 May 17 10:20 EDT 2024. Contains 372594 sequences. (Running on oeis4.)