OFFSET
1,2
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..5715
Rémy Sigrist, C program
PROG
(Python)
from math import lcm, gcd
from itertools import count, islice
from collections import deque
from sympy import factorint
def A354792_gen(): # generator of terms
aset, aqueue, c, b, f = {1}, deque([1]), 2, 1, True
yield 1
while True:
for m in count(c):
if m not in aset and gcd(m, b) == 1 and all(map(lambda n:n<=1, fs:=factorint(m).values())):
if len(fs) > 1:
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
(C) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Michael De Vlieger and N. J. A. Sloane, Jul 17 2022
EXTENSIONS
More terms from Rémy Sigrist, Jul 17 2022
STATUS
approved