<s>[INST] When one of these two equations has integral sol, why p=3 (mod 4)? Let p is not 7 and p be an odd prime.
AND one of two equations 
$x^2+7y^2=p, x^2-7y^2=p$
has integral sol (x,y). then show that $p \equiv3 \pmod4$
what i have done is this, in $\pmod7$, two equations are $x^2 \equiv p \pmod7$
and $p$ can be only $1$ or $2$ or $4$ by testing from $1$ to $7$
 [/INST] Suppose $x^2+7y^2=p$. Applying modulo 4:
$$x^2+3y^2=p \pmod 4 \tag1$$ then $$x^2-y^2=p \pmod 4 \tag2$$ Because $p,4$ are coprime from (2) we get $x \ne y \pmod 4$. 
Because $a^2 \in \{0, 1\} \pmod 4 \ \forall a$, we have $x^2=0,y^2=1$ or $x^2=1,y^2=0$. 
From the first case we get $p = 3 \pmod 4$ and from the second case $p=1 \pmod 4$. 
Both cases are possible:
1) $x=2, y=1$ then $p=11$ and $11 = 3 \pmod 4$
2) $x=1,y=2$ then $p=29$ and $29 = 1 \pmod 4$
Therefore your claim $p \equiv3 \pmod4$ is false.
</s>