Let $p\geqslant 5$ be a prime. I want to solve $$4p=x^{2}+27y^{2} \tag{1}\quad x,y\in \Bbb N$$
This comes when considering the discriminant of a cubic polynomial $T^3 -pT-yp$ with cyclic group. Are there only elementary ways to find solutions? I only achieved a bit of it.
Firstly, since the right hand side of (1) must be even, so x and y have same parity.
If $p$ is prime, then $\mathrm{gcd}(p,6)=1\Rightarrow p=1,5\mod6$.
Using the hint. Case $p=5+6m$. If $x,y$ are even, let $x=2x',y=2y'$ so $5+6m=x'^{2}+27y'^{2}$. Then modulo 3, we get $2\equiv x'^{2}\mod3$, impossible. Thus $x,y$ are both odd. Let $x=2x'+1$ and $y=2y'+1$ so $6m=(x'^{2}+x')+23+27(y'^{2}+y')$. Modulo 3, this gives $x'^{2}+x'\equiv1\mod3$, without solutions in $\mathbb{F}_{3}$. Therefor, the equation (1) has no solution when $p=5+6m$.
So case $p=1+6m$. The equation (1) becomes $4+24m=x^{2}+27y^{2}$.
If $x,y$ are even, let $x=2x'$ and $y=2y'$. Then $1+6m=x'^{2}+27y'^{2}$. Since $x'^{2}-1=6m-27y'^{2}$, then $x$ and $y$ can be even only when $m\geqslant5\Leftrightarrow p\geqslant31$.
It follow that when $m\leqslant4$ that $x$ and $y$ are necessarily odd. Let $x=2x'+1$ and $y=2y'+1$. Then $6(m-1)=x'^{2}+x'+27(y'^{2}+y')$. Since $6(m-1)\leqslant18$, then $y'=0\Rightarrow y=1$. This gives $x'^{2}+x'=6(m-1)$. For example, $m=3\Leftrightarrow p=19$, then $12=x'+x'^{2}$ so $x'=3$ and $x=7$.