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

Home > Numbers
Talking BIG (Posted on 2017-11-10) Difficulty: 3 of 5
The number (10^(666))! where 666 is the beast number and "!" denotes a factorial is called Leviathan Number.

Given that this number has approximately 6.656×10^(668) decimal digits, evaluate the number of its trailing zeros.

No Solution Yet Submitted by Ady TZIDON    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution | Comment 2 of 3 |
In the defining factors that make up (10^666)!, i.e., 1, 2, 3, ... , 10^666-2, 10^666-1, 10^666: 

Each multiple of 5 contributes a zero
Each multiple of 25 contributes a second zero
Each multiple of 5^3 contributes a third zero
...
Each multiple of 5^n contributes an nth zero

The number (10^666)! has as its defining factors 10^666 / 5 multiples of 5. 10^666 / 25 are multiples of 25, etc.

The last contribution is made by 5^952; that is 5^952 itself as 666/log(5)=952.83058767688. 10^666/5^952 is approximately 3.807, so there are only three multiples of this power present as defining factors in the factorial. The division by the next power of 5 is less than 1, so its floor function is zero.

So the number of trailing zeros would seem to be 10^666*(1/5 + 1/25 + ... )

However, not only is 10^666 not divisible by 5^952, as there's a remainder on that last division, but somewhere along the line (starting at 5^667, actually) there are previous powers of 5 that leave remainders in the division. So a simple geometric series formula won't work.

Use of UBASIC leaves errors during the divisions, where we need to take the floor of the division of 10^666 / 5^n. The INT function (floor function) is sensitive to the accuracy.

Mintoris basic on the Android cell phone allows as much precision as needed and indeed is faster than UBASIC interpreted under DOSBOX.

The Mintoris basic program

Open 2,"leviathan.txt","w"
nmrtr$=bigpow$("10",666)
tot$="0"
Print nmrtr$
for i=1 to 952
  tot$=BigFloor$(BigAdd$(tot$,BigDiv$(nmrtr$,BigPow$("5",i),1000)))
next
print tot$
Writeln 2,tot$
Close 2


performs the sum, finding

24999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999999999999999999999999999999999999999999999999999999999999
99999999999999999999999857

I've split the number into groups of 80 digits so this number is 8*80+26=666 digits long. It's 2.5 * 10^665 - 143.


25 * 10^664 - 143 trailing zeros.



  Posted by Charlie on 2017-11-10 11:02:25
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 (0)
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