OFFSET
1,2
COMMENTS
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
PROG
(Python)
from itertools import count, islice
def A370952_gen(): # generator of terms
a, aset = 1, {0, 1}
for p in count(3, 2):
yield a
for b in count(a%p, p):
if b not in aset:
aset.add(b)
a = b
break
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 07 2024.
STATUS
approved