$p=x^2+y^2$ has solution in $\Bbb Z$ if only if $p=2$ or $p\equiv 1 \pmod 4$(Using easy calculation of quotient ring), and has solution in $\Bbb Q$ if only if $p=2$ or $p\equiv 1 \pmod 4$(Using Hilbert symbol).
The condition of $p$ coincidence.
But about $p=x^2+26y^2$, it has no solution in $\Bbb Z$ but has solution in $\Bbb Q$.
I heard such phenomenon ( the difference between solution of the form $p=x^2+ay^2$ on $\Bbb Z$ and $\Bbb Q$ occurs in a kind of condition of $a$) is deeply related to global class field theory.
But I couldn't find reference.
Could you explain about this issue or give me reference(website) ?