OFFSET
1,2
COMMENTS
It seems that this sequence grows linearly but this is unproven.
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10000
FORMULA
A374966(a(n)) = 0.
a(n) ~ c*n, empirically, with c = 7.42...
MATHEMATICA
nn = 2^20; c[_] := False; j = 0; c[0] = True; {j}~Join~Reap[Do[If[c[n], k = 0; Sow[n], k = j + n]; Set[{c[k], j}, {True, k}], {n, nn}] ][[-1, 1]] (* Michael De Vlieger, Jul 29 2024 *)
PROG
(Python)
from itertools import count, islice
def agen(): # generator of terms
seen, an = {0}, 0
for n in count(1):
if an == 0: yield n-1
an = 0 if n in seen else an + n
seen.add(an)
print(list(islice(agen(), 64))) # Michael S. Branicky, Jul 29 2024
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Bryle Morga, Jul 29 2024
STATUS
approved