A googol is a very large number. It is the value of 10 raised to the power of 100, or the digit ‘1’ followed by 100 0’s.

Factorials (which is represented with the exclamation mark!) are a way of producing very large numbers. A factorial of a number is the result of multiplying all preceding values together.

For example 4! = 1 x 2 x 3 x 4 = 24.

70! is approximately (but not exactly) one googol – so you can see how quickly factorials can become very big!

What is the smallest number for ‘n’ where n! has a googol as a factor.

Or put another way, what is the lowest factorial that ends with 100 0’s?

Thanks Brent for your submission.

Warning: Use of undefined constant bfa_comments - assumed 'bfa_comments' (this will throw an Error in a future version of PHP) in/home/customer/www/riddledude.com/public_html/wp-content/themes/atahualpa/comments.phpon line132405

Sanjay is today’s winner!! This was a hard one.

405! Is the lowest factorial that ends in 100 0’s. For any integer, the number of trailing 0’s can be found by the number of times 5 & 2 are factors in the number. When looking at a factorial, such as 10! = 1 x 2 x 3 x 4 x 5 x 6 x 7 x 8 x 9 x 10 = 3628800 There are lots of 2’s as factors (2 has one, 4 has 2, 6 has 1, 8 has 3, 10 has two, etc.) so it’s really the number of times 5 appears as a factor that will determine the number of trialing 0’s in a factorial. In the 10! example, 5 and 10 each represent one 5 as a factor in 10! so two trailing 0’s. 15! to 19! would each have 3 trailing 0’s, 20! to 24! would each have 4 trailing 0’s 25! to 29! would each have 6 trailing 0’s – note that 25 has five as a factor twice, so we get an extra trailing 0 for factorials above 25. Similarly 125 has 3 5’s as factors. So to answer the riddle. in order to have 100 0’s. the following needs to be solved. 100 = int(n/5) + int(n/25) + int(n/125) + int(n/625) The 1st two terms add up to 24 0’s for n=100. So one can assume n=400 should be close to the solution. int(400/5) + int(400/25) + int(400/125) = 80+16+3 = 99 trailing 0’s. To get 100 trailing 0’s, we would therefor need a value for n that has one more 5 as a factor, so 405! is divisible by a googol.