Perfect equidistribution for the Legendre symbol Let $p $ be an odd prime. Assume that we have the following perfect pattern:
all the primes below $p$ are successively quadratic residues and quadratic non-residues. What can we say about $p$? Is it possible that only finitely many such $p$ exist?
Edit: Mathematically I mean: denote by $p_n$ the $n$-th smallest prime. Then is it true that there are infinitely many $N$ with the two properties
$$1\leq n < N \& \ n \text{ odd } \Rightarrow (\frac{p_n}{p_N})=(\frac{p_1}{p_N})$$
and
$$1\leq n < N \& \ n \text{ even } \Rightarrow (\frac{p_n}{p_N})=(\frac{p_2}{p_N}).$$
 A: It is very likely that there are only finitely many primes with this property. Heuristically, the probability of this happening for the $N$th prime is $2^{2-N}$, and $\sum_{N \geq 2} 2^{2-N}  =2$, so we expect only a couple primes where this happens.
I can't see how one would ever hope to prove this. However, we can prove there are not many such primes in some large intervals.
If $p$ and $q$ are two such primes with $p<q$, then $\left( \frac{ \ell}{pq}\right)$ is either the constant function $1$ for $\ell<p$ or the constant function $-1$. Thus $\left( \frac{m}{pq} \right)$ is either the constant function $1$ for $m < pq$ or the Möbius function. The second case is a Siegel zero-type phenomenon, but the first case is easier to rule out.
Since most numbers $< p^{\sqrt{e}}$ have only prime factors $<p$, the average of the Legendre symbol $\left( \frac{m}{pq} \right)$ over numbers $< p^{\sqrt{e}}$ is positive and large in the first case - there are more $1$s then $-1$s. By Burgess, this is impossible unless $pq > (p^{\sqrt{e}})^{4-\epsilon}$, or $q> p^{ 4 \sqrt{e}-1 -o(1)}$.
So every perfectl equidistributed prime between $p$ and $ p^{ 4 \sqrt{e}-1 -o(1)}$ must have the opposite sign (of the Legendre symbol applied to 2) from $p$. Since these perfectly equidistributed primes must also have opposite signs from each other, there can be at most one more perfectly equidistributed prime in that range.
This means the number of perfectly equidistributed primes $<n$ is at most $$  \left(\frac{2}{ \log (4 \sqrt{e}-1)} + o(1)\right)  \log \log n.$$
So there can be very few such primes in a given range.
