Let $p\_1, p\_2, \dotsc, p\_n$ be distinct primes, and let $\epsilon\_1, \epsilon\_2, \dotsc, \epsilon\_n$ be an arbitrary sequence of $1$ and $-1$.


There is an integer $a$ such that $\left( \frac{a}{p\_1} \right) = \epsilon\_1, \left( \frac{a}{p\_2} \right) = \epsilon\_2, \dotsc, \left( \frac{a}{p\_n} \right) = \epsilon\_n$, where $\left( \frac{a}{p\_i} \right)$ denotes Legendre's symbol.


What can we say about the number $a$? -- I couldn't find any results for such numbers.


In particular, I am interested in bounds for the smallest possible $|a|$.


Could you recommend any papers or books on the topic?


EDIT


It's better to write "distinct odd primes" for $p\_1, p\_2, \dotsc, p\_n$.


I have checked for several primes $< 1000$ by using computer. The smallest $a > 0$ does not seem to go beyond the product of two largest primes.



Quadratic residues and nonresidues of arbitrary patterns
Noam Elkies argument [here](https://mathoverflow.net/a/123636/297) shows that some such $A$ must occur among any consecutive $\prod (p\_i+3)/2 +1$ integers. In Elkies notation, take $a\_i = p\_i$; take $A\_i$ to be the $(p\_i-1)/2$ residue classes modulo $p\_i$ which are "good" and take $Z\_i$ to be the $(p\_i+1)/2$ residue classes which are "bad". I expect one can do better than this.


