How can I easily determine how many $k$ have a square root $\mod n$ without having to write them out?
For example, I could ask how many $1\le k\le 143$ have a square root $\mod 143$. I can look at $\mod 11$ and $\mod 13$.
$k=1,3,4,5,9$ have roots $\mod 11$ and
$k=1,3,4,9,10,12$ have roots $\mod 13$.
If some $k$ is both a root $\mod 11$ and $\mod 13$, does that mean it's a root $\mod 11\cdot 13$?
I know for odd prime $p$ that $x^2\equiv a \mod p$ has either $0$ or $2$ solutions (provided $a\ne 0$) and I would assume then that for any prime modulus $p$ that there are (probably?) $\frac{p-1}{2}$ roots $\mod p$?. What if instead of having a modulus of $143$, we had $2^e\cdot 143$ as a modulus for some $e\ge 1$? What happens to the number of roots?