For which $m$ does $ab\equiv -1\pmod{m}$ imply $a+b\equiv 0\pmod{m}$ for positive integers $a$ and $b$?

64 Views Asked by At

This is pretty easy to show for $m=24,$ and I'm pretty sure if $ab\equiv -1\pmod{p^{n}}$ does not imply $a+b\equiv 0\pmod{p^{n}}$ then $ab\equiv -1\pmod{p^{n+k}}$ doesn't imply $a+b\equiv 0\pmod{p^{n+k}}$ for any positive integer $k$ either. I haven't managed to find any larger numbers than $24,$ so how would I go about proving there exist no $m>24$? If there do exist $m>24,$ how do I show it (and how do I generate $m$ which satisfy this condition)?

1

There are 1 best solutions below

3
On BEST ANSWER

Suppose that both conditions hold. Then $a\equiv -b \pmod{m}$ and thus $$a^2 \equiv -ab \equiv 1 \pmod{m},$$

and so $a^2 - 1 = mx.$ So, it suffices for there to be a number which is not its own inverse. For this, the Chinese Remainder Theorem is of great use.

It's clear that, for any prime besides $2, 3,$ there is some number which is not its own inverse (just note that if $a^2 - 1 = px,$ then $(a-1)(a+1) = px,$ and so either $a\equiv 1\pmod{p}$ or $a\equiv -1\pmod{p}.$)

So, suppose that some prime $p > 3$ divides $m,$ and that $p^n$ is largest power of $p$ that divides $m.$ Then, find a residue mod $m$ which is congruent to $2$ mod $p^n$ but $1$ modulo every other prime power dividing $m.$ This residue will be invertible as it is relatively prime to $m$, and thus have a unique inverse mod $m.$ But it clearly cannot be its own inverse, as it is congruent to $2$ mod $p^n$ but $2$ is not its own inverse mod $p^n$ since $p > 3,$ and thus the equation $a+b \equiv 0 \pmod{m}$ does not hold, as if it did the above computations would show that $a$ was its own inverse.