This problem is about TRAILING 0's: the number of 0's at the end of a large product.
If N = 120, then N! = 120*119*118*....*3*2*1.
Since 10=2*5, EVERY COMBINATION OF 2*5 contained within the prime-factorization of 120! will yield a 0 at the end of the integer representation of 120!.
The prime-factorization of 120! is composed of FAR MORE 2'S than 5's.
Thus, the number of 0's depends on the NUMBER OF 5's contained within 120!.
To count the number of 5's, simply divide increasing POWERS OF 5 into 120.
Every multiple of 5 within 120! provides at least one 5:
\(\frac{120}{5} = 24\) --> 24 5's
Every multiple of \(5^2\) provides a SECOND 5:
\(\frac{120}{5^2} = 4\) --> 4 more 5's
Thus, the total number of 5's contained within 120! = 24+4 = 28
Note that 121!, 122!, 123!, and 124! all contain the same number of 5's as 120!.
For more than 28 5's to be contained within N!, N must be AT LEAST 125, the next greatest multiple of 5 after 120.
Every multiple of 5 within 125! provides at least one 5:
\(\frac{125}{5} = 25\) --> 25 5's
Every multiple of \(5^2\) provides a SECOND 5:
\(\frac{125}{5^2} = 5\) --> 5 more 5's
Every multiple of \(5^3\) provides a THIRD 5:
\(\frac{125}{5^3} = 1\) --> 1 more 5
Thus, the total number of 5's contained within 125! = 25+5+1 = 31
Note that 126!, 127!, 128!, and 129! all contain the same number of 5's as 125!.
Onto the problem:
Bunuel wrote:
What is the value of N?
(1) N! ends with 28 zeroes
(2) (N+2)! ends with 31 zeroes and (N-1)! ends with 28 zeroes
The following cases satisfy both statements:
Case 1: N=123
(123+2)! = 125!, which has 31 5's.
(123-1)! = 122!, which has 28 5's.
Case 2: N=124
(124+2)! = 126!, which has 31 5's.
(124-1)! = 123!, which has 28 5's.
Thus, the two statements combined are INSUFFICIENT.