1

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...?

mathmajor
  • 379
  • 4
  • 14
  • 2
    Hint: if $x^2\equiv 5 \pmod {120}$ then $x^2\equiv 5 \pmod 3$. – lulu Feb 28 '20 at 23:14
  • Why is that the case? – mathmajor Feb 28 '20 at 23:34
  • Because, if $120$ divides a number then $3$ divides that number. – lulu Feb 28 '20 at 23:35
  • Because congruences persist mod $\rm\color{#c00}{factors}$ of the modulus, i.e. $\begin{align} &\bbox[7px,border:1px solid red]{a\equiv \bar a!!!\pmod{!k:!\color{#c00}n}\ \Rightarrow\ a\equiv \bar a!!!\pmod{!\color{#c00}n}}^{\phantom{|^{|}}}\[.4em] \text{by its defining divisibility persists: }&\ \ n\mid kn\mid a-\bar a,\Rightarrow, n\mid a-\bar a\ \ \text{by transitivity of 'divides'.} \end{align}$ – Bill Dubuque Feb 29 '20 at 00:06

2 Answers2

1

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

acat3
  • 12,197
0

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.

B. Goddard
  • 33,728