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.