My motivation is my try for solving the following great question and then I stuck:

Find all positive integer solutions of $(a,b,n)$ s.t. $(2^a-1)(2^b-1)=n^2$

so any variable in this question $\in \{1,2,3,...\}$


first let $a=1$



If $n$ is positive integer then:

$ n \equiv 0,\pm1,\pm2 \pmod {5} $

then: $ n^{2} \equiv 0,1,4 \pmod {5} $


$ (2^{b}-1) \equiv 0 \pmod {5} $ when b=4m

$ (2^{b}-1) \equiv 1 \pmod {5} $ when b=4m-3

$ (2^{b}-1) \equiv 2 \pmod {5} $ when b=4m-1

$ (2^{b}-1) \equiv 3 \pmod {5} $ when b=4m-2

So probable solutions are when $b=4m,4m-3$

so I made the following equations:

First Case: let $b=4m, n=(10k-5)$ because $n^2 \equiv 0 \pmod 5$ for all k


Second Case: let $b=4m-3,n=(10k-9)$ because $n^2 \equiv 1 \pmod 5$ for all k


Third Case : let $b=4m-3,n=(10k-1)$ because $n^2 \equiv 1 \pmod 5$ for all k


*note that $n=(10k-3)^2$ is included in Third Case: for example $n^2=((20-3)^2)^2=17^4=(280+9)^2$

Are there solutions or not ?

  • 2
    $\begingroup$ $\left(2^{2}-1\right)\left(2^{2}-1\right)=3^{2}$ $\endgroup$
    – Mason
    Sep 12, 2021 at 6:29
  • 1
    $\begingroup$ @Mason Thank you but I am trying to find solutions other than when $a=b$ $\endgroup$ Sep 12, 2021 at 6:31
  • 5
    $\begingroup$ The question in the title is trivial. The right side is a square, the left side is one less than a square, so you're asking for two squares to differ by one, and the only way that happens is for the squares to be zero and one. $\endgroup$ Sep 12, 2021 at 7:50
  • 2
    $\begingroup$ The other two cases, just look at them modulo eight. $\endgroup$ Sep 12, 2021 at 12:14
  • 2
    $\begingroup$ Looks good to me. $\endgroup$ Sep 12, 2021 at 13:02

1 Answer 1


Depending in comment by @Gerry Myerson ,many thanks for him.

For the first equation:

$2^{4m}-1=(10k-5)^2$ it turns out to be trivial because squares of integers can't differ by one.

For the second equation:


We will do it by modulo $8$

If n is positive integer then:

$n \equiv 0,\pm1,\pm2,\pm3,4 \pmod 8$

then: $n^{2} \equiv 0,1,4 \pmod 8$

$(2^{4m-3}-1) \equiv 1 \pmod8$ for $m=1$

$(2^{4m-3}-1) \equiv 7 \pmod8$ for $m \in\{2,3,4,...\}$

so $m=1$ is probable

so the equation $2^{4m-3}-1=(10k-9)^2$ becomes $1=(10k-9)^2$ so k=1

then : $a=1=b,n=1$ which lies under the solution set $a=b$

Now for the third equation


we know from above that

$n^{2} \equiv 0,1,4 \pmod 8$


$(2^{4m-3}-1) \equiv 1 \pmod8$ for $m=1$

$(2^{4m-3}-1) \equiv 7 \pmod8$ for $m \in\{2,3,4,...\}$

so $m=1$ is probable

so the equation $2^{4m-3}-1=(10k-1)^2$ becomes $1=(10k-1)^2$ so there is no $k$ satisfies this equation since I assumed $k \in \{1,2,3,...\}$.


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.