OFFSET
0,3
COMMENTS
Indices of 0's: 4, 24, 29, 35, 54, 267, 5284, 17827, 43631, 120871, 843813, 1854903, 2226536, 4208775, 5525594, ...
Indices of 1's: 0, 1, 14, 15, 49, 60, 66, 116, 331, 6053, 23760, 288502, 496670, 4281666, ...
Indices such that a(n)=n: 1, 2, 22, 315, 1172, 1441, 1846, 2140, 47376, 593870, 16538298, 111824649, 565597433, 791186876, ...
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
FORMULA
a(0)=1, a(n) = (a(0)+...+a(n-1)) mod (a(n-1)+n).
MATHEMATICA
nxt[{n_, t_, a_}]:=Module[{c=Mod[t, a+n+1]}, {n+1, t+c, c}]; NestList[nxt, {0, 1, 1}, 80][[All, 3]] (* Harvey P. Dale, Dec 30 2017 *)
PROG
(Python)
sum = a = 1
for n in range(1, 333):
print a,
a = sum % (a+n)
sum += a
CROSSREFS
KEYWORD
nonn
AUTHOR
Alex Ratushnyak, Aug 11 2012
STATUS
approved