![]() |
|
|
#1 |
|
Oct 2009
112 Posts |
If I'm working on an LL test of N = 2^48,000,000 - 1, for example, is there any way for me to find how many digits N has?
Thanks! |
|
|
|
|
#2 |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
10000101010112 Posts |
(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) Last fiddled with by Mini-Geek on 2009-10-31 at 17:03 |
|
|
|
|
#3 | |
|
Oct 2009
3 Posts |
Quote:
|
|
|
|
|
|
#4 |
|
Nov 2003
746010 Posts |
|
|
|
|
|
#5 |
|
Aug 2006
3×1,993 Posts |
|
|
|
|
|
#6 |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17·251 Posts |
True, but being able to connect the dots to realize that the exact formula for the number of digits in a number of the form 2^p-1 is int(log_10(2)*p+1) is not exactly what you learn when learning basic logarithms. Basic logarithmic theory would suggest that it's about log_10(2^p)=log_10(2)*p, but to recognize the problem as related to logarithms and rederive the exact formula would be a bit more difficult than you all seem to imply. And this is all assuming the OP has even learned logarithms.
|
|
|
|
|
#7 | |
|
Aug 2006
3·1,993 Posts |
Quote:
|
|
|
|
|
|
#8 |
|
Oct 2009
3 Posts |
|
|
|
|
|
#9 |
|
Oct 2008
n00bville
23·7·13 Posts |
There is somewhere in the forum a Windows program which calculates the exact value ... search for it
|
|
|
|
|
#10 |
|
Aug 2006
3·1,993 Posts |
|
|
|
|
|
#11 | |
|
Nov 2003
22×5×373 Posts |
Quote:
IN CLASS in the 8th grade. i.e. the last year BEFORE high school. Solving 2^x = 10^z is fundamental! It is totally trivial. Last fiddled with by R.D. Silverman on 2009-11-01 at 21:57 Reason: typo |
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sum of Digits | davar55 | Puzzles | 36 | 2015-12-18 15:47 |
| 15M Digits - Just For Fun | storm5510 | Math | 7 | 2009-09-08 04:14 |
| All 10 Digits | davar55 | Puzzles | 5 | 2007-06-18 15:06 |
| 140+ digits which is better | marthamm | GMP-ECM | 4 | 2006-01-25 17:32 |
| Exponential Digits | ndpowell | Math | 18 | 2005-07-15 22:31 |