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 toxxxxxxxxxx
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
are still the only solutions modulo and In the latter case so then there is actually only one solution.However, modulo
it's possible that and or vice versa, so that are also solutions to the congruence.When the modulus is a higher power of
this sort of thing can happen, too. For instance, when one could have and However, it's not possible that and because numbers two apart can't both be divisible by four. So the only other possibility is that and or vice versa, which is a total of four solutions. (See Exercise 7.7.15 to confirm these do all give solutions.)
Fact 7.3.1.
Let
There are
solutions if is odd.There are
solutions if is divisible by 2 but not by 4.There are
solutions if is divisible by 4 but not by 8.There are
solutions if 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
There are
solutions if or whenThere are
solutions if (mod ), or whenThere are
solutions if (mod ).There are
solutions if