Find the remainder when $2(26!)$ is divided by $29$.
So I know I'm going to use Wilson's theorem and then I would have $28!=-1(\mod29\:)$ but what is the next step? Step by Step explanation please!
Find the remainder when $2(26!)$ is divided by $29$.
So I know I'm going to use Wilson's theorem and then I would have $28!=-1(\mod29\:)$ but what is the next step? Step by Step explanation please!
$\begin{eqnarray} {\bf Hint}\ \ \ {\rm mod}\ 29\!:\,\ {-}1\! \overset{\rm Wilson}\equiv 28!\, \equiv &&\ (\color{#c00}{28})\ (\color{#0a0}{27})26!\\ \equiv&& (\color{#c00}{-1})(\color{#0a0}{-2}) 26!\\ \equiv &&\qquad\ \ \,2\cdot 26!\end{eqnarray}$
$$28!\equiv -1\bmod 29$$ or $$28\cdot27 \cdot 26!\equiv -1\bmod 29$$ which is $$2\cdot 14\cdot27 \cdot 26!\equiv -1\bmod 29$$ Now let $a$ and $b$ be modular inverses of $14,27$ respectively.(such $a,b$ exist because $gcd(14,29)=1$ and $gcd(27,29)=1$).
Multiply both sides by $a\cdot b$. The result is what you want.