1

The question I got is

$$ 42^{27} \bmod 55 $$ And the answer I got is like this

$$ 42(42^{2})^{13} \bmod 55 \\42(1764)^{13} \bmod 55 \\42(4)^{13} \bmod 55 \\42(67108864) \bmod 55 \\42(9) \bmod 55 \\378 \bmod 55 \\ 48 \bmod 55 $$

So on the third/fifth step, why $1764$ turn into $4$ and why $67108864$ turns into $9$?

I have already read others similar question but still don't get the idea about what is happening

Peter Phipps
  • 3,065
Tevil
  • 45

3 Answers3

2

They used $\ 1764\equiv 4\pmod{55}\ $ and the Congruence Product & Power Rules.. Ditto for $\, 4^{\large 13}\!\equiv 9.\ $

Generally congruence is preserved by replacing aguments of sums and products by any congruent argument, e.g. see the Polynomial Congruence Rule in the above linked answer.

I just don't know how to deal with a big number

CRT = Chinese Remainder Theorem helps by reducing to smaller moduli. Applying CRT here along with modular order reduction of exponents we obtain by easy mental arithmetic

$\!\bmod 5\!:\ \ \ \ \ \ \ \ \ \ 2^{\large 4} \equiv 1\, \Rightarrow\ 42^{\large 27}\ \ \equiv\ \ \ 2^{\large\color{#c00}{27}}\ \ \,\equiv\,\ \ 2^{\large\color{#c00} 3}\ \equiv\ \color{#0a0}3,\ \ $ by $\ \ \color{#c00}{27\equiv 3}\pmod{4}$

$\!\bmod 11\!:\,\ (-2)^{\large 5} \equiv 1\, \Rightarrow\, 42^{\large 27 }\equiv (-2)^{\large{27}} \equiv (-2)^{\large 2} \equiv \color{#90f}4,\, \ \ $ by $\ \ 27\equiv 2\pmod{5}$

Thus applying easy CRT: $ \ \ \ 42^{\large 27} \equiv \color{#90f}4 + 11\left[\dfrac{\color{#0a0}3-\color{#90f}4}{11} \bmod 5\right]\equiv 4+11[-1]\equiv -7\equiv 48\pmod{\!55}$

By reducing the moduli to $5$ & $11$ we can now do the arithmetic in a couple minutes purely mentally.

Bill Dubuque
  • 272,048
1

Another way:

Using http://mathworld.wolfram.com/CarmichaelFunction.html,

$\lambda(55)=20$

As $(42,55)=1,27\equiv7\pmod{20}$

$42^{27}\equiv42^7\pmod{55}$

Now $42^2\equiv4\pmod{55}$

$\implies42^7=42(42^2)^3\equiv(-13)(2^2)^3\pmod{55}$

$\equiv(-13)9\equiv-117\equiv-117+3\cdot55$

0

In the ring $\mathbb Z/55\mathbb Z$ we have

$42^{27}=(-13)^{27}=-13^{27}$

$13^2=169=4\Rightarrow13^{27}=4^{13}\cdot13=9\cdot13=7$.

Thus $$42^{27}=-7=48$$

Piquito
  • 29,594
  • But how did ypu compute $,4^{\large 13}\equiv 9,?,$ That omitted step is where most of the work lies above so one should say something about that (esp. given the OP's comment "I just don't know how to deal with a big number") $\ \ $ – Bill Dubuque May 06 '19 at 16:04
  • If the guy can not apply successive reductions when relevant, then he can not assimilate to the total understanding theorems like the Chinese theorem or similar ones, generally "complicated" for beginners. My last two answers have not appeared on the corresponding list, Why? – Piquito May 06 '19 at 16:14
  • That doesn't answer my query, i.e. how did you compute it? We don't know what the OP (and readers) know, but the more fully we explain the greater the possibility it will be helpful. – Bill Dubuque May 06 '19 at 16:19
  • It is not important but anyway you have $4^3=9$; $9^4=16$ and $16\cdot4=9$. Regards. – Piquito May 06 '19 at 18:27
  • 3
    So it appears that you are essentially using powering by repeated squaring.. The OP may not be aware of that method so it is always helpful to be explicit. – Bill Dubuque May 06 '19 at 18:35