0

How to calculate $1900^{13} \pmod{2537}$

I should be able to do this problem but I don't figure a fast way of calculating it.

Edit: I find reduced the problem to solve:

$X≡12^{13}$mod$59$ and $X≡2^{39}$mod$43$

and I don't know how to solve

$X≡12^{13}$mod$59$

iggykimi
  • 349
  • not sure if will help but $2537+13=2550$ – gt6989b Feb 26 '20 at 19:15
  • 1
    Note that $2537=43\cdot59$ so you can do mod $43$ and mod $59$ and then use the Chinese remainder theorem. – saulspatz Feb 26 '20 at 19:29
  • 1
    @saulspatz I tried that but it's complicated. – iggykimi Feb 26 '20 at 19:29
  • 1
    Can you post your efforts, please? It's hard to help you if I can't see where you are having difficulty. – saulspatz Feb 26 '20 at 19:32
  • @saulspatz I've trouble with solving $X\equiv 12^{13} mod 59$ – iggykimi Feb 26 '20 at 19:33
  • 1
    Hunch: $59 = 512-1$ and so $12^2\equiv 144=120+24=2(60-1)+26\equiv 26$. And $12^3\equiv 2612\equiv 2512+12\equiv 5(512)+12\equiv 5(512-1)+17\equiv 17\pmod {59}$ And $12^{6}\equiv 17^2\equiv (12+5)(12+5)\equiv 144 + 512 + 512 + 25\equiv 26 + 1+1+25\equiv 53\equiv -6\pmod {59}$. And $12^{12}\equiv (-6)^2\equiv 36$. So $12^{13}\equiv 3612\equiv 5712 + 12\equiv 7(5*12 -1) + 19\equiv 19\pmod {59}$. – fleablood Feb 26 '20 at 21:17
  • 1
    But even if didn't have the hunch you can do $12^2=144\equiv 26$. $12^4\equiv 26^2\equiv 676\equiv 27$. $12^{12}\equiv 27^3\equiv 19683\equiv 36$ and $12^{13}\equiv 36*12\equiv 432\equiv 19$. ...Although I have to admit that $12^4\equiv 12^2 + 1$ is intriguing. – fleablood Feb 26 '20 at 21:27

1 Answers1

0

To compute $p=12^{13}\bmod 59$, you can use the fast exponentiation algorithm (‘square and divide’):

\begin{array}{rlll} n&x& &p \\ \hline 13 & x=12& &p=12 \\ 6 &x^2=26&&\phantom{p={}}12 \\ 3& x^4=26^2=27&&p=27\cdot 12=29 \\ 1&x^8=27^2=21&&p=21\cdot 29=\color{red}{19} \\ \hline \end{array}

As to $2^{39}\bmod 43$, by lil' Fermat, it is $2^{-3}=8^{-1}$, and the extended Euclidean algorithm yields in a few steps that $$8^{13}=-22.$$

Bernard
  • 175,478