TITLE: What's so special about primes $x^2+27y^2 = 31,43, 109, 157,\dots$ for cubics?
QUESTION [9 upvotes]: While trying to find a closed-form solution for particular cubics as sums of cosines (related to this question), I came across this family with all roots real. Given a prime $p=6m+1$. Define,
$$F(x) = x^3+x^2-2mx+N =
\Big(x-2\sum_{k=1}^{m}\cos a\Big) \Big(x-2\sum_{k=1}^{m}\cos b\Big) \Big(x-2\sum_{k=1}^{m}\cos c\Big)=0$$
where,
$$a=2^k\times\beta,\;\;b=2^k\times3\beta,\;\;c=2^k\times m\beta,$$
and $\beta = \displaystyle\frac{2\pi}{p}$. I noticed that for certain primes, then $N$ is an integer. The complete list for small $p$,
$$\begin{array}{|c|c|}
\hline
p&N\\
\hline
31&  -8\\
43& 8\\
109&  -4\\
157&  64\\
223&  -256\\
229&  -212\\
277&  236\\
283&  304\\
\hline
\end{array}$$
Questions:

What is the complete list of such primes for a low bound, say $p<3000$? (My old version of Mathematica conks out at $p>2000$.) 
What do these primes $p$ have in common that make them distinct from other primes? (Other than that their $N$ is an integer.)
The coefficients of the cubic $F(x)=0$ are simple polynomials in $m$, except the constant term. Can $N$ be expressed as a polynomial in $m$?

P.S. I've checked the OEIS and it's not there, but the list I have for $p<2000$ suggests that a necessary (but not sufficient) condition is that 
$$p = x^2+27y^2,\quad\text{and}\quad 2^{2m} = 1\;\text{mod}\;p$$
(A014752) and (A016108), though it would be great if someone can prove (or disprove) that if $N$ is an integer, then these must hold.

REPLY [2 votes]: Question 1 was answered by Peter Kosinar in the comments, and a general version of Question 2 was answered by Michael Stoll in this MO post. 
The general case of Question 3 is in this post.
P.S. One nice thing about these cubics is that, starting with Ramanujan's general cubic identity, they are a special case, yielding the simple,
$$(a+b\,x_1)^{1/3}+(a+b\,x_2)^{1/3}+(a+b\,x_3)^{1/3}=\big(c+\sqrt[3]{dp}\big)^{1/3}$$
for some rational $a,b,c,d$. For example, using $p=109$, so $x^3 + x^2 - 36x - 4=0$, then,
$$(2+x_1)^{1/3}+(2+x_2)^{1/3}+(2+x_3)^{1/3}=\big({-19}+\sqrt[3]{4\cdot109}\big)^{1/3}=1.553389\dots$$