0

if $n>1$ odd number,find $$2^n\equiv ?\pmod {12}$$

it seem the answer is $8$,because $$2^3=8\equiv 8\pmod{12}$$ $$2^5=32\equiv 8\pmod {12}$$ $$2^7=128\equiv 8\pmod {12}$$ $$2^9=512\equiv 8\pmod {12}$$ $$\cdots $$ But How to prove it for all postive integers $n$?

math110
  • 93,304

5 Answers5

4

To be precise, we want to prove that if $n$ is an odd number $\geq 3$, then $$2^n\equiv 8\pmod{12}.$$ Since you've verify the initial case $n=3$, we assume if $k\geq3$ is an odd number and $2^k\equiv 8\pmod{12}$ holds, then $$2^{k+2}\equiv 8\times 4\equiv 32\equiv 8\pmod{12}$$ holds as well. Hence we completed the proof by induction.

kelvin hong 方
  • 1,867
  • 7
  • 17
  • 1
    For quite a while I was trying to do this without induction, but this really is nice, short, and sweet. – Randall Jan 19 '19 at 04:01
  • @Randall We can reduce the induction to the triviality $,1^n\equiv 1,$ by factoring out $4$ (or $8)$ as I explain in my answer and its comments. Using this mod distributivity often simplifies modular arithmetic (it can be viewed as an operational form of CRT more amenable to computation). – Bill Dubuque Jan 19 '19 at 14:09
2

$8\cdot 4^{\large n}\!\bmod 12\, =\, 4(2\cdot 4^{\large n}\! \bmod 3)\, =\, 4(2)$

Bill Dubuque
  • 272,048
  • $\large {\rm By}\ \ ab\bmod ac = a(b\bmod c) = $ mod Distributive Law, and 4 = 1 (mod 3) $\ \ $ – Bill Dubuque Jan 19 '19 at 05:44
  • Or $,\large 8\cdot 4^{\large n}!\bmod 24, =, 8(\color{#c00}4^{\large n}! \bmod 3), =, 8(1),$ more generally, by $,\large \color{#c00}4^n\equiv \color{#c00}1^n\equiv 1\pmod{!3}.\ $ Notice that factoring out the $,8,$ simplifies the induction to a completely trivial instance: $,,\large 1^n\equiv 1\ \ $ – Bill Dubuque Jan 19 '19 at 14:12
0

You can prove it with the Chinese remainder theorem: $12=2^2\cdot3$.

We have $2^n\cong0\pmod{2^2}$, and$2^n\cong2\pmod3$ ( since by Fermat's little theorem, $2^2\cong1\pmod3$).

Using Bezout's identity, $1\cdot2^2-1\cdot 3=1$, we get $2\cdot1\cdot2^2+0\cdot1\cdot 3=8$, as our solution.

0

We first calculate $$2^n \mod{3}, 2^n \mod{4}$$ and then combine the results with Chinese Remainder Theorem.

Both should be easy to calculate. Writing n=2k+1, $$2^{2k+1} \equiv {-1}^{2k+1} \equiv ({-1}^{2})^{k} \times {-1}^1 \equiv 1 \times -1 \equiv -1 \equiv 2 \mod{3}$$ $$2^{2k+1} \equiv 4^k\times2\equiv0\mod{4}$$ Therefore by CRT, $$2^{2k+1} \equiv 8 \mod{12}$$

Gareth Ma
  • 792
0

Notice that:

$$2^{2m+1}-8=2(2^m+2)(2^m-2)$$

We wish to show the RHS is a multiple of $12$. The outside $2$ means we need one of the brackets to be a multiple of $6$. Can you show that if two even numbers are four apart, one of them must be a multiple of $6$?

Rhys Hughes
  • 12,842