We have, $$x^3+x^2-2x-1=0,\quad\quad x =\sum_{k=1}^{2}\,\exp\Bigl(\tfrac{2\pi\, i\, (6^k)}{7}\Bigr)\\ x^3+x^2-4x+1=0,\quad\quad x =\sum_{k=1}^{4}\,\exp\Bigl(\tfrac{2\pi\, i\, (5^k)}{13}\Bigr)\\ x^3+x^2-6x-7=0,\quad\quad x =\sum_{k=1}^{6}\,\exp\Bigl(\tfrac{2\pi\, i\, (8^k)}{19}\Bigr)$$ and so on. It seems the general formula is, given a prime $p=6m+1$ and the unique solution $u,v$ to, $$u^2+27v^2=4p$$ then,
$$x^3+x^2-2mx+\frac{1-3p\pm p u}{27}=0\tag1$$
for the appropriate sign $\pm$ and where $x =\sum_{k=1}^{2m}\,\exp\Bigl(\tfrac{2\pi\, i\, (\color{blue}c^k)}{p}\Bigr)$ and appropriate integer $\color{blue}c$. For example, for $p=7$, we have $$(-1)^2+27\times1^2=4\times7$$ and using $u=-1$ on formula $(1)$, we recover the first example.
Q: Is it possible to find a formula for the sign $\pm$ and/or $\color{blue}c\,$ as a function of $p$?
$\color{blue}{Update}$: It seems the answer to the part about the sign is yes. While checking the OEIS for the sequence of solutions $u=1, 5, 7, 4, 11, 8,\dots$, it turns out there is signed version using the Kronecker symbol(?). Thus,
$$x^3+x^2-2mx+\frac{1-3p- p\,u'}{27}=0\tag2$$
where $u'=1, -5, 7, 4, -11, -8,\dots$ and given by A123489.