Legendre's formula

From The Right Wiki
Jump to navigationJump to search

In mathematics, Legendre's formula gives an expression for the exponent of the largest power of a prime p that divides the factorial n!. It is named after Adrien-Marie Legendre. It is also sometimes known as de Polignac's formula, after Alphonse de Polignac.

Statement

For any prime number p and any positive integer n, let νp(n) be the exponent of the largest power of p that divides n (that is, the p-adic valuation of n). Then

νp(n!)=i=1npi,

where x is the floor function. 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 pi>n, one has npi=0. This reduces the infinite sum above to

νp(n!)=i=1Lnpi,

where L=logpn.

Example

For n = 6, one has 6!=720=243251. The exponents ν2(6!)=4,ν3(6!)=2 and ν5(6!)=1 can be computed by Legendre's formula as follows:

ν2(6!)=i=162i=62+64=3+1=4,ν3(6!)=i=163i=63=2,ν5(6!)=i=165i=65=1.

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 {1,2,,n}, of which there are np. Each multiple of p2 contributes an additional factor of p, each multiple of p3 contributes yet another factor of p, etc. Adding up the number of these factors gives the infinite sum for νp(n!).

Alternate form

One may also reformulate Legendre's formula in terms of the base-p expansion of n. Let sp(n) denote the sum of the digits in the base-p expansion of n; then

νp(n!)=nsp(n)p1.

For example, writing n = 6 in binary as 610 = 1102, we have that s2(6)=1+1+0=2 and so

ν2(6!)=6221=4.

Similarly, writing 6 in ternary as 610 = 203, we have that s3(6)=2+0=2 and so

ν3(6!)=6231=2.

Proof

Write n=np++n1p+n0 in base p. Then npi=npi++ni+1p+ni, and therefore

νp(n!)=i=1npi=i=1(npi++ni+1p+ni)=i=1j=injpji=j=1i=1jnjpji=j=1njpj1p1=j=0njpj1p1=1p1j=0(njpjnj)=1p1(nsp(n)).

Applications

Legendre's formula can be used to prove Kummer's theorem. As one special case, it can be used to prove that if n is a positive integer then 4 divides (2nn) 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 p1/(p1).

References

  • Legendre, A. M. (1830), Théorie des Nombres, Paris: Firmin Didot Frères
  • Moll, Victor H. (2012), Numbers and Functions, American Mathematical Society, ISBN 978-0821887950, MR 2963308, page 77
  • Leonard Eugene Dickson, History of the Theory of Numbers, Volume 1, Carnegie Institution of Washington, 1919, page 263.

External links