While looking at the Mersenne numbers (for prime $p$, the number $2^p-1$), I noticed that only certain of them had any solution to the modular equation $i^2+i+1\equiv 0\pmod{2^p-1}$, e.g., $p=3,5,7,13,17,19,31,37,...$ but not $p=11,23,29,...$.
I have gotten as far as realizing that if $k$ is a solution then so is $-k-1$.
Questions:
- Is it possible to solve this modular equation (assuming there is a solution) in general given these restrictions?
- Suppose that for a given $p$ there is a solution $k$ such that $k^2+k+1\equiv 0\pmod{2^p-1}$; then $k\cdot(k+1)\equiv -1\pmod{2^p-1}$. Then (as noted in a comment) $k^3\equiv -(k+1)^3\equiv 1\pmod{2^p-1}$. Is it possible to conclusively prove whether $k$ or $k+1$ is a quadratic non-residue from this information?
Hint $\ $ If the quadratic is solvable then its discriminant $\,-3\,$ is a square mod $\,n = 2^p-1,\,$ so it remains a square mod each prime $\,q\mid n.\,$ But $\,-3\,$ is a square mod prime $q\iff q=1\pmod 3.\,$ Now, notice that the cases that you list having no roots all have prime factors $\ q = -1 \pmod 3,\,$ namely $2^{11}-1 = 23\cdot 89,\,\ 2^{23}-1 = 47\cdot 178481,\ldots$