In this post I consider the equation $$k\cdot x=y^2+z^2(x^2-2)-2\tag{1}$$ over odd integers $y\geq 1$ and $z\geq 1$, and over integers $k\geq 1$ and very large Mersenne exponents $x$ such that $x^2-2$ is a prime number.

Previous Diophantine equation $(1)$ is consequence of Fermat's little theorem applied to the diophantine equation studied by professors Alexandru Gica and Florian Luca in Conjecture 4 of [1]. Mersenne exponents is the sequence A000043 from The On-Line Encyclopedia of Integer Sequences (I add that also Wikipedia has the article Mersenne prime).

I wondered about this problem that I've stated after I've realized that the $x's$ of the solutions $(x,y,z)$ of professors in [1], in the context of their Conjecture 4, are Mersenne exponents. I'm asking this post as curiosity, similar to the post that I've edited for $x=61$ in Mathematics Stack Exchange post [2] with identificator 4479581.

Question. I would like to know if it is possible to do some work in order to find or characterize all solutions of the corresponding equation $(1)$, over $k\geq 1$ integer, and over odd integers $y\geq 1$ and $z\geq 1$ of the diophantine equation $$25964951\cdot k=y^2+674178680432399\cdot z^2-2.\tag{2}$$ (This is the specialization of $(1)$ for the implicit Mersenne exponent.) Many thanks.

Remarks and clarifications (see comments). Equivalently solve $y^2+Qz^2\equiv2\bmod{25964951}$ where $Q=674178680432399$, for odd integers $y,z\geq 1$. Here a Mersenne exponent is a integer $p$ (in fact can be proved that it is a prime number) such that $2^p-1$ is a prime number.

I hope that this version for a large Mersenne exponent is interesting for professors here, and we conclude that it is possible to do some work about the Question. If isn't interesting please add a comment, that I can to deleted the post.

Remarks. Wolfram Alpha calculator computed that $25964951^2-2$ is a prime number.

I would like to dedicate with all respect this post in the memory of persons killed in the Afghanistan earthquake at 22th of June.


[1] Alexandru Gica and Florian Luca, On the Diophantine equation $2^x=x^2+y^2-2$, Funct. Approx. Comment. Math. 46(1): 109-116 (March 2012).

[2] Post edited on Mathematics Stack Exchange A diophantine equation inspired in a conjecture due to Gica and Luca (Jun 25, 2022).

  • 2
    $\begingroup$ Many thnaks for your improvements/edits @J.W.Tanner $\endgroup$
    – user142929
    Jun 27, 2022 at 11:56
  • 3
    $\begingroup$ You know, you could have included the definition of "Mersenne exponent" instead of making everyone run off to the OEIS. Anyway, for what it's worth, you can restate the question as one of solving $y^2+Qz^2\equiv2\bmod{25964951}$, where $Q$ is that 15-digit number. $\endgroup$ Jun 27, 2022 at 12:26
  • 1
    $\begingroup$ Many thanks +1 for your help @GerryMyerson $\endgroup$
    – user142929
    Jun 27, 2022 at 14:32

1 Answer 1


The equation (1) for a fixed $x$ is equivalent to the congruence: $$y^2 \equiv 2(1+z^2)\pmod{x}.$$

For $x=25964951$, we have $2\equiv 3328351^2\pmod{x}$, and thus all solutions are obtained from those $z$ for which $1+z^2$ is a square modulo $x$ (there are $\frac{x-1}2$ such residue classes). Having such a $z$, we obtain all suitable values of $y$ as $y\equiv \pm 3328351\sqrt{1+z^2}\pmod{x}$.

  • $\begingroup$ A perfect answer, as usual, many thanks professor, I'm going to study and chek it for understand the details. $\endgroup$
    – user142929
    Jun 27, 2022 at 15:55
  • 1
    $\begingroup$ Btw, as for the number of solutions, this question is relevant - mathoverflow.net/q/424856 $\endgroup$ Jun 27, 2022 at 22:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.