<s>[INST] Evaluate the Legendre's Symbol $\frac{2017}{5003}$ I got 1, this is the way I approached this. Any suggestion to get the answer faster or less messy is appreciated.
$\frac{2017}{5003} = (-1)^{(2016)(5002)/4}(\frac{5003}{2017})$
= $\frac{969}{2017} = (-1)^{(968)(2016)/4}(\frac{2017}{969})$
= $\frac{79}{969} = (-1)^{(78)(968)/4}(\frac{969}{79})$
= $\frac{21}{79} = (-1)^{(20)(78)/4}(\frac{79}{21})$
= $\frac{16}{21} = (-1)^{(15)(20)/4}(\frac{21}{16})$
= $\frac{16}{21} \rightarrow \frac{4}{7} \times \frac{4}{3} \rightarrow \frac{2^2}{7} \times \frac{2^2}{4} \rightarrow 1 \times 1 =1.$
 [/INST] You forgot all remainders are not primes, and the Legendre's symbol is multiplicative. Thus, since $969=3\cdot 17\cdot 19$, we have that
\begin{align}
\Bigl(\frac{969}{2017}\Bigr)&=\Bigl(\frac{3}{2017}\Bigr)\Bigl(\frac{17}{2017}\Bigr)\Bigl(\frac{19}{2017}\Bigr)=\Bigl(\frac{2017}{3}\Bigr)\Bigl(\frac{2017}{17}\Bigr)\Bigl(\frac{2017}{19}\Bigr) \\
&=\Bigl(\frac{1}{3}\Bigr)\Bigl(\frac{11}{17}\Bigr)\Bigl(\frac{3}{19}\Bigr)=\Bigl(\frac{11}{17}\Bigr)\Bigl(\frac{3}{19}\Bigr)\\
&=\Bigl(\frac{17}{11}\Bigr)\cdot (-1)\Bigl(\frac{19}{3}\Bigr)=-\Bigl(\frac{6}{11}\Bigr)\Bigl(\frac{1}{3}\Bigr)=-\Bigl(\frac{6}{11}\Bigr)=+1.
\end{align}
</s>