Forgive my ignorance but; In reading the Lucas Wiman Mersenne Prime FAQ I became confused at the Q5.3 instruction. (see FAQ insert below).
I want to know how many decimal digits are in a given MP. This part of the FAQ does not make sense to me. Specifically; First off this question seems to ask 10,000,000 exponents. It must mean 10,000,000 digits. The answer given below, M33219278, by my calculations, has less than 10,000,000 digits. The questions below ask "How many digits are in a given Mp?" and "What is the smallest Mp with a given number of digits?" The explanation does not seem to answer that question. 33,219,278/3.321928094887 = 9,999,999.11230167668 and 33,219,279/3.321928094887 = 9,999,999.41333167235 and 33,219,280/3.321928094887 = 9,999,999.71436166801 and 33,219,281/3.321928094887 = 10,000,000.0153916636 This number 33,219,281 seems, from the explanation below, to be the first Mp to have 10,000,000 decimal digits. Can I depend on this? This would seem to make the answer 33,219,278 the third highest Mp with less than 10,000,000 digits. I need a formula that will definitely give the exact number of decimal digits in a Mp or Mersenne prime Mp. Can you help? Thanks Dan =========================================================================== >Q5.3: What is the smallest Mersenne number with 10,000,000 exponents? >How many digits are in a given Mp? What is the smallest Mp with a given >number of digits? >A: M33219278. We can think derive a formula like this: >d is the number of decimal digits we want. >10^(d-1)-1 is the largest number with d-1 digits, therefore we want the >smallest number in the form 2^n-1 greater than 10^(d-1)-1. >2^n-1 > 10^(d-1)-1 >2^n > 10^(d-1) >n > log_2(10^(d-1)) >n > (d-1)*log_2(10) >so the smallest Mersenne number with d digits is the smallest integer >greater than or equal to (d-1)*log_2(10) >(log_2(10)) is about 3.321928094887) >we can work similarly to come up with how many digits are in a Mersenne >number: >10^(d-1)-1 < 2^n-1 <= 10^d-1 >10^(d-1) < 2^n <= 10^d >log_2(10^(d-1)) < n <= log_2(10^d) >(d-1)*log_2(10) < n <= d*log_2(10) >d-1 < n/log_2(10) <= d >2^n-1 has d digits. This is plain since 10^(d-1)-1 is the largest number >with d-1 digits, and 10^d-1 is the largest number with d digits. >Hence, d is the least integer greater than or equal to n/log_2(10). >Note, the above is actually true irrespective of the numerical valu>e >of the symbol "2" or the symbol "10" - i.e. replace "2" by "3", or "10" >by "16" in the arguments above, and they still work. >(thank you Ken Kriesel, and Brian Beesley) =========================================================================== _________________________________________________________________________ Unsubscribe & list info -- http://www.scruz.net/~luke/signup.htm Mersenne Prime FAQ -- http://www.tasam.com/~lrwiman/FAQ-mers
