1

I need to find how many incongruent solutions exist to the equation:

$x^2 \equiv 1(mod\space m)$.

I'm thinking I need to take a case by case approach, for example when $a = 0$, but these number theory problems are hard!

Thanks for the hints!

EDIT:

I suppose I should state what I've done.

If $x^2 \equiv 1 (mod \space m)$ has a solution, then necessarily, $x^2 \equiv 1(mod \space p_i^{b_i})$ has a solution too. Then that means $x^2 \equiv 1(mod \space p_i)$ also has a solution, lastly taking me to this step:

$(x-1)(x+1) \equiv 0(mod \space p_i)$.

At this point, I'm not too sure where to go.

Bill Dubuque
  • 272,048
Bliebervik
  • 1,038

1 Answers1

1

Outline: We need to establish the following two basic facts.

(i) If $x^2\equiv 1\pmod{m}$ then $x^2\equiv 1\pmod{p_i^{b_i}}$ and $\pmod{2^a}$.

(ii) Suppose that $x_0^2\equiv 1\pmod{2^a}$ and $x_i^2\equiv 1\pmod{p_i^{b_i}}$. Let $x$ be the unique solution (modulo $m$) of the system of congruences $x\equiv x_0\pmod{2^a}$, $x\equiv x_i\pmod{p_i^{b_i}}$ guaranteed to exist by the Chinese Remainder Theorem. Then $x^2\equiv 1\pmod{m}$.


By (i) and (ii), it is enough to find (or at least count) the solutions of $x^2\equiv 1\pmod{2^a}$ and $\pmod{p_i^{b_i}}$. Then we will know the solutions of $x^2\equiv 1\pmod{m}$, and will be able to count them.

The powers of odd primes are easy. Note that $p_i$ cannot simultaneously divide each of $x-1$ and $x+1$. Thus $(x-1)(x+1)\equiv 0\pmod{p_i^{b_i}}$ if and only if $x\equiv 1\pmod{p_i^{b_i}}$ or $x\equiv -1\pmod{p_i^{b_i}}$.

The powers of $2$ are a little more complicated. The congruence $x_0^2\equiv 1\pmod{2}$ has $1$ solution. The congruence $x_0^2\equiv 1\pmod{4}$ has two. We show that if $a\ge 3$, then the congruence $x_0^2\equiv 1\pmod{2^a}$ has $4$ solutions.

Note that if $a\gt 1$ any solution $x_0$ of the congruence is odd, so the gcd of $x_0-1$ and $x_0+1$ is equal to $2$. Thus $(x_0-1)(x_0+1)\equiv 0\pmod{2^a}$ precisely if one of $x_0-1$ or $x_0+1$ is divisible by $2^{a-1}$. If $a\ge 3$ we get therefore the solutions $\pm 1$ and $2^{a-1}\pm 1$, and that's all. (In the case $a=1$, the $4$ solutions coincide, and in the case $a=2$ they coincide in pairs. If $a\ge 3$ they are distinct.)


Finally, we can count. If $a=0$ or $a=1$, the number of solutions is $2^r$. If $a=2$, then the number of solutions is $2^{r+1}$. And finally if $a\ge 3$, then the number of solutions is $2^{r+2}$.

André Nicolas
  • 507,029
  • 1
    @Andre_Nicolas Could I ask you to elaborate on your second last paragraph? I'm not quite sure what you're getting at there. Everything else is crystal clear. But if $x = 1$ then $gcd(x-1,x+1) = 2$, not $\pm 1$, no? – Bliebervik Feb 01 '15 at 22:14
  • 1
    Was being unclear, more really like wrong. I have corrected the misleading sentence, but the solution is essentially unchanged. – André Nicolas Feb 01 '15 at 22:41
  • 1
    Awesome. Thanks Andre! :-) Might I ask you how you are so good at number theory? I'm trying to wrap my mind around a lot of these methods and, while these methods make sense, I cannot think of them off the top of my head. – Bliebervik Feb 01 '15 at 22:50
  • 1
    And I suppose I have one more question, if you're open to answer it: you said "... if one of $x-1$ of $x+1$ is divisible by $2^{a-1}$... Why $2^{a-1}$? – Bliebervik Feb 01 '15 at 22:58
  • 1
    We want $(x-1)(x+1)$ to be divisible by $2^a$. One of $x-1$ and $x+1$ has only one measly $2$ to contribute, since it is divisible by $2$ but not by $4$. So the other must contribute at least $a-1$ $2$'s, that is, be divisible by $2^{a-1}$. – André Nicolas Feb 01 '15 at 23:03
  • 1
    I think this is the last question (of course, if you want to answer it!) You said the congruence $x_0^2=1 \space (mod \space 2)$ has 1 solution. Does it not have two? ($\pm1$?) – Bliebervik Feb 01 '15 at 23:19
  • 1
    Well, mod $2$ we have that $1$ is congruent to $-1$. – André Nicolas Feb 01 '15 at 23:29
  • 1
    Hence, they are technically the same solution? – Bliebervik Feb 01 '15 at 23:31
  • 1
    Yes, exactly. Or to put it anther way, $2-1=1$. – André Nicolas Feb 01 '15 at 23:33
  • 1
    Interesting. For some reason, that's not clicking.

    For the odd primes, we say that $(x-1)(x+1) = 0 \space mod \space p_i^{b_i}$ has two solutions, $x_i= \pm1$. But with 2, we only get the one solution? That seems strange to me... Thanks for your help Andre, by the way. I really appreciate it.

    – Bliebervik Feb 01 '15 at 23:40