TOPICS
Search

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

 n=p_1^(alpha_1)p_2^(alpha_2)...p_k^(alpha_k),
(1)

where p_i are prime factors and alpha_i are their orders. Prime factorization can be performed in the Wolfram Language using the command FactorInteger[n], which returns a list of (p_i,alpha_i) pairs.

The following table gives the prime factorization for the positive integers <=50.

111111213·731314141
22122^2·3222·11322^5422·3·7
3313132323333·114343
42^2142·7242^3·3342·17442^2·11
55153·5255^2355·7453^2·5
62·3162^4262·13362^2·3^2462·23
771717273^337374747
82^3182·3^2282^2·7382·19482^4·3
93^219192929393·13497^2
102·5202^2·5302·3·5402^3·5502·5^2
PrimeFactors

The number of not necessarily distinct prime factors of a number n is denoted Omega(n) (Hardy and Wright 1979, p. 354) or r(n). Conway et al. (2008) coined the term "multiprimality of n" to describe Omega(n), 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

 Omega(n)=sum_(i=1)^kalpha_i.
(2)

The first few values for n=1, 2, ... are 0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 3, 1, 2, 2, 4, 1, 3, 1, 3, ... (OEIS A001222). Omega(n) is plotted above up to n=100 (left) and n=1000 (right). The function Omega(n) is implemented in the Wolfram Language as PrimeOmega[n],

The function defined by lambda(n)=(-1)^(Omega(n)) is known as the Liouville function.

The number of distinct prime factors of a number n is denoted omega(n) (Hardy and Wright 1979, p. 354), or sometimes nu(n) or r(n), and is implemented in the Wolfram Language as PrimeNu[n].

For example, 4=2·2 has a single distinct prime factor, so omega(4)=1, but two total prime factors, so Omega(4)=2.

An asymptotic series for Omega(n) is given by

 Omega(n)∼lnlnn+B_2+sum_(k=1)^infty(-1+sum_(j=0)^(k-1)(gamma_j)/(j!))((k-1)!)/((lnn)^k)
(3)

(Diaconis 1976, Knuth 2000, Diaconis 2002, Finch 2003, Knuth 2003), where B_2 is a constant related to the Mertens constant and gamma_j are Stieltjes constants. Furthermore, the variance is given by

 var(Omega(n))∼lnlnn+B_2^'+(c_1)/(lnn)+(c_2)/((lnn)^2)+...,
(4)

where

B_2^'=B_2-T-1/6pi^2
(5)
=0.76478...
(6)

(OEIS A091589), and

 T=sum_(k=1)^infty1/((p_k-1)^2) approx 1.37506...
(7)

(OEIS A086242; Finch 2003) is a convergent prime sum. The coefficients c_1 and c_2 are given by the sums

c_1=gamma-1-2sum_(k=1)^(infty)(lnp_k)/((p_k-1)^2)
(8)
=gamma-1+2sum_(k=2)^(infty)phi(k)(zeta^'(k))/(zeta(k))
(9)
=2.8767219464...
(10)
c_2=-gamma_1-(gamma-1)[gamma-2sum_(k=1)^(infty)(lnp_k)/((p_k-1)^2)]-2sum_(k=1)^(infty)(p_k(lnp_k)^2)/((p_k-1)^3)
(11)
=4.9035933594...
(12)

(Diaconis 1976, Knuth 2000, Diaconis 2002, Finch 2003, Knuth 2003), where

U=sum_(k=1)^(infty)(lnp_k)/((p_k-1)^2)
(13)
=1.2269688...
(14)
V=sum_(k=1)^(infty)(p_k(lnp_k)^2)/((p_k-1)^3)
(15)
=2.0914802...
(16)

(Finch 2003).

Similarly, if n is chosen at random between 1 and x, then the probability that

 Omega(n)<=lnlnn+csqrt(lnlnx)
(17)

approaches

 1/(sqrt(2pi))int_(-infty)^ce^(-u^2/2)du
(18)

as x->infty (Knuth 1998, p. 384). In addition, the average value t^_ of Omega(n)-lnlnx for 1<=n<=x approaches B_2 (Erdős and Kac 1940; Hardy and Wright 1979; Knuth 1998, p. 384)

PrimeFactorsAverageOrder

The average order of Omega(n) is

 Omega(n)∼lnlnn
(19)

(Hardy 1999, p. 51). More precisely,

 sum_(n<=x)Omega(n)=xlnlnx+Bx+O(x/(lnx)),
(20)

for appropriate constants A and B (Hardy and Ramanujan 1917; Hardy and Wright 1979, p. 355; Hardy 1999, p. 57), where O(x) is asymptotic notation.


See also

Dickman Function, Distinct Prime Factors, Divisor Function, Factor, Greatest Prime Factor, Least Prime Factor, Liouville Function, Mertens Constant, Pólya Conjecture, Prime Factorization, Prime Factorization Algorithms, Prime Number, Primitive Prime Factor, Round Number, Sum of Prime Factors Explore this topic in the MathWorld classroom

Related Wolfram sites

http://functions.wolfram.com/NumberTheoryFunctions/FactorInteger/

Explore with Wolfram|Alpha

References

Conway, J. H.; Dietrich, H.; O'Brien, E. A. "Counting Groups: Gnus, Moas, and Other Exotica." Math. Intell. 30, 6-18, 2008.Diaconis, P. "Asymptotic Expansions for the Mean and Variance of the Number of Prime Factors of a Number n." Dept. Statistics Tech. Report 96, Stanford, CA: Stanford University, 1976.Diaconis, P. "G. H. Hardy and Probability???" Bull. London Math. Soc. 34, 385-402, 2002.Erdős, P. and Kac, M. "The Gaussian Law of Errors in the Theory of Additive Number Theoretic Functions." Amer. J. Math. 26, 738-742, 1940.Finch, S. "Two Asymptotic Series." December 10, 2003. http://algo.inria.fr/bsolve/.Hardy, G. H. Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, 3rd ed. New York: Chelsea, 1999.Hardy, G. H. and Ramanujan, S. Quart. J. Math. 48, 76-92, 1917.Hardy, G. H. and Wright, E. M. §22.11 in An Introduction to the Theory of Numbers, 5th ed. Oxford, England: Clarendon Press, 1979.Knuth, D. E. The Art of Computer Programming, Vol. 2: Seminumerical Algorithms, 3rd ed. Reading, MA: Addison-Wesley, p. 384, 1998.Knuth, D. E. Selected Papers on Analysis of Algorithms. Stanford, CA: CSLI Publications, pp. 338-339, 2000.Ramanujan, S. Collected Papers of Srinivasa Ramanujan (Ed. G. H. Hardy, P. V. S. Aiyar, and B. M. Wilson). Providence, RI: Amer. Math. Soc., p. 327, 2000.Sloane, N. J. A. Sequences A001222/M0094, A001221/M0056, A030059, A083342, A086242, and A091589 in "The On-Line Encyclopedia of Integer Sequences."Turán, P. "On a Theorem of Hardy and Ramanujan." J. London Math. Soc. 9, 274-276, 1934.Turán, P. "Über einige Verallgemeinerungen eines Satzes von Hardy und Ramanujan." J. London Math. Soc. 11, 125-133, 1936.

Referenced on Wolfram|Alpha

Prime Factor

Cite this as:

Weisstein, Eric W. "Prime Factor." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/PrimeFactor.html

Subject classifications