basic number theory - polynomial congruence

61 Views Asked by At

Problem: Determine whether $x^{2} \equiv 5$ mod $120$ has solution. If so, how many?

NOTE: This is a specific question, but is there a method for answering this question given any set of numbers?

Thoughts: Not exactly sure. I want to rearrange the terms to say that this means $x^{2} + 120y = 5$ for some $y \in \mathbb{Z}$. But this doesn't tell me anything either. So...?

2

There are 2 best solutions below

0
On

The answer is zero solutions.

$x^{2}\equiv{5}\mod{120} \rightarrow x^{2}=120y+5 \rightarrow x^{2}\equiv{5}\mod{8}$

$x^{2}\equiv0,1,4\mod{8}$

Can also be $x^{2}\equiv2\mod{3}$ while quadratic numbers are either $0$ or $1\mod{3}$. Credits: lulu

0
On

There is a method for such questions. You're lucky that in this case, it shows "no solution" right away.

In general, factor the modulus: $120 = 2^33\cdot 5.$ Then solve the congruence modulo each prime power. The number of solutions to the original congruence is the product of the number of solutions modulo each prime power. (So in your case, the mod $3$ case causes you to multiply by $0$.)

If you have a solution modulo each prime power, then you can use the Chinese Remainder Theorem to find a solution modulo the original modulus.