How many integers in the range satisfy a given congruence? Specifically how many integers $x$ in the range $1 ≤ x ≤ 60$ satisfy $21x ≡ 24\ (mod\ 60)$? And how many integers $a$ are there in the range $1 ≤ a ≤ 74$ for which the equation $x^2 ≡ a\ (mod\ 37)$ is soluble?
I have the solutions to be $3$ and $38$ respectively but not too sure how they came up with those answers.
For the first one, I believe it's because $21x ≡ 24\ (mod\ 60) \implies 3\cdot7x \equiv 3\cdot8\ (mod\ 60) \implies 7\cdot8x\ (mod\ 20) \implies x \equiv 4\ (mod\ 20)$
Then looking in the range from $1\ to\ 60$, $60/20 = 3$ to give us 3 integers.
Not sure about the second..

\begin{align}
   21x &\equiv 24 \pmod{60} \\
   7x &\equiv 8 \pmod{20} \\
   x &\equiv 4 \pmod{20} \\
   x &\in \{4, 24, 44 \}
\end{align}
TOTAL = 3

\begin{array}{|c|c|}
\hline
x & x^2 \pmod{37}\\
\hline
 0,37 &  0 \\
 1,36 &  1 \\
 2,35 &  4 \\
 3,34 &  9 \\
 4,33 & 16 \\
 5,32 & 25 \\
 6,31 & 36 \\
 7,30 & 12 \\
 8,29 & 27 \\
 9,28 &  7 \\
10,27 & 26 \\
11,26 & 10 \\
12,25 & 33 \\
13,24 & 21 \\
14,23 & 11 \\
15,22 &  3 \\
16,21 & 34 \\
17,20 & 30 \\
18,19 & 28 \\
\hline 
\end{array}
TOTAL = $2 \times 19 = 38$
