How this calculation works
Multiples of p² contribute to both the first and second counts. This is how their two factors of p are recorded.
vₚ(n!) = Σ floor(n/pᵏ)A worked example
25! contains 8 + 2 = 10 factors of 3.
Good to know
The selected divisor must be prime.
Reference: NIST DLMF, Functions of Number Theory (opens in a new tab) ↗
Read the result
Count the multiplicity of a chosen prime in a factorial.
The primary result is labeled “Exponent in n!”. Keep the input definitions in view when comparing this result with another method.
Try a related calculation
The selected divisor must be prime.
For a related exercise, try the greatest common divisor.
A few questions, answered
How can I check the default inputs by hand?
25! contains 8 + 2 = 10 factors of 3.
Which rule does this calculator apply?
vₚ(n!) = Σ floor(n/pᵏ)