All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Myriad Factorial Digit (Posted on 2011-10-01) Difficulty: 3 of 5
Reading right to left, determine the 2500th digit of 10000!

*** For an extra challenge, solve this puzzle without the aid of a computer program.

See The Solution Submitted by K Sengupta    
Rating: 1.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution now for the computer solution to the right problem | Comment 3 of 7 |

  5   F=1:P=10^250
 10   for I=1 to 10000
 20   F=(F*I)@P
 25   while F @ 10=0
 26      F=F\10:inc ZeroCt
 27   wend
 30   next
 40   print F,ZeroCt

produces

 4323189708690304003013259514767742375161588409158380591516735045191311781939434
28482922272304061422582078027829148070426761629302539228321084917759984200595105
31216473181840949313980044407284732590260916973099815385393903128087882390294800
1579008          2499

indicating that before the terminal 2499 zeroes, the previous digit is an 8.

I think the problem with taking the last non-zero digit of 10000! as being that of (10!)^(1000) is that in subsequent decades different numbers of multiples of 2 and of 5 go into the zeros rather than contributing to the last non-zero digit.

As an example, take this table of factorials:

10      3628800
20      2432902008176640000
30      265252859812191058636308480000000
40      815915283247897734345611269596115894272000000000
50      30414093201713378043612608166064768844377641568960512000000000000

The last non-zero digit of 30! is not the 2 that you would expect, as the last non-zero digit of (10!)^3.


  Posted by Charlie on 2011-10-02 14:09:04
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (23)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information