p is a prime ,on what condition the Diophantine equation is solvable.what is it Linear expression ,for example ,$x^2+3y^2=p$, $p=3k+1$ ,$x^2+5y^2=p$ , $p=1,9\pmod{20}$.
closed as offtopic by Carlo Beenakker, Andrey Rekalo, Stefan Kohl, Ryan Budney, Jack Huizenga Nov 24 '13 at 12:07This question appears to be offtopic. The users who voted to close gave this specific reason:



It is a rather difficult result that primes of the form $x^2 + 27y^2$ are not characterized by linear forms; this requires limitation theorems from class field theory. Already Euler conjectured that $2$ is a cubic residue modulo primes $p = 3n+1$ if and only if $p$ can be written in the form $p = x^2 + 27y^2$. This was later proved by Gauss, Jacobi and Eisenstein. Cox has written a whole book about this problem, which I recommend to everyone interested in such problems. In your case, you have to combine this result with the question which of $a$ or $b$ is even in $p = a^2 + 3b^2$; this can be decided by congruences. 

