HOME

TheInfoList



OR:

In mathematics, Legendre's formula gives an expression for the exponent of the largest power of a
prime A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
''p'' that divides the
factorial In mathematics, the factorial of a non-negative denoted is the product of all positive integers less than or equal The factorial also equals the product of n with the next smaller factorial: \begin n! &= n \times (n-1) \times (n-2) ...
 ''n''!. It is named after
Adrien-Marie Legendre Adrien-Marie Legendre (; ; 18 September 1752 – 9 January 1833) was a French mathematician who made numerous contributions to mathematics. Well-known and important concepts such as the Legendre polynomials and Legendre transformation are named ...
. It is also sometimes known as de Polignac's formula, after
Alphonse de Polignac Alphonse de Polignac (1826–1863) was a French mathematician. In 1849, the year he was admitted to Polytechnique, he made what's known as Polignac's conjecture: From p. 400: ''"1er ''Théorème.'' Tout nombre pair est égal à la diffé ...
.


Statement

For any prime number ''p'' and any positive integer ''n'', let \nu_p(n) be the exponent of the largest power of ''p'' that divides ''n'' (that is, the ''p''-adic valuation of ''n''). Then :\nu_p(n!) = \sum_^ \left\lfloor \frac \right\rfloor, where \lfloor x \rfloor is the
floor function In mathematics and computer science, the floor function is the function that takes as input a real number , and gives as output the greatest integer less than or equal to , denoted or . Similarly, the ceiling function maps to the least i ...
. While the sum on the right side is an infinite sum, for any particular values of ''n'' and ''p'' it has only finitely many nonzero terms: for every ''i'' large enough that p^i > n, one has \textstyle \left\lfloor \frac \right\rfloor = 0. This reduces the infinite sum above to :\nu_p(n!) = \sum_^ \left\lfloor \frac \right\rfloor \, , where L = \lfloor \log_ n \rfloor.


Example

For ''n'' = 6, one has 6! = 720 = 2^4 \cdot 3^2 \cdot 5^1. The exponents \nu_2(6!) = 4, \nu_3(6!) = 2 and \nu_5(6!) = 1 can be computed by Legendre's formula as follows: : \begin \nu_2(6!) & = \sum_^\infty \left\lfloor \frac 6 \right\rfloor = \left\lfloor \frac 6 2 \right\rfloor + \left\lfloor \frac 6 4 \right\rfloor = 3 + 1 = 4, \\ pt\nu_3(6!) & = \sum_^\infty \left\lfloor \frac 6 \right\rfloor = \left\lfloor \frac 6 3 \right\rfloor = 2, \\ pt\nu_5(6!) & = \sum_^\infty \left\lfloor \frac 6 \right\rfloor = \left\lfloor \frac 6 5 \right\rfloor = 1. \end


Proof

Since n! is the product of the integers 1 through ''n'', we obtain at least one factor of ''p'' in n! for each multiple of ''p'' in \, of which there are \textstyle \left\lfloor \frac \right\rfloor. Each multiple of p^2 contributes an additional factor of ''p'', each multiple of p^3 contributes yet another factor of ''p'', etc. Adding up the number of these factors gives the infinite sum for \nu_p(n!).


Alternate form

One may also reformulate Legendre's formula in terms of the base-''p'' expansion of ''n''. Let s_p(n) denote the sum of the digits in the base-''p'' expansion of ''n''; then :\nu_p(n!) = \frac. For example, writing ''n'' = 6 in binary as 610 = 1102, we have that s_2(6) = 1 + 1 + 0 = 2 and so :\nu_2(6!) = \frac = 4. Similarly, writing 6 in ternary as 610 = 203, we have that s_3(6) = 2 + 0 = 2 and so :\nu_3(6!) = \frac = 2.


Proof

Write n = n_\ell p^\ell + \cdots + n_1 p + n_0 in base ''p''. Then \textstyle \left\lfloor \frac \right\rfloor = n_\ell p^ + \cdots + n_ p + n_i, and therefore : \begin \nu_p(n!) &= \sum_^ \left\lfloor \frac \right\rfloor \\ &= \sum_^ \left(n_\ell p^ + \cdots + n_ p + n_i\right) \\ &= \sum_^ \sum_^ n_j p^ \\ &= \sum_^ \sum_^ n_j p^ \\ &= \sum_^ n_j \cdot \frac \\ &= \sum_^ n_j \cdot \frac \\ &= \frac \sum_^ \left(n_j p^j - n_j\right) \\ &= \frac \left(n - s_p(n)\right). \end


Applications

Legendre's formula can be used to prove
Kummer's theorem In mathematics, Kummer's theorem is a formula for the exponent of the highest power of a prime number ''p'' that divides a given binomial coefficient. In other words, it gives the ''p''-adic valuation of a binomial coefficient. The theorem is na ...
. As one special case, it can be used to prove that if ''n'' is a positive integer then 4 divides \binom if and only if ''n'' is not a power of 2. It follows from Legendre's formula that the ''p''-adic exponential function has radius of convergence p^.


References

* * , page 77 *
Leonard Eugene Dickson Leonard Eugene Dickson (January 22, 1874 – January 17, 1954) was an American mathematician. He was one of the first American researchers in abstract algebra, in particular the theory of finite Field (mathematics), fields and classical grou ...
, ''
History of the Theory of Numbers ''History of the Theory of Numbers'' is a three-volume work by L. E. Dickson summarizing work in number theory up to about 1920. The style is unusual in that Dickson mostly just lists results by various authors, with little further discussion. T ...
'', Volume 1, Carnegie Institution of Washington, 1919, page 263.


External links

*{{MathWorld, Factorial, Factorial Factorial and binomial topics