Tuesday 11 June 2013

modular arithmetic - If the last 3 digits of $2012^m$ and $2012^n$ are identical, find the smallest possible value of $m+n$.




Let $m$ and $n$ be positive integers such that $m>n$. If the last 3 digits of $2012^m$ and $2012^n$ are identical, find the smallest possible value of $m+n$.




Since the 100's digit is 0 in both cases, I just did $2012^m \equiv 2012^n \mod 1000$, and got $12^m \equiv 12^n\mod 1000$ but I'm not sure where to go from there. Trying to compute the first few powers of $12$ will only get the numbers larger and the pattern doesn't seem to emerge that soon.


Answer



Let find periodicity of last digit:
$$

1\underline{2}, 14\underline{4}, 172\underline{8}, 2073\underline{6}, 24883\underline{2}, ...
$$
Since $12^1 \equiv 12^5 \equiv 2 \bmod(10)$, we conclude that $12^k\equiv 12^{k+4} (\bmod 10)$.



Now find periodicity of last $2$ digits, using this $4$-periodicity of last digit:
since $12^4 \equiv 36 (\bmod 100)$,



$12^1 =12 (\bmod 100)$,

$12^5 \equiv 12 \cdot 12^4 \equiv 12\cdot 36 \equiv 32 (\bmod 100)$,

$12^9 \equiv 12^5 \cdot 12^4 \equiv 32\cdot 36 \equiv 52 (\bmod 100)$,


$12^{13} \equiv 12^9 \cdot 12^4 \equiv 52\cdot 36 \equiv 72 (\bmod 100)$,

$12^{17} \equiv 12^{13}\cdot 12^4 \equiv 72\cdot 36 \equiv 92 (\bmod 100)$,

$12^{21} \equiv 92\cdot 36 \equiv 12 (\bmod 100)$;



so, periodicity of last $2$ digits is $20$.



Finally, find periodicity of last $3$ digits:
since $12^{20} \equiv 176 (\bmod 1000)$, we have:



$12^2 \equiv 144 (\bmod 1000)$;


$12^{22} \equiv 144 \cdot 176 \equiv 344 (\bmod 1000)$;

$12^{42} \equiv 344 \cdot 176 \equiv 544 (\bmod 1000)$;

$12^{62} \equiv 544 \cdot 176 \equiv 744 (\bmod 1000)$;

$12^{82} \equiv 744 \cdot 176 \equiv 944 (\bmod 1000)$;

$12^{102} \equiv 944 \cdot 176 \equiv 144 (\bmod 1000)$;



So, $$12^2 = 144,$$
$$12^{102} \equiv 144 (\bmod 1000).$$



$$(m+n = 104)$$



No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...