0

I recently saw this question:

Find such $n$, that $x^2 \equiv 1 \pmod{n}$ has $16$ solutions.

The solution is $2^3 \cdot 3 \cdot 5 = 120$, because in this product $2^3$ increases the number of solutions fourfold, $3$ doubles it and $5$ also doubles it, to ultimately get $16$ solutions. So, multiplication by new prime number doubles the number of solutions (except for the number $2$).

Then I came across this:

Find the number of solutions for the congruence $x^3-x^2-x+1 \equiv 0 \pmod{7 \cdot17^2}$

I calculated that $x^3-x^2-x+1 \equiv 0 \pmod{17^2}$ has $18$ solutions.

In this case, analogous to the first question, can I say that the result is $18 \cdot 2 = 36$ solutions (and indeed it is), because we are multiplying by the prime number $7$? I expect it's not that simple, so when does such a property hold?

Thanks.

Michał
  • 675
  • 1
  • 12
  • 2
    What you are using to count solutions by multiplying the number of solutions mod $7$ and mod $17^2$ is the Chinese Remainder Theorem. As you can see, what is important is that those moduli are relatively prime, pairwise when more than two moduli. – NDB Aug 02 '23 at 16:31
  • @NDB So it's enough that the moduli are relatively prime? It doesn't matter if the congruence is quadratic or cubic etc.? – Michał Aug 02 '23 at 16:48
  • 1
    The theorem gets applied to solutions. What is a solution, a linear congruence of the form $x\equiv a\pmod{m}$. By the time the theorem gets applied it doesn't matter where they came from. – NDB Aug 02 '23 at 16:53

1 Answers1

1

The general fact that you will be using is the Chinese Remainder Theorem, which says that when $n$ has a decomposition into pairwise relatively prime factors $d_i$ (for which in practice one takes the maximal prime powers dividing $n$), then the modular ring $\def\Z{\Bbb Z}\Z/n\Z$ decomposes as a product of the similar rings $\Z/d_i\Z$ for those factors. As a consequence, the number of solutions of any polynomial equation in $\Z/n\Z$ is the product of the number of solutions of the same equation in each of the $\Z/d_i\Z$.

The number of solutions in each of those rings in general has to be computed explicitly (possibly just by counting). The equation $x^2=1$ is a bit special, in that one can show that it has exactly $2$ solutions (namely $x=1$ and $x=-1$) modulo any odd prime power (because the multiplicative group is cyclic; this is not entirely elementary), and modulo $2^e$ with $e\geq1$ there are $2^{\min(e-1,2)}$ solutions (see this answer).