So I am trying to prove that $p\equiv 1\pmod{3}$ implies that there exists integers $a,b$ such that $p=a^2+ab+b^2.$
First using quadratic reciprocity we have the existence of integer $d$ such that $d^2\equiv -3\pmod{p}.$ Next I constructed a set $$S=\{a-zb:a,b\in \mathbb{Z}, 0\leq a,b<\sqrt{p}\}.$$ where $z\equiv \frac{d-1}{2}\pmod{p}.$ This is following the answer given to the following question. I can't use Minkowski's theorem since we have not seen it in our course. Next, using pigeonhole principle we can claim the existence of two integers $a'-qb'$ and $a''-qb''$ such that $a'-qb'\equiv a''-qb''\pmod{p}$ and so we let $a=a'-a''$ and $b=b'-b''$ then we have that $$a\equiv qb\pmod{p}.$$ From this we show that $a^2+ab+b^2\equiv 0\pmod{p}.$ But then the estimate, $$a^2+ab+b^2<3p$$ is not helpful in deducing that $a^2+ab+b^2=p.$ Is there a way of fixing this argument?
Extra: I also tried to show this using another thread that I found here. We can show that given $p\equiv 1\pmod{p}$ there exists $x<p$ such that $p|x^2+x+1.$ So now if $p|x-\omega$ in $\mathbb{Z}[\omega]$ then $x-\omega = p(a+b\omega)$ which would imply that $x=pa$ which is not possible. So then $p\not|(x-\omega)$ and similarily $p\not|(x-\omega^2).$ Thus, $p=mn$ for $N(m),N(n)>1$ Then $N(m)=p$ since $N(m)|p^2.$ Thus we have that $a^2-ab+b^2=(-a)^2+(-a)(b) + b^2=p.$ I am not sure if this argument works, but this was just another direction I was exploring.