Section 7.3 Congruences as Solutions to Congruences
ΒΆWe need to start applying these ideas more. In Section 7.1 we explored the number of solutions to x2β1β‘0 (mod n) for arbitrary n. It should be clear we expect at least two solutions once we move past the trivial case n=2, but why are there sometimes more? Could we ever get a comprehensible answer to that question? Online, try the following interact to see if you find any patterns.xxxxxxxxxx
def _(n=(12,[10..110])):
counter = 0
pretty_print(html("Values of $x^2-1$ mod %s"%(n,)))
pretty_print(html("<ul>"))
for m in [0..n]:
pretty_print(html(r"<li>$%s^2-1\equiv %s\text{ (mod }%s)$</li>"%(m,mod(m,n)^2-1,n)))
if mod(m,n)^2-1==0:
counter += 1
pretty_print(html("</ul>"))
pretty_print(html(r"There are $%s$ solutions to $x^2-1\equiv 0$ (mod $%s$)."%(counter,n)))
We know that Β±1 are still the only solutions modulo 22 and 21. In the latter case +1β‘β1, so then there is actually only one solution.
However, modulo 23 it's possible that 2β£(x+1) and 22β£(xβ1), or vice versa, so that 22Β±1=3,5 are also solutions to the congruence.
When the modulus is a higher power of 2 this sort of thing can happen, too. For instance, one could have 2β£(x+1) and 24β£(xβ1). However, it's not possible that 22β£(x+1) and 23β£(xβ1) because numbers two apart can't both be divisible by four. So the only other possibility is that 2β£(x+1) and 2eβ1β£(xβ1), or vice versa, which is a total of four solutions.
Fact 7.3.1.
Let k be the number of different odd primes that divide n. Consider the congruence x2β1β‘0 (mod n). Then:
There are 2k solutions if n is odd.
There are 1β 2k=2k solutions if n is divisible by 2 but not by 4.
There are 2β 2k=2k+1 solutions if n is divisible by 4 but not by 8.
There are 4β 2k=2k+2 solutions if n is divisible by 8.
Proof.
Use Fact 7.2.2 and the argument above.
Fact 7.3.2.
We can list all possible solutions to x2β1β‘0 (mod n) based on k, the number of odd primes that divide n, and based on the equivalence class of n modulo 8.
There are 2k solutions if nβ‘1 (mod 2), or when nβ‘1,3,5,7 (mod 8).
There are 2k solutions if nβ‘2 (mod 4), or when nβ‘2,6 (mod 8).
There are 2β 2k=2k+1 solutions if nβ‘4 (mod 8).
There are 4β 2k=2k+2 solutions if nβ‘0 (mod 8).