login
A066910
a(1) = 1; a(n+1) = (sum{k=1 to n} a(k) ) (mod n).
9
1, 0, 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
OFFSET
1,4
COMMENTS
Steven Taschuk and Phil Carmody posted to sci.math (http://www.mathforum.com/epigone/sci.math/sazhazhi ) that a(k) = 97 for k >= 398.
Apart from the initial term, this is the first differences of A073117. - Rémy Sigrist, Mar 22 2017
LINKS
EXAMPLE
a(7) = (1 + 0 + 1 + 2 + 0 + 4) (mod 6) = 8 (mod 6) = 2.
MATHEMATICA
Fold[Append[#1, Mod[Total@#1, #2]] &, {1}, Range@78] (* Ivan Neretin, Nov 22 2015 *)
PROG
(PARI) first(m)=my(v=vector(m)); v[1]=1; for(i=2, m, v[i]=sum(k=1, i-1, v[k])%(i-1)); v \\ Anders Hellström, Nov 22 2015
CROSSREFS
Cf. A073117.
Sequence in context: A242595 A351912 A136265 * A094405 A155984 A028609
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Jan 22 2002
STATUS
approved