OFFSET
1,3
COMMENTS
Every positive integer appears twice in the present sequence (we can use the same arguments as in A380298).
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program
PROG
(PARI) \\ See Links section.
(Python)
from math import prod
from itertools import count, islice
def agen(): # generator of terms
alst, adict, an, m = [], dict(), 1, 1
for n in count(1):
yield an
alst.append(an)
adict[an] = [n] if an not in adict else adict[an] + [n]
an = next(k for k in count(m) if k not in adict or (len(adict[k])==1 and prod(alst[adict[k][0]:n])%k==0))
while m in adict and len(adict[m]) > 1: m += 1
print(list(islice(agen(), 70))) # Michael S. Branicky, Jan 19 2025
CROSSREFS
KEYWORD
nonn,new
AUTHOR
Rémy Sigrist, Jan 19 2025
STATUS
approved