How to get decimal form of largest known prime?

Carl Banks imbosol at aerojockey.invalid
Fri Jun 11 11:35:34 CEST 2004

Daniel Yoo wrote:
> Yikes.  I introduced an order-of-magnitude bug when defining x.  Let
> me recalculate that:
> ###
>>>> x = 2**24036583 - 1
>>>> digits(x)
> 7235733
> ###
> Ok, so there's about 7 million digits in that thing.  Slightly more
> difficult to print out.  *grin*

It's usually easier than that to get an estimate: the number of digits
in 2**n is roughly n/3  (n/3.32192809488736234786 to be exact. :).

CARL BANKS            
"If you believe in yourself, drink your school, stay on drugs, and
don't do milk, you can get work." 
          -- Parody of Mr. T from a Robert Smigel Cartoon

More information about the Python-list mailing list