

A066910


a(1) = 1; a(n+1) = (sum{k=1 to n} a(k) ) (mod n).


4



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



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.


LINKS

Ivan Neretin, Table of n, a(n) for n = 1..501


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, i1, v[k])%(i1)); v \\ Anders HellstrÃ¶m, Nov 22 2015


CROSSREFS

Sequence in context: A218831 A242595 A136265 * A094405 A155984 A028609
Adjacent sequences: A066907 A066908 A066909 * A066911 A066912 A066913


KEYWORD

easy,nonn


AUTHOR

Leroy Quet, Jan 22 2002


STATUS

approved



