Prime Factor
A prime factor is a factor that is prime, i.e., one that cannot itself be factored. In general, a prime factorization takes the form
|
(1)
|
where
are prime factors and
are their
orders. Prime factorization can be performed
in the Wolfram Language using the
command FactorInteger[n],
which returns a list of
pairs.
The following table gives the prime factorization for the positive integers
.
| 1 | 1 | 11 | 11 | 21 | 31 | 31 | 41 | 41 | |
| 2 | 2 | 12 | 22 | 32 | 42 | ||||
| 3 | 3 | 13 | 13 | 23 | 23 | 33 | 43 | 43 | |
| 4 | 14 | 24 | 34 | 44 | |||||
| 5 | 5 | 15 | 25 | 35 | 45 | ||||
| 6 | 16 | 26 | 36 | 46 | |||||
| 7 | 7 | 17 | 17 | 27 | 37 | 37 | 47 | 47 | |
| 8 | 18 | 28 | 38 | 48 | |||||
| 9 | 19 | 19 | 29 | 29 | 39 | 49 | |||
| 10 | 20 | 30 | 40 | 50 |
The number of not necessarily distinct prime factors of a number
is denoted
(Hardy and Wright 1979, p. 354) or
. Conway et al. (2008) coined the term
"multiprimality of
" to describe
, with semiprimes then being termed biprimes, numbers with three
factors terms triprimes, etc. The number of prime factors is given in terms of the
prime factorization above by
|
(2)
|
The first few values for
, 2, ... are 0, 1, 1, 2, 1, 2, 1, 3,
2, 2, 1, 3, 1, 2, 2, 4, 1, 3, 1, 3, ... (OEIS A001222).
is plotted above up to
(left) and
(right). The function
is implemented
in the Wolfram Language as PrimeOmega[n],
The function defined by
is known as
the Liouville function.
The number of distinct prime factors of a number
is denoted
(Hardy
and Wright 1979, p. 354), or sometimes
or
, and is implemented
in the Wolfram Language as PrimeNu[n].
For example,
has a single distinct prime
factor, so
, but two total prime factors,
so
.
An asymptotic series for
is given by
|
(3)
|
(Diaconis 1976, Knuth 2000, Diaconis 2002, Finch 2003, Knuth 2003), where
is a constant
related to the Mertens constant and
are Stieltjes
constants. Furthermore, the variance is given by
|
(4)
|
where
|
(5)
| |||
|
(6)
|
(OEIS A091589), and
|
(7)
|
(OEIS A086242; Finch 2003) is a convergent prime sum. The coefficients
and
are given by
the sums
|
(8)
| |||
|
(9)
| |||
|
(10)
| |||
|
(11)
| |||
|
(12)
|
(Diaconis 1976, Knuth 2000, Diaconis 2002, Finch 2003, Knuth 2003), where
|
(13)
| |||
|
(14)
| |||
|
(15)
| |||
|
(16)
|
(Finch 2003).
Similarly, if
is chosen at random between 1 and
, then the probability that
|
(17)
|
approaches
|
(18)
|
as
(Knuth 1998, p. 384). In addition,
the average value
of
for
approaches
(Erdős
and Kac 1940; Hardy and Wright 1979; Knuth 1998, p. 384)
The average order of
is
|
(19)
|
(Hardy 1999, p. 51). More precisely,
|
(20)
|
for appropriate constants
and
(Hardy and Ramanujan
1917; Hardy and Wright 1979, p. 355; Hardy 1999, p. 57), where
is asymptotic
notation.
prime factor




