3
$\begingroup$

Mersenne prime numbers are prime numbers of the form $2^n - 1 \,(\mathbb{N}\ni n>1)$such as $2^2 -1$ or $2^{25964951}-1$: How many digits does the latter have?

I found this here:

$$\log_{10}(2^{25964951}-1)+1 = 7 816 230$$

Is this the way how to proof this or do I have to do something other?

$\endgroup$
3
  • $\begingroup$ The integer part of the log base 10 is 1 less than the number of digits in base 10. $\endgroup$ Jan 27, 2021 at 10:07
  • $\begingroup$ This is not a proof, as you don't explain how you obtained this result, so no one is able to reproduce your work. $\endgroup$
    – user65203
    Jan 27, 2021 at 10:07
  • 1
    $\begingroup$ It is considered a calculation, not a proof. You might consider proving for a general natural number the statement: The integer part of the log base 10 of n is 1 less than the number of digits in base 10 representation of n. $\endgroup$ Jan 27, 2021 at 10:09

2 Answers 2

2
$\begingroup$

Taking the 10-logarithm is basically the easiest way to do it. Remember to always round down, no matter what the decimal part is (for instance, $\log_{10}(99)+1\approx2.996$, and we want the answer to be $2$).

However, if all you have is a classic calculator that won't work with such large numbers, or you want to get an approximate answer with just mental calculations, some more manipulations must be done first.

Start with noting that $2^{25\,964\,951}-1$ and $2^{25\,964\,951}$ have the same number of digits. From there, we know that $$ \log_{10}(2^{25\,964\,951})={25\,964\,951}\cdot\log_{10}(2) $$ And then either let the calculator do the work, or if you go the mental route, know that $\log_{10}(2)\approx 0.3$ (from $2^{10}\approx 10^3$) and just get $$ {25\,964\,951}\cdot\log_{10}(2)\approx 7\,800\,000 $$ For the mental calculation, adding 1 here (although it's technically what you're supposed to do) makes no sense in my opinion.

$\endgroup$
3
  • $\begingroup$ The approximation $\log_{10}(2)\approx 0.30103$ is easy to remember and gives the exact number of digits in this case. $\endgroup$
    – lhf
    Jan 27, 2021 at 10:38
  • 1
    $\begingroup$ @lhf If you can do ${25\,964\,951}\cdot 0.30103$ in your head, you're welcome to do that, of course. If you have a calculator, then it's likely just as easy to simply type log 2. $\endgroup$
    – Arthur
    Jan 27, 2021 at 10:56
  • $\begingroup$ Fair point!.... $\endgroup$
    – lhf
    Jan 27, 2021 at 11:53
1
$\begingroup$

Firstly, we have to make sure that there are no positive integer value of $n$ such that:

$$2^{25 964 951} = 10^n$$

Cause if $2^{25 964 951}$ is equal $10...0$ then after minus $1$, number of digits will be different.

And that's true, cause: $$log_{10}(2^{25 964 951}) = n$$ $$25964951\times log_{10}(2) = n$$

And $n$ will not be an integer.

So, $2^{25 964 951}$ and $2^{25 964 951} - 1$ have the same number of digits.

With the equation above, $n \approx 7816229$.

Then adding $1$, we have the results.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .