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?


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

  • $\begingroup$ Why is $2\cdot (2^2)^k\equiv 2\pmod 6$? $\endgroup$ – user103816 Jul 29 '15 at 15:51
  • $\begingroup$ Also why is $2^{2009}+1 \equiv 2\cdot 2+1$? $\endgroup$ – user103816 Jul 29 '15 at 16:05
  • $\begingroup$ @user103816: The first follows by induction on $k$: it’s true for $k=1$, and if it’s true for $k$, then $2\cdot(2^2)^{k+1}=\left(2\cdot(2^2)^k\right)\cdot2^2\equiv 2\cdot 2^2\equiv 2\pmod6$, so it’s true for $k+1$. It doesn’t say that $2^{2009}+1\equiv 2\cdot2+1\pmod6$; it says that $2\cdot2^{2009}+1\equiv 2\cdot2+1\pmod6$, which is true because $2^{2009}=2^{2\cdot 1004+1}\equiv 2\pmod6$. $\endgroup$ – Brian M. Scott Jul 29 '15 at 16:58
  • $\begingroup$ I don't get it. How is $2\cdot(2^2)^{k+1}=\left(2\cdot(2^2)^k\right)\cdot2^2\equiv 2\cdot 2^2\equiv 2\pmod6$? and how is $2^{2009}=2^{2\cdot 1004+1}\equiv 2\pmod6$? $\endgroup$ – user103816 Jul 30 '15 at 9:21
  • $\begingroup$ @user103816: You’ll have to be more explicit, I’m afraid. Every step there is explained either in the original answer or in my previous comment, so I can’t tell exactly what part(s) you’re not understanding. $\endgroup$ – Brian M. Scott Jul 30 '15 at 20:58

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


To solve this problem, in general, I'd use use two facts:

  1. 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.)

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


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$

  • 1
    $\begingroup$ Please excuse my ignorance, but it looks to me like you assumed that $14^{2010} = 4 \mod 6$, and then use this to 'prove' that $14^{2010} + 1 = 5 \mod 6$. How do you justify the first equality given $k_1$ is an integer? $\endgroup$ – tom Nov 6 '11 at 9:01
  • $\begingroup$ @tom,read carefully text of the question... $\endgroup$ – Peđa Terzić Nov 6 '11 at 10:03

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$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.