OFFSET
1,1
COMMENTS
LINKS
Seqfan discussion, Re: Ali Sada's A364054.
PROG
(Python)
from itertools import count, islice
from sympy import nextprime
def A366864_gen(): # generator of terms
a, aset, p = 1, {0, 1}, 2
for i in count(3):
for b in count(a, p):
if b not in aset:
aset.add(b)
c = b%(p:=nextprime(p))
if c > a:
yield i
a = c
break
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Chai Wah Wu, Oct 25 2023
STATUS
approved