1

Prove that the prime number $p = 2^{216091} - 1$ has the last three digits equal to 447.

I have this answer below, but I cannot fully understand the reason for the two congruences made: the module 8 and the module 125. Additionally, I don't understand why we are looking for the remainder of the division of $2^{91} - 1$ by 125, and not the remainder of the division of $2^{216091} - 1$ by 125. Furthermore, why the division by 125? Can you explain to me in more detail? are there other methods?

Solution:

Searching for the last three digits means looking for congruence modulo 1000. Now, $1000 = 2^3 \times 5^3$. It is known that $p$ is definitely congruent to $-1$ modulo 8, and using Fermat's Little Theorem, it is known that $2^{\phi(125)}$, i.e., $2^{100}$, is congruent to $1 \mod 125$. Therefore, it suffices to find the remainder of the division of $2^{91} - 1$ by 125.

To understand how much $2^{91} - 1$ is, it can be decomposed, for example, as $(2^7)^{13} - 1$, remembering that $2^7$ is congruent to $3 \mod 125$. Therefore, the remainder is the same as $3^{13} - 1$, i.e., $3^3 \times (3^5)^2 - 1 = 27 \times (-7)^2 - 1 = 1322 = 72 \mod 125$ (equals are actually congruences).

At this point, it is necessary to find a number that, when divided by 125, leaves a remainder of 72 and, when divided by 8, leaves a remainder of 7. This can be done with the Chinese Remainder Theorem, or more straightforwardly, with 7 attempts by trying various $72 + 125k$ (where $k$ is a natural number) to see which one leaves a remainder of 7 in the division by 8. The only one is 447.

Arthur
  • 199,419
emacos
  • 249
  • https://math.stackexchange.com/questions/81228/modular-exponentiation-by-hand-ab-bmod-c has quite a few pointers that might help you. – Arthur Jan 24 '24 at 10:48
  • We already have hundreds of answers showing how to do this, e.g. see the linked dupes. – Bill Dubuque Jan 24 '24 at 20:31

1 Answers1

1

$$2^{216091}=2^{2160\cdot 100 + 91}=2^{91}\cdot 2^{2160\cdot\phi(125)}$$

But $2^{\phi(125)}\equiv 1\mod 125$ due to Euler's Theorem.

Thus $2^{\phi(125)k}=(2^{\phi(125)})^{k}\equiv 1^{k}\mod 125\equiv 1\mod 125$

Thus $2^{216091}\equiv 2^{91}\cdot 1\mod 125\equiv 1\mod 125$

Thus, it suffices to consider $2^{91}\mod 125$

You have to find the last three digits of a number, so you have to consider the remainder when divided by $1000$.

Now $1000=5^{3}\cdot 2^{3}$. By the Chinese Remainder Theorem, you need to find the remainders modulo $2^{3}$ and $5^{3}$.

Then you can solve the pair of congruences $x\equiv k_{1}\mod 125$ and $x\equiv k_{2}\mod 8$ and due to the Chinese Remainder theorem, $2^{215091}\equiv x\mod 1000$

The Chinese Remainder Theorem only works then you factor $N$ into coprimes $m,n$ and individually find the residues modulo the factors. Then you can solve the system of equivalences and the solution you will get will be the residue when divided by $N$. See the Wiki article I linked for more info.

Now after you get the two equivalences, you can use Euler's Division Algorithm or several other ways (including hit and trial) to solve it and get your answer.

For example, you get $x\equiv 72\mod 125$ and $x\equiv 7\mod 8$.

So let $x=125k+72$ . Substitute this into the second equivalence, and you get $125k+72\equiv 7\mod 8$ .

But $72=0\mod 8$ and $125=5\mod 8$, and so you get $5k\equiv 7\mod 8$.

Now $5k=8k-3k\mod 8=-3k\mod 8$ and hence $-3k\equiv -1\mod 8$ and hence $3k\equiv 1\mod 8=9\mod 8$ which gives that $k=3\mod 8$.

Thus, $k=8m+3$ for some $m$.

Substitute back into the expression of $x$ to get $x=72+125(8m+3)=72+375+1000m=447+1000m$ which tells you that after dividing by $1000$, you should get $447$ as the remainder (and hence the last three digits).