Trying to generalize [this answered question](https://mathoverflow.net/questions/283758/conjecture-the-number-of-points-modulo-p-of-certain-elliptic-curve-is-p-or) based on limited numerical evidence.


Let $E / \mathbb{F}\_p : y^2=x^3+2$.


**Conjecture 1** Let $p=3a^2+3ab\_0+b\_0^2$ be prime and $a,b\_0$ 
positive integers.


Let $b=|p+1-\#E(\mathbb{F}\_p)|$. For some integer $a$ (not necessarily positive)
$p=3a^2+3ab+b^2$.


In some non-rigorous sense if $p=3a^2+3ab+b^2$ then $b=|p+1-\#E(\mathbb{F}\_p)|$.


**Conjecture 2** Let $p=27a^2+27ab+7b^2$ be prime and $a,b$ 
positive integers. Then $b=|p+1-\#E(\mathbb{F}\_p)|$.
If the representation of $p$ in this form is not unique the conjecture 
is false (or possibly proceed as in Conjecture 1).


Example sage session:



```
sage: b=11;a=2^100+28;p=27*a^2+27*a*b+7*b^2;Kp=GF(p);E=EllipticCurve([Kp(0),Kp(2)])
sage: b2=abs(p+1-E.order());b==b2
True

```


Primes of the form $p=3a^2+3ab+b^2$ or $p=27a^2+27ab+7b^2$ and the number of points of $y^2=x^3+2$ modulo $p$
These conjectures are also true, and they follow similarly as in my proofs [here](https://mathoverflow.net/questions/283758/conjecture-the-number-of-points-modulo-p-of-certain-elliptic-curve-is-p-or) and [here](https://mathoverflow.net/questions/283862/e-mathbbf-p-in-p-p2-iff-p-is-of-the-form-27a227a7).


**Proof of Conjecture 1.** Let us denote $b=|p+1-\#E(\mathbb{F}\_p)|$. The assumption on $p$ implies that $p\equiv 1\pmod{3}$, hence by my earlier posts, $4p=b^2+27c^2$ for some integer $c$. Then, $b$ and $c$ have the same parity, so that $3c=2a+b$ for some integer $a$. Finally,
$$4p=b^2+27b^2=b^2+3(2a+b)^2=4(3a^2+3ab+b^2),$$
and the conclusion $p=3a^2+3ab+b^2$ follows. Done.


**Proof of Conjecture 2.** The assumption on $p$ implies that $4p=b^2+27(2a+b)^2$, whence $b=|p+1-\#E(\mathbb{F}\_p)|$ by my earlier posts. Done.


