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$$
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.