<s>[INST] Is every Mersenne prime of the form : $x^2+3 \cdot y^2$? How to prove or disprove following statement :

Conjecture :
Every Mersenne prime number can be uniquely written in the form : $x^2+3 \cdot y^2$ ,
where $\gcd(x,y)=1$ and $x,y \geq 0$

Since $M_p$ is an odd number it follows that : $M_p \equiv 1 \pmod 2$
According to Fermat little theorem we can write :
$2^p \equiv 2 \pmod p \Rightarrow 2^p-1 \equiv 1\pmod p \Rightarrow M_p \equiv 1 \pmod p$
We also know that :
$2 \equiv -1 \pmod 3 \Rightarrow 2^p \equiv (-1)^p \pmod 3 \Rightarrow 2^p-1 \equiv -1-1 \pmod 3 \Rightarrow$
$\Rightarrow M_p \equiv -2 \pmod 3 \Rightarrow M_p \equiv 1 \pmod 3$
So , we have following equivalences :
$M_p \equiv 1 \pmod 2$ , $M_p \equiv 1 \pmod 3$ and $M_p \equiv 1 \pmod p$ , therefore for $p>3$
we can conclude that : $ M_p \equiv 1 \pmod {6 \cdot p}$

On the other hand : If $x^2+3\cdot y^2$ is a prime number greater than $5$ then :
$x^2+3\cdot y^2 \equiv 1 \pmod 6$
Proof :
Since $x^2+3\cdot y^2$ is a prime number greater than $3$ it must be of the form $6k+1$ or $6k-1$ .
Let's suppose that $x^2+3\cdot y^2$ is of the form $6k-1$:
$x^2+3\cdot y^2=6k-1 \Rightarrow x^2+3 \cdot y^2+1 =6k \Rightarrow 6 | x^2+3 \cdot y^2+1 \Rightarrow$
$\Rightarrow  6 | x^2+1$ , and $ 6 | 3 \cdot y^2$
If $6 | x^2+1 $ then : $2 | x^2+1$ , and $3 | x^2+1$ , but :
$x^2 \not\equiv -1 \pmod 3 \Rightarrow 3 \nmid x^2+1 \Rightarrow 6 \nmid x^2+1 \Rightarrow 6 \nmid x^2+3 \cdot y^2+1$ , therefore :
$x^2+3\cdot y^2$ is of the form $6k+1$ , so : $x^2+3\cdot y^2 \equiv 1 \pmod 6$

We have shown that : $M_p \equiv 1 \pmod {6 \cdot p}$, for $p>3$ and $x^2+3\cdot y^2 \equiv 1 \pmod 6$ if $x^2+3\cdot y^2$ is a prime number greater than $5$ .
This result is a necessary condition but it seems that I am not much closer to the solution of the conjecture than in the begining of my reasoning ...
 [/INST] It is a theorem that may have been first proved by Euler (but was known to Fermat) that every prime $p$ of the form $6k+1$ can be expressed in the form $p=x^2+3y^2$, where $x$ and $y$ are integers.
This representability question has been discussed on StackExchange. Please see here for a compact complete proof by Ewan Delanoy.
</s>