Let $p$ be odd prime number,show that:
$$p=3k+1\Longleftrightarrow \exists a,b\in\Bbb Z^+ \textrm{ such that } p=a^2+ab+b^2$$
I guess this is true because I find
when: $p=7,k=2$,and $$7=2^2+2\cdot 1+1^2$$
(2) when $p=13,k=4$,and $$13=1^2+1\cdot 3+3^2$$ and so on.
How do I prove this ?