SMC 2005 Q24
24. The factorial of \(n\), written \(n!\), is defined by \(n! = 1 \times 2 \times 3 \times \ldots \times (n - 2) \times (n - 1) \times n\). For how many positive integer values of \(k\) less than 50 is it impossible to find a value of \(n\) such that \(n!\) ends in exactly \(k\) zeros?
- A 0
- B 5
- C 8
- D 9
- E 10
Senior Mathematical Challenge 2005, Question 24. © UK Mathematics Trust. Original paper on ukmt.org.uk
Answer: D 9
When \(n!\) is written in full, the number of zeros at the end of the number is equal to the power of 5 when \(n!\) is written as the product of prime factors, because there is at least that high a power of 2 available. For example, \(12! = 1 \times 2 \times 3 \times \;\ldots\; \times 12\) \(= 2^{10} \times 3^5 \times 5^2 \times 7 \times 11\).
This may be written as \(2^8 \times 3^5 \times 7 \times 11 \times 10^2\), so \(12!\) ends in 2 zeros, as \(2^8 \times 3^5 \times 7 \times 11\) is not a multiple of 10.
We see that \(24!\) ends in 4 zeros as 5, 10, 15 and 20 all contribute one 5 when \(24!\) is written as the product of prime factors, but \(25!\) ends in 6 zeros because \(25 = 5 \times 5\) and hence contributes two 5s. So there is no value of \(n\) for which \(n!\) ends in 5 zeros.
Similarly, there is no value of \(n\) for which \(n!\) ends in 11 zeros since \(49!\) ends in 10 zeros and \(50!\) ends in 12 zeros. The full set of values of \(k\) less than 50 for which it is impossible to find a value of \(n\) such that \(n!\) ends in \(k\) zeros is 5, 11, 17, 23, 29, 30 (since \(124!\) ends in 28 zeros and \(125!\) ends in 31 zeros), 36, 42, 48.
Solution © UK Mathematics Trust, from the SMC 2005 solutions.