We know that $p=x^2+xy+y^2$ if and only if $p \equiv 1 \pmod {3}$.
But I need $a^2+ab+b^2 \equiv 0 \pmod{p} $ if and only if $p \equiv 1 \pmod {3}$, more generalized theorem.
I think that i should proof below :
$\exists a,b$ such that $a^2 + ab + b^2 \equiv 0 \pmod{p} \iff \exists x,y $ such taht $x^2 + xy + y^2 = p$
Easy to prove ($\Longleftarrow$), but not ($\implies$).
These are some examples.
$2^2 + 2 \cdot 4 + 4^2 = 4( 1^2 + 1 \cdot 2 + 2^2) = 4 \cdot 7$
$3^2 + 3 \cdot 9 + 9^2 = 9( 1^2 + 1 \cdot 3 + 3^2) = 9 \cdot 13$
$7^2 + 7 \cdot 11 + 11^2 = 13( 2^2 + 2 \cdot 3 + 3^2) = 13 \cdot 19$
$5^2 + 5 \cdot 25 + 25^2 = 25( 1^2 + 1 \cdot 5 + 5^2) = 25 \cdot 31$
$10^2 + 10 \cdot 26 + 26^2 = 28( 3^2 + 3 \cdot 4 + 4^2) = 28 \cdot 37$
$6^2 + 6 \cdot 36 + 36^2 = 36( 1^2 + 1 \cdot 6 + 6^2) = 36 \cdot 43$
$13^2 + 13 \cdot 47 + 47^2 = 49( 4^2 + 4 \cdot 5 + 5^2) = 49 \cdot 61$
$29^2 + 29 \cdot 37 + 37^2 = 49( 2^2 + 2 \cdot 7 + 7^2) = 49 \cdot 67$
to get this third identity and take it from here.
$$\left((b+a)^2 + (b+a)(b-a) + (b-a)^2)((d+c)^2 + (d+c)(d-c) + (d-c)^2)\right) = \left((bc - ad + ac + 3bd)^2 + (bc-ad + ac+3bd)(bc -ad -ac - 3bd) + (bc -ad - ac - 3bd)^2\right)$$
– sku Jul 10 '17 at 03:07