2

In this book, "A Course In Algebra" the author Vinberg makes this deduction without any explanation and I was wondering if anyone could help me understand it:

Since $2^{100} \equiv 1 \pmod {125}$ and $2^{100}$ is divisible by $8$, we deduce that $2^{100} \equiv 376 \pmod {1000}$ i.e., that the decimal representation of $2^{100}$ ends with $376$.

Thanks.

Sil
  • 16,612
Hoji
  • 574
  • 1
    So $2^{100}\equiv1\pmod{125}$ and $2^{100}\equiv0\pmod8$. Do you know the Chinese remainder theorem? – J. W. Tanner Sep 24 '20 at 18:43
  • $2^{100}=1+125k\equiv1+45k\equiv1+5k\equiv0\pmod{8}$ so $k \equiv \frac{-1}{5}\equiv\frac{15}{5}\equiv3 \pmod{8}$ and therefore $2^{100}=1+125(3+8k')=376+1000k'\equiv376 \pmod{1000}$ – Evariste Sep 24 '20 at 18:47
  • 1
    I added an answer which shows an easy general method, and added a comment on Duncan's answer which explains how they are related. There are many prior answers on this topic. They can be located by searching (on site or with web search engines constrained to this site). – Bill Dubuque Sep 24 '20 at 20:12

4 Answers4

3

Without using the CRT (well, without explicitly using it) there are 8 numbers between 0 and 999 that are $1 \mod 125$: $1, 126, 251, 376, 501, 626, 751, 876$. It's easy to see that of these, the only one that is divisible by $8$ is $376$. Because the integers from $0$ to $999$ inclusive represent every congruency class $\mod 1000$, we must have that $2^{100} \equiv 376 \mod 1000$.

Duncan Ramage
  • 6,928
  • 1
  • 20
  • 38
  • 1
    i.e. $\bmod 8!:\ 0\equiv x\equiv 1!+!125k\equiv 1!-!3k\iff 3k\equiv 1\equiv 9\iff k\equiv 3,,$ which is the same as the Easy CRT formula in my answer, or the same as $ $ Inverse Reciprocity $ $ here and here. The only difference is that instead of using algebra to solve for $,k,$ you are simply brute-force checking all $8$ possibilities - which works fine for tiny moduli but will not be feasible for larger moduli. – Bill Dubuque Sep 24 '20 at 20:11
1

Well $1000=8\times 125$

Suppose $2^{100}=1000n+m$ where $0\le m \lt 1000$

If we take this equation modulo $125$ we get $1\equiv m$ so that $m=125p+1$

If we take the equation modulo $8$ we get $0\equiv m$ so that $m$ is a multiple of $8$

[Note how, because $8$ and $125$ are divisors of $1000$, the term in $n$ gets eliminated, isolating the term in $m$]

Now the Chinese Remainder Theorem guarantees a solution for $m$ here and tells you how to find one in the general case. But in this case it is just as easy to test $p=0,1,2,3 \dots$ and see which gives a value of $m$ which is a multiple of $8$.

So we get $1, 126, 251, 376, 501, 626, 751, 876$ as the possibles, and $376$ is the one we want.

Therefore $2^{100}=1000n+376$ and this gives you the final three decimal digits.

Once you understand what is going on here, you will find it quite easy to do similar problems. And you won't need to write down all the details to get there.

Mark Bennet
  • 100,194
1

$\color{#0a0}{8\mid 2^{100}}\Rightarrow 2^{100}\bmod{8\cdot 125} = 8\left[\color{#0a0}{\dfrac{2^{100}}8}\bmod 125\right]\!= 8[\color{#c00}{47}] = 376,\,$ by mod distributive law,
where we calculated: $\bmod 125\!:\ \color{#0a0}{\dfrac{1^{\phantom{|^|}}\!\!\!}{8}}\equiv \dfrac{\color{#90f}{-124}}{\color{#90f}4\cdot2}\equiv\dfrac{\color{#90f}{-31}}2\equiv \dfrac{94}2\equiv \color{#c00}{47},\,$ by mod division by $2$.


Or $\ \color{#0a0}{\dfrac{1}{8}}\equiv \dfrac{1\!+\!125(\color{darkorange}3)}{8}\equiv\color{#c00}{47}\,$ by $\bmod 8\!:\ 0\equiv 1\!+\!125\color{darkorange}j\equiv 1\!-\!3j\!\iff\! 3j\equiv 1\equiv 9\!\iff\! \color{darkorange}{j\equiv 3}\,$ using inverse reciprocity to compute an congruent numerator that makes the quotient exact.


Alternatively by the Easy CRT formula for the Chinese Remainder solution we have $$\begin{align}&x\equiv \color{#0a0}0\!\!\!\pmod{\!8}\\ &x\equiv \color{#c00}1\!\!\!\pmod{\!125}\\[.2em] \iff\ &x\equiv \color{#c00}1\!+\!125\left[\dfrac{\color{#0a0}0\!-\!\color{#c00}1}{\!\color{#90f}{125}}\!\bmod{8}\right]\equiv\, 1+125\,[\color{darkorange}3]\equiv 376\end{align}\qquad\quad$$

using the fraction calculation $\!\bmod 8\!:\ \dfrac{-1}{\color{#90f}{125}}\equiv \dfrac{-1}{-3}\equiv \dfrac{1}{3}\equiv\dfrac{9}3\equiv\color{darkorange}3$

Note $ $ If we swapped the moduli in the CRT formula we'd need to compute $\,8\left[\dfrac{\color{#c00}1\!-\!\color{#0a0}0}{8}\bmod 125\right]\!,\,$ the same as above using MDL = mod distributive law. As explained in the linked post on MDL, it is an equivalent operational form of CRT. The two ways are related by inverse reciprocity as above.


Beware $ $ Modular fractions $\,a/b := ab^{-1}$ are well-defined only for fractions whose denominator $\,b\,$ is coprime to the modulus. See here for further discussion, and see here and here for many ways to calculate modular fractions and inverses.

Bill Dubuque
  • 272,048
0

I was also reading this chapter of the book by Vinberg today, and got stuck by this question. This is my first time systemically studying algebra. I will post my solution without using the Chinese Remainder Theorem, but I am not entirely sure if my method makes sense for mathematicians. If anyone find anything mistaken, please correct me.

The goal is to prove the following identity:

$$2^{100}\equiv 376\,\,\,\,(\mathrm{mod}\,\,1000)$$

Using the fact that $2^{100}=8\cdot M$, where $M\in\mathbb{Z}$ is some very large integer, this is equivalent to the following statement:

$\exists k\in\mathbb{Z}$, such that $8\cdot(M-47)=8\cdot 125\cdot k.$

The author already proved the identity

$$2^{100}\equiv 376\,\,\,\,(\mathrm{mod}\,\,125)$$

So $\exists l\in\mathbb{Z}$ such that $8\cdot(M-47)=125\cdot l$. Now if we show $l=8k$, we are done. But from this equation, one has

$$M-47=125\cdot\frac{l}{8}=15\cdot l+\frac{5}{8}\cdot l.$$

This has solution iff $l$ is a multiple of $8$. This mean the integer $k$ indeed exists.

Valac
  • 507
  • 2
  • 12
  • No, the goal is not to check the truth of $,2^{100}\equiv 376\pmod{!1000}$ as you claim. Rather it is to deduce the solution $,x = 376,$ of $,x = 2^{100}\bmod 1000,,$ given $2^{100}\equiv 1\pmod{125}.,$ We cannot use the solution $376$ as you do when we are meant to deduce it. – Bill Dubuque Apr 05 '23 at 19:41