OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
a(2) = 30 since it shares the prime 2 with a(1) = 2 and has two other different primes not contained in a(1) (3 and 5).
a(3) = 154 = 2*7*11 since it shares the prime 2 with a(2) = 30 and has two other different primes not contained in a(2) (7 and 11).
PROG
(Python)
from sympy import factorint
from functools import cache
from itertools import count, islice
@cache
def pf(n): return set(factorint(n))
def cond(pfan, pfk): return len(pfk&pfan) == 1 and len(pfk-pfan) >= 2
def agen():
an, aset, m = 2, {2}, 3
while True:
yield an
pfan = pf(an)
m = next(k for k in count(m) if k not in aset and len(pf(k)) >= 3)
an = next(k for k in count(m) if k not in aset and cond(pfan, pf(k)))
aset.add(an)
print(list(islice(agen(), 55))) # Michael S. Branicky, Jan 06 2026
CROSSREFS
KEYWORD
nonn
AUTHOR
Enrique Navarrete, Jan 01 2026
STATUS
approved
