The quadratic reciprocity law states that for $p\_1\ne p\_2$ prime, the product $\left(\frac{p\_1}{p\_2}\right)\left(\frac{p\_2}{p\_1}\right)$ takes values $1$ or $-1$ depending on whether $p\_1$ and $p\_2$ satisfy some set of restrictions mod $4$.


Is there a "quadratic reciprocity law for three primes"? I suspect that the answer is negative.



> 
> Is it true that for any integers $M>0$, $\varepsilon\in\{-1,1\}$, and $r\_1,r\_2,r\_3$ coprime with $M$, there exist primes $p\_1\equiv r\_1\pmod M$, $p\_2\equiv r\_2\pmod M$, and $p\_3\equiv r\_3\pmod M$ such that
>  $$ \left(\frac{p\_1}{p\_2}\right)\left(\frac{p\_2}{p\_3}\right)\left(\frac{p\_3}{p\_1}\right) = \varepsilon ? $$
> 
> 
> 


What about, say, five primes?



Quadratic reciprocity for three primes?
Turns out the details are easy so I worked them out myself :) The highlighted statement is true.


Let me assume $4\mid M$. Pick $p\_2,p\_3$ arbitrary satisfying the congruence modulo $M$ (they exist by Dirichlet). Take any $p\_1$ which is congruent to $r\_1\pmod M$, congruent to $p\_2^{-1}\pmod{p\_3}$, and such that
$$\left(\frac{p\_1}{p\_2}\right)=\varepsilon\cdot(-1)^{\frac{r\_1-1}{2}\frac{r\_3-1}{2}}$$
(which exists by Dirichlet, CRT, and existence of (non)residues modulo $p\_2$.) We have
$$\begin{align\*}\left(\frac{p\_2}{p\_3}\right)\left(\frac{p\_3}{p\_1}\right)&=\left(\frac{p\_2}{p\_3}\right)\left(\frac{p\_1}{p\_3}\right)\cdot(-1)^{\frac{p\_1-1}{2}\frac{p\_3-1}{2}}\\
&=\left(\frac{p\_1p\_2}{p\_3}\right)\cdot(-1)^{\frac{r\_1-1}{2}\frac{r\_3-1}{2}}\\
&=\left(\frac{1}{p\_3}\right)\cdot(-1)^{\frac{r\_1-1}{2}\frac{r\_3-1}{2}}\\
&=(-1)^{\frac{r\_1-1}{2}\frac{r\_3-1}{2}}
\end{align\*}$$
(second inequality follows since $p\_1\equiv r\_1,p\_3\equiv r\_3\pmod 4$), so multiplying by $\left(\frac{p\_1}{p\_2}\right)$ leaves $\varepsilon$.


