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!)
A094405 a(1) = 1; a(n) = (sum of previous terms) mod n. 4
1, 1, 2, 0, 4, 2, 3, 5, 0, 8, 4, 6, 10, 4, 5, 7, 11, 1, 17, 11, 18, 10, 15, 1, 21, 11, 16, 26, 17, 27, 16, 24, 7, 5, 1, 29, 13, 17, 25, 1, 33, 15, 20, 30, 5, 45, 33, 7, 2, 42, 22, 32, 52, 38, 8, 2, 47, 23, 32, 50, 25, 35, 55, 31, 46, 10, 3, 57, 29, 41, 65, 41, 64, 36, 53, 11, 2, 62, 26 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Theorem. For all values of n>=397, a(n)=97. Proof. Let s(n) denote Sum[a(i), i=1..n-1]. Calculation shows that s(397)=38606=397*97+97. Thus a(397)=397*97+97 mod 397=97. Then s(398)=s(397)+97=398*97+97, giving a(398)=97. A simple inductive argument shows that a(397+k)=97 for all integers k>=0. - John W. Layman, Jun 07 2004
Conjecture: For any seed a(1) the sequence "a(n) = (sum of previous terms) mod n" ends with repeating constant. This is true for a(1) = 1,...,941. - Zak Seidov, Feb 24 2006
Essentially the same as A066910. [From R. J. Mathar, Sep 05 2008]
LINKS
EXAMPLE
a(4) = 0 because the previous terms 1, 1, 2 sum to 4 and 4 mod 4 is 0. a(5) = 4 because the previous terms 1, 1, 2, 0 sum to 4 and 4 mod 5 is 4.
MAPLE
L := [1]; s := 1; p := 2; while (nops(L) < 90) do; if 1>0 then; t := s mod p; L := [op(L), t]; s := s+t; p := p+1; fi; od; L;
CROSSREFS
Sequence in context: A351912 A136265 A066910 * A155984 A028609 A107490
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 June 1 07:49 EDT 2024. Contains 373013 sequences. (Running on oeis4.)