What is the remainder of $(14^{2010}+1) \div 6$? What is the remainder of $(14^{2010}+1) \div 6$?
Someone showed me a way to do this by finding a pattern, i.e.:
$14^1\div6$ has remainder 2
$14^2\div6$ has remainder 4
$14^3\div6$ has remainder 2
$14^4\div6$ has remainder 4
And it seems that when the power is odd, the answer is 2, and when it's even, the answer is 4.
2010 is even, so the remainder is 4, but we have that +1, so the final remainder is 5. Which is correct.
But this method doesn't seem very concrete to me, and I have a feeling the pattern may not be easy to find (or exist?) for every question. What theorem or algorithm can I use to solve this instead?
 A: $14=0\pmod{2}$ and $14=2\pmod{3}$. Thus, because $2^2=1\pmod{3}$, for any $k>0$, we have
$$
14^k=0\pmod{2}
$$
and
$$
14^k=\left\{\begin{array}{}1\pmod{3}&\text{when }k=0\pmod{2}\\2\pmod{3}&\text{when }k=1\pmod{2}\end{array}\right.
$$
Therefore, for any $k>0$, we have by the Chinese Remainder Theorem,
$$
14^k=\left\{\begin{array}{}4\pmod{6}&\text{when }k=0\pmod{2}\\2\pmod{6}&\text{when }k=1\pmod{2}\end{array}\right.
$$
So, as you surmised, $14^{2010}+1=5\pmod{6}$.
A: To solve this problem, in general, I'd use use two facts:


*

*If $a$ and $n$ are relatively prime, $a^{\phi(n)} \bmod n = 1$. Here $\phi$ is the Euler phi function; when $n$ is prime, $\phi(n) = n-1$. This lets you reduce exponents to ones with power less than $\phi(n)$; for instance
$$2^{2010} \bmod 5 = (2^4)^{502} 2^2 \bmod 5 = 1^{502} 4 \bmod 5 = 4.$$
(Here $2^2$ happened to be trivial to compute by hand; if the exponent were larger I would calculate it using the technique of repeated squaring.)

*Unfortunately 2 and 6 are not relatively prime; in this case I would factor $6$ into primes and use the Chinese remainder theorem:
$$2^{2010} \bmod 3 = (2^2)^{1005} \bmod 3 = 1$$
$$2^{2010} \bmod 2 = 0$$
so applying the Chinese remainder theorem, $2^{2010}$ must be congruent to 4 mod 6.
A: $14\equiv 2\pmod 6$, so $14^{2010}+1\equiv 2^{2010}+1\pmod 6$. Now $2\cdot 2^2=2^3=8\equiv 2\pmod 6$, so $2\cdot (2^2)^k\equiv 2\pmod 6$ for any non-negative integer $k$. This shows that the pattern that you observed is real: $2^{2k+1} \equiv 2\pmod 6$ for any non-negative integer $k$. In particular, $$2^{2010}+1\equiv 2\cdot 2^{2009}+1 \equiv 2\cdot 2+1 \equiv 5\pmod 6\;.$$
The same basic idea can be used in similar problems, though the cycle of the pattern may not be nearly so short. To go much deeper than this kind of analysis, you want to look into the Chinese Remainder Theorem.
A: We may write following equalities :
$14^{2010}=6\cdot k_1+4$
$14^{2010}+1=6\cdot k_2+r$
$6\cdot k_1+4+1=6\cdot k_2+r\Rightarrow 6k_1+5=6k_2+r$
The last equality is true only if $k_1=k_2$ and $r=5$
A: HINT $\rm\quad (m,n) = 1,\ m\:|\:a,\ n\:|\:a+1\ \ \Rightarrow\ \ a^{2\:k}\ \equiv\ m\:(m^{-1}\ mod\ n)\ \pmod{mn}\ $ by CRT.
Therefore for $\rm\:m,n,a\ =\ 2,3,14\:$ we infer $\rm\: 14^{\:2\:k} \equiv\: 2\ (2^{-1}\ mod\ 3)\equiv -2\pmod 6$
