OFFSET
1,3
COMMENTS
Indices of 0's: 7, 21, 956, 1576, 1964, 55346, 70460, 99845, 399114, 544095, 35321849, 77073660, ...
Indices of 1's: 1, 2, 129, 193, 262, 4495, 99781, 651856, 35351437, ...
Indices such that a(n)=n: 1, 4, 9, 10, 32, 176, 266, 414, 432, 440, 858, 5953, 6030, 15146, 1408096, 3138130, 35659404, 44722350, 109021513, 790542727, ...
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(1)=1, a(n) = (a(0)+...+a(n-1)) mod (a(n-1)+n).
MATHEMATICA
nxt[{t_, n_, a_}]:={t+a, n+1, Mod[t+a, a+n+1]}; NestList[nxt, {0, 1, 1}, 80][[All, 3]] (* Harvey P. Dale, Sep 01 2016 *)
PROG
(Python)
sum = a = 1
for n in range(2, 333):
print a,
a = sum % (a+n)
sum += a
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Aug 11 2012
STATUS
approved