Highest prime factor of factorial.

452 Views Asked by At

For a program I wrote, I used the property that the power of the highest prime factor of a factorial is always 1. I couldn't find anything about this, but it felt right. I can't prove it. Is my assumption correct or is it just a coincidence?

1

There are 1 best solutions below

0
On

If p ≤ n is a prime number, then n! = 1 * 2 * ... * p * ... * n has a prime factor p. And no prime number q > n can be a prime factor of n!

Let p be the largest prime ≤ n. n! has a prime factor p. If p^2 were a factor of n!, then there would have to be two or more numbers ≤ n with a factor p. The smallest two such numbers are p and 2p. So if p^2 were a factor of n!, then 2p ≤ n.

We assumed that p is the largest prime ≤ n, so there is no prime number q with p < q ≤ n. But there is a theorem that there is a prime between p and 2p if p ≥ 2.