View Single Post
Old 2009-10-31, 17:20   #3
kokakola
 
Oct 2009

3 Posts
Default

Quote:
Originally Posted by Mini-Geek View Post
(with p being the exponent, the p in 2^p-1) The exact number is int(log_10(2^p)+1) = int(log_10(2)*p+1), which is roughly 0.3*p. Your example has exactly 14449440 (14.4 million) digits.
http://mersenne-aries.sili.net/digits.php calculates log_10(2^N), or the reverse (enter the digits to find the bits).
int(n) means the integer part of n. (e.g. int(4.8)=int(4.2)=int(4)=4)
log_10(2) is the base 10 logarithm of 2. (i.e. 10^(log_10(2))=2; it's about 0.3)
Thank you! Your formula is exactly what I was looking for.
kokakola is offline