Reducing $2018^{2018}\pmod6$ via $\mod2$ and $\mod3$

401 Views Asked by At

I've been tasked to reduce $$2018^{2018}\pmod6$$using the results of reducing$$2018^{2018}\pmod2$$and $$2018^{2018}\pmod3$$


I have deduced that $$2018^{2018}\equiv0\pmod2$$and $$2018^{2018}\equiv1\pmod3$$but I don't see a way to combine these two congruences into one $\mod6$ congruence. Could someone tell me how this is achieved? I have a feeling the answer is really simple, but I just don't see it. Is there also a more generalized strategy of solving modular congruences via the divisors of the modulo number($2$ and $3$ are divisors of $6$)?


The way I have currently solved this problem is to first reduce $$2018^{2018}\pmod6$$ to $$2^{2018}\pmod6$$Then we look for patterns:$$\begin{align}2^1&\equiv2\pmod6\\2^2&\equiv4\pmod6\\2^3&\equiv2\pmod6\\2^4&\equiv4\pmod6\\&\ \ .\\&\ \ .\\&\ \ .\\2^n&\equiv\begin{cases}4&\text{if }n\equiv0\pmod2\\2&\text{if }n\equiv1\pmod2\end{cases}\pmod6\end{align}$$for $n\in\Bbb N$. In the case of $2018^{2018}$, $2018\equiv0\pmod2$, so $$2018^{2018}\equiv2^{2018}\equiv4\pmod6$$

4

There are 4 best solutions below

0
On

Take $x=2018^{2018}$. The Chinese Remainder theorem tells us that given that 2 and 3 are coprime. Then the system $$\begin{cases} x = 0\ (mod\ 2)\\ x = 1\ (mod\ 3)\\ \end{cases}$$ has an unique solution $mod(2*3) = mod(6)$. Note that you can easily check that 4 is the only number that is congruent to $0\ (mod\ 2)$ and $1\ (mod\ 3)$ (between 0 and 5). Therefore, that is the unique solution.

2
On

The Chinese remainder theorem states that, for these congruence equations:

$$ x\equiv 0 \pmod 2\\ x\equiv1\pmod 3 $$

Then different solutions of $x$ are congruent mod $6$, that is, $x_1 \equiv x_2 \pmod 6$.

You have calculated $2018^{2018} \bmod 2$ and $2018^{2018} \bmod 3$, and know that $x_1 = 2018^{2018}$ is a solution.

By trial and error for all the integers $0,1, \cdots, 6-1$, or by direct construction, $x_2 = 4$ is another solution. So

$$2018^{2018} \equiv 4 \pmod 6$$

0
On

I have deduced that $2018^{2018}\equiv0\pmod2$ and $2018^{2018}\equiv1\pmod3$, but I don't see a way to combine these two congruences into one $\bmod6$ congruence

One way that works in this situation

(besides trial and error and construction, which others have mentioned)

is to note that this is the constant case of the Chinese remainder theorem:

$x\equiv0\bmod2$ and $x\equiv1\bmod3 \iff x\equiv-2\bmod2$ and $x\equiv-2\bmod3$

$\iff x\equiv-2\bmod6 \iff x\equiv4\bmod6$.

0
On

Let $x=2018^{2018},$ then

$$ \qquad\qquad x\equiv (-1)^{2018}\equiv 1 \quad \pmod 3 \tag*{(1)}$$ $$ x\equiv 0 \quad \pmod 2 \tag*{(2)} $$ From $(1)$, we have $(*):x=3m+1$ for some integer $m$. Then putting $x$ into $(2)$ yields $$ \begin{aligned} & \quad 3m+1\equiv 0 \quad \pmod 2\\\Leftrightarrow & \quad m\equiv 1 \quad \pmod 2 \\\Leftrightarrow & \quad m=2n+1 \textrm{ for some integer }n \end{aligned}$$ Putting back to (*) conclude that $$x=3(2n+1)+1\equiv 4 \quad \pmod 6.$$