login
A389138
Composite numbers not in A387184.
2
4, 46, 58, 65, 69, 74, 86, 87, 93, 94, 106, 111, 114, 115, 118, 119, 123, 129, 130, 134, 145, 158, 159, 161, 166, 174, 177, 178, 183, 185, 186, 187, 195, 201, 202, 205, 206, 209, 213, 214, 215, 217, 218, 219, 235, 237, 238, 247, 249, 259, 262, 266, 267, 273, 274, 278
OFFSET
1,1
COMMENTS
The first non-semiprime terms are 114, 130, 174, 186, ... . What is the smallest term with more than 3 prime factors?
First term with 4 prime factors is a(189) = 690. First term with 5 prime factors is a(2625) = 6510. - Chai Wah Wu, Sep 24 2025
PROG
(Python)
from math import prod
from itertools import count, islice
from sympy import factorint, integer_nthroot, isprime
def A389138_gen(): # generator of terms
g, p, r = [set()], 0, {}
for c in count(2):
f = factorint(c)
d = g[-1]^set(i for i, j in f.items() if j&1)
for h in g:
if (t:=prod(d^h)) not in r:
r[t] = c-1
g.append(d)
x, y = integer_nthroot(c, 2)
if c>4 and y and isprime(x):
continue
elif c>4 and max(f.values())>1:
continue
else:
flag = False
for b in range(c-2, p, -1):
e = prod(d^g[b])
if e in r and r[e]<b:
flag = True
break
if flag:
continue
if isprime(c):
p = c-2
else:
yield c
A389138_list = list(islice(A389138_gen(), 56)) # Chai Wah Wu, Sep 24 2025, updated Oct 05 2025
CROSSREFS
Cf. A387184 (see there for more information).
Sequence in context: A349866 A222899 A119729 * A374591 A134110 A384584
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Sep 24 2025
STATUS
approved