$p$ is an odd prime number where $p=3k+1\Longleftrightarrow\exists a,b\in\Bbb Z^+$ such that $p=a^2+ab+b^2$ 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 ?

HINT:
For odd prime $p$,
$$a^2+ab+b^2=p\implies(2a+b)^2\equiv-3b^2\mod p$$
$$\iff\left(\frac{2a+b}b\right)^2=-3\mod p$$
Check when $-3$ is a Quadratic Residue $\pmod p$
Now, use this

Alternatively, $$\left(\frac{-3}p\right)=\left(\frac{-1}p\right)\cdot\left(\frac3p\right)$$
$-1$ is a quadratic residue modulo $p$ if and only if $p\equiv 1\pmod{4}$
Using Quadratic Reciprocity Theorem
$$\left(\frac3p\right)\left(\frac p3\right)=(-1)^{\frac{(p-1)(3-1)}4}=(-1)^{\frac{p-1}2}$$
$$a\equiv\pm1\pmod 3\implies a^2\equiv1\pmod3$$
Can you take it home from here?
