OFFSET
1,1
PROG
(Python)
from itertools import count, islice
from collections import deque
from math import gcd, lcm
from sympy import factorint
def A354160_gen(): # generator of terms
aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True
while True:
for m in count(c):
if m not in aset and gcd(m, b) == 1:
if len(fm := factorint(m)) == sum(fm.values()) == 2:
yield m
aset.add(m)
aqueue.append(m)
if f: aqueue.popleft()
b = lcm(*aqueue)
f = not f
while c in aset:
c += 1
break
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, May 30 2022
STATUS
proposed