The distinct prime factors of a positive integer are defined as the
numbers
, ...,
in the prime
factorization
(Hardy and Wright 1979, p. 354).
A list of distinct prime factors of a number can be computed in the Wolfram
Language using FactorInteger[n][[All,
1]]. Their number
is the prime nu function,
implemented as PrimeNu[n].
Some authors use nu(n) for omega(n) (Hardy and Wright 1979, p. 354). Care is needed because can instead denote the number of all divisors
of
(Ore 1988, p. 86). The capital-letter Omega(n)
counts prime factors with multiplicity. Thus
, since the distinct prime
factors are 2 and 3, whereas
, since
. The symbols
and
should therefore not be interchanged.
The prime factorizations and distinct prime factors of the first few positive integers are listed in the table below.
| prime factorization | distinct prime factors (A027748) | ||
| 1 | -- | 0 | -- |
| 2 | 2 | 1 | 2 |
| 3 | 3 | 1 | 3 |
| 4 | 1 | 2 | |
| 5 | 5 | 1 | 5 |
| 6 | 2 | 2, 3 | |
| 7 | 7 | 1 | 7 |
| 8 | 1 | 2 | |
| 9 | 1 | 3 | |
| 10 | 2 | 2, 5 | |
| 11 | 11 | 1 | 11 |
| 12 | 2 | 2, 3 | |
| 13 | 13 | 1 | 13 |
| 14 | 2 | 2, 7 | |
| 15 | 2 | 3, 5 | |
| 16 | 1 | 2 |
The numbers consisting only of distinct prime factors are precisely the squarefree numbers.