I'm going through an old final from 2003 on MIT's Opencourseware, and problem 6b is giving me a little trouble.
It asks for which primes $p$ is $34$ a square modulo $p$. I approached it like this:
$$\left(\frac{34}{p}\right)=\left(\frac{2}{p}\right)\left(\frac{17}{p}\right)=(-1)^{(p^2-1)/8}\left(\frac{p}{17}\right).$$
I figure I can break it down into cases where $p\equiv 1,3,5,7\pmod{8}$. So if $p\equiv 1\pmod{8}$, then $(2|p)=1$, and thus I want $(p|17)=1$ as well. I calculated all the squares modulo $17$, and found them to be $1,2,4,8,9,13,15,16$. I suppose I could then go through all cases where $p\equiv 1\pmod{8}$, and $p\equiv 1,2,4,8,\dots\pmod{17}$, and then use the Chinese remainder theorem to find what $p$ is congruent to modulo $8\cdot 17$, but this seems very tedious to do for each case. First of all, is my method correct, and also, is there a better way to solve this question? Thank you.