3

I'm really confused about congruence. I tried hard, but I kept failing :(

$$30! \equiv -1 \pmod{31} \text{ by Wilson's Theorem}$$ $$ \Longleftrightarrow 30.29.28.27.26.25! \equiv -1 \pmod{31}$$ $$ \Longleftrightarrow (-1).15.10.(-8).6.25! \equiv -1 \pmod{31}$$ $$ \Longleftrightarrow 15.4.5!.25! \equiv -1 \pmod{31}$$ $$ \Longleftrightarrow 60.5!.25! \equiv -1 \pmod{31}$$ $$ \Longleftrightarrow 15.5!.25! \equiv -1 \pmod{31}$$

And I was stuck here :( ? Furthermore, I have to use computer to find a pair of solution of the Diophantine equation $ax + 31y = 1$ for each number: $30, 29, 28, 27, 26 ... $ I wonder is there an easier way to do this? Because I think this way is very time consuming. Any idea?

Thanks,
Chan

roxrook
  • 12,457

3 Answers3

9

So by Wilson's Theorem, you have $$ 30\cdot 29\cdot 28\cdot 27\cdot 26\cdot 25!\equiv -1\pmod{31}. $$ But notice this implies $$ (-1)(-2)(-3)(-4)(-5)25!\equiv (-1)^5 5!25!\equiv -1\pmod{31}, $$ since $30\equiv -1\pmod{31}$, $29\equiv -2\pmod{31}$,$\dots$, and $26\equiv -5\pmod{31}$.

yunone
  • 22,973
  • @yunone: Thanks, after seeing the answer I feel like I need to take a break :(. – roxrook Feb 26 '11 at 07:50
  • @Chan, no problem. Working too long can be hard on anyone. Things will probably look clearer in the morning. – yunone Feb 26 '11 at 07:55
  • @yunone: From your equation: $(-1)^{5} = -1$. So $-5!25! + 1$ is divisible by 31, but this is not true. Can you explain this? Sorry if I misunderstood your instruction. – roxrook Feb 26 '11 at 07:57
  • @Chan, I'm not sure how you did your calculation. According to wolframalpha $-5!25!+1$ is indeed divisible by $31$. – yunone Feb 26 '11 at 08:03
  • @yunone: I really apologized for being careless, since my calculator mode was on faction mode, so I saw the quotient as fraction with power of 10. – roxrook Feb 26 '11 at 08:10
  • @Chan, no worries. – yunone Feb 26 '11 at 08:13
  • @yunone Here the answer is -1 or 1 ? Since after solving it comes (-1)^5!25! – vikiiii Oct 09 '12 at 15:55
  • @vikiiii The answer is $1$. The answer shows $30!\equiv (-1)^5 5!25!\equiv -1\pmod{31}$, so since $(-1)^5=-1$, you have $(-1)5!25!\equiv -1\pmod{31}$. Multiplying both sides by $-1$ shows $5!25!\equiv 1\pmod{31}$. – yunone Oct 09 '12 at 17:10
1

If you are looking for $x$ such that $15x = 1 \mod 31$, notice that $15 \times 2 = 30 = -1 \mod 31$

Hence $15 \times (-2) = 1 \mod 31$.

But, as yunone's answer shows, you have a mistake somewhere.

Aryabhata
  • 84,362
0

As I noted in your prior question, Wilson's theorem enjoys a reflection formula

$\!\begin{align}{\bf Wilson\ reflection}\!\!:\ (p\!-\!1\!-\!k)\:\!!\, &\equiv\ \frac{(-1)^{k+1}}{\color{#c00}{k!}}\!\!\pmod{\!p},{\rm \ \ for\ } \,0\le k < p\,\ \rm prime \\[.4em] {\rm so}\,\ p,k = 31,5\,\Rightarrow\, \bmod 31\!:\,\ 25!\,&\equiv \dfrac{1}{\color{#c00}{5!}}\equiv\dfrac{32}{\color{#0a0}{-4}}\equiv -8,\ {\rm by}\ \ \color{#c00}{5!}\equiv \color{#0a0}4\ (\underbrace{5\cdot3\cdot2}_{\textstyle \equiv\color{#0a0}{-1}}) \end{align}$

Bill Dubuque
  • 285,713