Legendre's formula
Legendre's formula
Main page

Legendre's formula

logo
Community Hub0 subscribers

Legendre's formula

logo
Community Hub0 subscribers
What are your thoughts?
Be the first to start a discussion here.
Be the first to start a discussion here.
Legendre's formula

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.

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

where 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 , one has . This reduces the infinite sum above to

where .

For n = 6, one has . The exponents and can be computed by Legendre's formula as follows:

Since is the product of the integers 1 through n, we obtain at least one factor of p in for each multiple of p in , of which there are . Each multiple of contributes an additional factor of p, each multiple of contributes yet another factor of p, etc. Adding up the number of these factors gives the infinite sum for .

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

For example, writing n = 6 in binary as 610 = 1102, we have that and so

See all
User Avatar
No comments yet.