(Note: (n|p)=1 is legendre-symbol.)
So need to find primes where $(n|p)=1$ So we have
1- $1\pmod 4$ where we use quadratic residue of $n$ along with $\pmod n$ to find solutions.
2- Then we have $3\pmod 4$ where we use quadratic nonresidues of $n$ again with $(\!\bmod n)$ to find more solutions.
3-We combine solutions from 1 and 2 to get all primes in the form of $$p\equiv \langle \text{solutions-from-above}\rangle\pmod{4\times n} $$
But how to do we go about solving some thing with $'-1'$ like $ (n|p) = -1 $ for example $ (3|p) = -1 $ or $(2|p)=-1$.
Or some thing with more solutions as $(5|p)=-1$.
Examples from the book:.
in the book it says.
$(2|p) \equiv 1$ gives $p \equiv 1 (mod 8)$.
$(2|p) \equiv -1$ gives $p \equiv 3 (mod 8)$.
$(3|p) \equiv 1$ gives $p \equiv 1 (mod 12)$'
$(3|p) \equiv -1$ gives $p \equiv 7 (mod 12)$.
Thank you.