Infinitely many prime quadratic nonresidues of a nonsquare integer (source code)

= Infinitely many prime quadratic nonresidues of a nonsquare integer

For an odd positive nonsquare integer $a$, there are infinitely many <primes> $p$ with <Legendre symbol> $(a/p)=-1$. Choose a residue $n$ modulo $a$ with <Jacobi symbol> $(n/a)=-1$ by making it a <quadratic nonresidue> at one prime occurring to odd multiplicity and a square at every other prime. The <Chinese remainder theorem> also imposes $n\equiv1\pmod4$ and $n\equiv1$ at any finite list of previously found primes. Then <Jacobi reciprocity> gives $(a/n)=-1$, so a prime factor of $n$ has $(a/p)=-1$ and is outside that list.