121! = 1 * 2 * ... * 11 * ... * 22 ... * 33 ... * 44 ... * 55 ... * 66 ... * 77 ... * 88 ... * 99 ... * 110 ... * 121
121! = 1 * 2 * ... * 11 * ... * 2*11 ... * 3*11 ... * 4*11 ... * 5*11 ... * 6*11 ... * 7*11 ... * 8*11 ... * 9*11 ... * 10*11 ... * 11*11
Now we count the number of times 11 appears:
1+1+1+1+1+1+1+1+1+1+2 = 12
12 TIMES
====================
Here's a way to find how many times any prime factor appears in a factorial:
How many times does 3 appear:
121/3 = 40.333 ----> 40 numbers are divisible by 3
121/3² = 13.444 ---> 13 numbers are divisible by 3²
121/3³ = 4.481 -----> 4 numbers are divisible by 3³
121/3⁴ = 1.494 -----> 1 number is divisible by 3⁴
(Last number (1) is < 3 - do not proceed any further)
Number of times prime factor 3 appears: 40+13+4+1 = 58
NOTE: Do not add numbers divisible by 3² twice, since we've already counted one of the factors of 3 with numbers divisible by 3. Do not add numbers divisible by 3³ three times, since we've already counted two of the factors of 3 with numbers divisible by 3 and numbers divisible by 3², ....
--------------------
How many times does 5 appear?
121/5 = 24.2 ----> 24
121/5² = 4.84 ---> 4 (always truncate, never round)
(4.84 < 5 ---> stop)
24 + 4 = 28
--------------------
So using 11, we get:
121/11 = 11
121/11² = 1
11 + 1 = 12
-- ÎαÏÏmÏm --