0

Hi I'm practicing the Pohlig-Helman algorthm right now and I was wondering if I could get an explanation on how to easily compute something like

$12^{20} \bmod(41)$ by hand

I can't think of a smart way to do it, I won't be allowed a calculator on an exam. So any help would be greatly appreciated.

Siong Thye Goh
  • 153,832
Temirzhan
  • 1,003
  • Exponentiation by squaring, mod 41 on each step? Alternatively... – user202729 Dec 16 '17 at 06:25
  • $41$ is a prime, so the remainder of $4^{20}=2^{40}$ follows from Little Fermat. Here you only need to figure out whether $3$ is a quadratic residue modulo $41$ or not. Has that been covered? Hint: Use quadratic reciprocity. – Jyrki Lahtonen Dec 16 '17 at 06:36
  • In general the techniques described here cover this type of problems quite well. The use of quadratic residues is special to this and to the coincidence (?) that $20=(41-1)/2=\phi(41)/2$. It is sorta expected that you search the site for similar questions before asking. – Jyrki Lahtonen Dec 16 '17 at 06:39

5 Answers5

4

\begin{align}12^{20} &\equiv 3^{20}2^{40} \pmod{41}\\ &\equiv 3^{20} \pmod{41} \text{, Fermat's}\\ &= (3^4)^5 \pmod{41} \\ &\equiv (-1)^5 \pmod{41} , \text{since } 81 = 2(41)-1\\ &\equiv -1 \pmod{41}\end{align}

Siong Thye Goh
  • 153,832
2

The standard method to compute such modular powers (without resorting to any knowledge about Fermat and primeness of the modulus) is to use $a^{2n}=a^n\cdot a^n$ and $a^{2n+1}=a^{2n}\cdot a$ repeatedly. So for $12^{20}$ we need $12^{10}$, for that $12^5$, for that $12^4$, for that $12^2$. Now $$ 12^2=144\equiv 21\pmod{41}$$ $$ 12^4\equiv 21^2\equiv 441\equiv 31\pmod{41}$$ $$ 12^5\equiv 31\cdot 12\equiv 372\equiv 3\pmod{41}$$ $$12^{10}\equiv 3^2\equiv 9\pmod{41}$$ $$12^{20}\equiv 9^2\equiv 81\equiv -1\pmod{41}$$

1

\begin{align} 9^2 &\equiv -1 &\pmod{41}\\ 16^2 &\equiv 10 &\pmod{41}\\ 12^4=9^2\times16^2 &\equiv -10 &\pmod{41}\\ 12^2 &\equiv 21 &\pmod{41}\\ 12^6 &\equiv 210 \equiv 5 &\pmod{41}\\ 12^{10} &\equiv -50 \equiv 9 &\pmod{41}\\ 12^{20} &\equiv 81 \equiv 40 &\pmod{41} \end{align}

Nosrati
  • 30,522
0

By Euler's criterion, $$12^{20}\equiv\left(\frac{12}{41}\right)\pmod{41}$$ (Legendre symbol). By quadratic reciprocity, $$\left(\frac{12}{41}\right)=\left(\frac{3}{41}\right)=\left(\frac{41}{3}\right)=\left(\frac{-1}{3}\right)=-1.$$

Angina Seng
  • 161,540
0

A minor twist on Lord Shark's answer: $12^{20}\pmod{41}$ is the Legendre symbol $\left(\frac{12}{41}\right)$. $41$ can be represented as $a^2+b^2$ but cannot be represented as $a^2+3b^2$ for some $(a,b)\in\mathbb{Z}^2$, hence $-1$ is a quadratic residue $\!\!\pmod{41}$ but $-3$ is a quadratic non-residue. By the multiplicativity of Legendre symbol we get that $3$ is a quadratic non-residue and $12$ is a quadratic non-residue as well, so $$ 12^{20}\equiv \color{red}{-1}\pmod{41}.$$ The following particular cases of the quadratic reciprocity theorem $$ \left(\frac{-1}{p}\right)=1\quad\Longleftrightarrow\quad p\equiv 1\pmod{4} $$ $$ \left(\frac{2}{p}\right)=1\quad\Longleftrightarrow\quad p\equiv \pm 1\pmod{8} $$ $$ \left(\frac{-3}{p}\right)=1\quad\Longleftrightarrow\quad p\equiv 1\pmod{3} $$ $$ \left(\frac{5}{p}\right)=1\quad\Longleftrightarrow\quad p\equiv \pm 1\pmod{5} $$ have simple proofs, only relying on elements of group/ring/field theory.
Have a look at these answers: A1, A2.

Jack D'Aurizio
  • 361,689