17. Find all values of $m$ for which the congruence
$$x^{2} \equiv 6(\bmod m)$$

may have a solution.
17. Solution: If $m$ is odd, then the necessary condition for $x^{2} \equiv 6(\bmod m)$ to have a solution is $\left(\frac{6}{m}\right)=1$. By the properties of the Legendre symbol, we have
$$\left(\frac{6}{m}\right)=\left(\frac{2}{m}\right)\left(\frac{3}{m}\right)=(-1)^{\frac{m^{2}-1}{8}} \cdot(-1)^{\frac{m-1}{2}}\left(\frac{m}{3}\right)$$

Since

Thus, the $m$ that makes $\left(\frac{6}{m}\right)=1$ must be the solutions to the following system of congruences:

Among these, the second, third, fifth, and eighth systems of congruences have no solutions. From the first, fourth, sixth, and seventh systems, we get
$$m \equiv 1,-1,-5,5(\bmod 24)$$
- That is, when $m$ is odd, $\left(\frac{6}{m}\right)=1$ if and only if $m \equiv \pm 1, \pm 5(\bmod 24)$.

If $m$ is even, we can set $m=2^{k} n(k \geqslant 1,2 \times n)$. The congruence $x^{2} \equiv 6(\bmod m)$ can be decomposed into
$$\begin{array}{l}
x^{2} \equiv 6\left(\bmod 2^{k}\right) \\
x^{2} \equiv 6(\bmod n)
\end{array}$$

For (26), as shown above, the necessary condition for (26) to have a solution is
$$n \equiv \pm 1, \pm 5(\bmod 24)$$

Now consider (25). When $k=1$, (25) clearly has a solution $x \equiv 0 (\bmod 2)$. When $k=2$, (25) clearly has no solution, so (25) has no solution for $k \geqslant 2$. Combining these, we get that the given congruence equation may have a solution when $m \equiv \pm 1, \pm 2, \pm 5, \pm 10(\bmod 24)$.
$$\begin{array}{l}
(-1)^{\frac{m^{2}-1}{8}}=\left\{\begin{array}{c}
1, \quad m \equiv \pm 1(\bmod 8), \\
-1, m \equiv \pm 3(\bmod 8),
\end{array}\right. \\
(-1)^{\frac{m-1}{2}}=\left\{\begin{array}{ll}
1, & m \equiv 1(\bmod 4), \\
-1, & m \equiv-1(\bmod 4),
\end{array}\right. \\
\left(\frac{m}{3}\right)=\left\{\begin{array}{ll}
1, & m \equiv 1 \quad(\bmod 3), \\
-1 & m \equiv-1 \quad(\bmod 3) .
\end{array}\right.
\end{array}$$
$$\begin{array}{l}
\left\{\begin{array}{l}
m \equiv 1(\bmod 8) \\
m \equiv 1(\bmod 4) \\
m \equiv 1(\bmod 3)
\end{array},\left\{\begin{array}{l}
m \equiv-1(\bmod 8) \\
m \equiv 1(\bmod 4) \\
m \equiv 1(\bmod 3)
\end{array}, \quad\left\{\begin{array}{l}
m \equiv 1(\bmod 8) \\
m \equiv-1(\bmod 4) \\
m \equiv-1(\bmod 3)
\end{array}\right.\right.\right. \\
\left\{\begin{array}{l}
m \equiv-1(\bmod 8) \\
m \equiv-1(\bmod 4), \\
m \equiv-1(\bmod 3),
\end{array},\left\{\begin{array}{l}
m \equiv 3(\bmod 8), \\
m \equiv 1(\bmod 4) \\
m \equiv-1(\bmod 3)
\end{array},\left\{\begin{array}{l}
m \equiv 3(\bmod 8) \\
m \equiv-1(\bmod 4) \\
m \equiv 1(\bmod 3)
\end{array}\right.\right.\right. \\
\left\{\begin{array}{l}
m \equiv-3(\bmod 8), \\
m \equiv 1(\bmod 4), \\
m \equiv-1(\bmod 3), \\
m \equiv-3(\bmod 8), \\
m \equiv-1(\bmod 4), \\
m \equiv 1(\bmod 3) .
\end{array}\right.
\end{array}$$