I don't understand the proof. Where did they get the first line from, i.e., $21 \times 11=1+5 \times 46$?
Fermat's theorem in my view is $a^{46} \equiv 1 \pmod {47}$.
I don't understand the proof. Where did they get the first line from, i.e., $21 \times 11=1+5 \times 46$?
Fermat's theorem in my view is $a^{46} \equiv 1 \pmod {47}$.
By Fermat's Little Theorem, $x^{46}\equiv 1\pmod{47}$ for all $x\not\equiv0\pmod{47}$. Therefore, $$ \begin{align} \left(x^{11}\right)^{21} &=x^{46\cdot5+1}\\ &=\left(x^{46}\right)^5\,x^1\\ &\equiv1\cdot x\pmod{47}\tag{1} \end{align} $$ for all $x\not\equiv0\pmod{47}$. On the other hand, if $x\equiv0\pmod{47}$, equation $(1)$ is true also. Therefore, if we know $x^{11}\bmod{47}$, we can compute $x$.
Using the Square and Multiply Method, we get $$ \begin{align} 5^0&\equiv\hphantom{0}1\pmod{47}\\ 5^1&\equiv\hphantom{0}5\pmod{47}&&\text{multiply by $5$}\\ 5^2&\equiv25\pmod{47}&&\text{square}\\ 5^4&\equiv14\pmod{47}&&\text{square}\\ 5^5&\equiv23\pmod{47}&&\text{multiply by $5$}\\ 5^{10}&\equiv12\pmod{47}&&\text{square}\\ 5^{20}&\equiv\hphantom{0}3\pmod{47}&&\text{square}\\ 5^{21}&\equiv15\pmod{47}&&\text{multiply by $5$} \end{align} $$
A Note on $\boldsymbol{11\cdot21=46\cdot5+1}$
Using the Extended Euclidean Algorithm, as implemented in this answer, we can solve $11x-46y=1$ (that is, $11x\equiv1\pmod{46}$): $$ \begin{array}{r} &&4&5&2\\\hline \color{#00A000}{1}&0&1&\color{#00A000}{-5}&11\\ 0&\color{#C00000}{1}&-4&\color{#C00000}{21}&-46\\ \color{#00A000}{46}&\color{#C00000}{11}&2&1&0 \end{array} $$ This says that $21\cdot11-46\cdot5=1$.
Checking the steps of a less messy proof (the one you copied it rather cumbersome), and doing arithmetic modulo $\;47\;$ : since $\;15=3\cdot 5\;$ , and
$$\begin{align*}3^3=&27=-20\implies 3^4=-60=-13\implies3^5=-39=8\implies\\{}\\3^{10}=&64=17\implies\color{red}{3^{11}=51=4}\\ {}\\5^2=&25=-22\implies5^3=-110=-16\implies5^4=-80=14\\{}\\\implies5^8=&196=8\implies\color{red}{5^{11}=5^3\cdot5^8=-16\cdot8=-128=-34=13}\end{align*}$$
and thus
$$15^{11}=3^{11}\cdot5^{11}=4\cdot13=52=5$$