OFFSET
1,2
COMMENTS
This sequence is infinite because it contains all the odd primes.
EXAMPLE
1 is a term because it has no prime factors and thus no duplicates.
189 is a term because 189 = 3^3 * 7^1 = prime(2)^3 * prime(4)^1 and 1, 2, 3 and 4 are distinct.
9 is not a term because 9 = 3^2 = prime(2)^2 where the number 2 occurs twice.
MATHEMATICA
q[k_] := Module[{f = FactorInteger[k]}, UnsameQ @@ Join[PrimePi[f[[;; , 1]]], f[[;; , 2]]]]; Select[Range[200], q] (* Amiram Eldar, Sep 08 2025 *)
PROG
(Python)
from sympy import factorint, primepi
def ok(n):
f = factorint(n)
return len(L := [primepi(p) for p in f] + list(f.values())) == len(set(L))
print([k for k in range(1, 200) if ok(k)])
(PARI) isok(k) = my(f=factor(k), v=concat(apply(primepi, f[, 1]), f[, 2])); #v == #Set(v); \\ Michel Marcus, Sep 08 2025
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Kalle Siukola, Sep 07 2025
STATUS
approved
