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

 Myriad Factorial Digit (Posted on 2011-10-01)
Reading right to left, determine the 2500th digit of 10000!

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

 No Solution Yet Submitted by K Sengupta No Rating

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

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      362880020      243290200817664000030      26525285981219105863630848000000040      81591528324789773434561126959611589427200000000050      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

 Search: Search body:
Forums (0)