OFFSET
1,1
COMMENTS
Odd terms in A354160. - Chai Wah Wu, May 31 2022
PROG
(Python)
from itertools import count, islice
from collections import deque
from math import gcd, lcm
from sympy import factorint
def A354162_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 m % 2 and 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
approved