# How to solve Diophantine Equations $2^{4m}-1=(10k-5)^2$ and other similar ones?

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,...\}$$

$$(2^a-1)(2^b-1)=n^2$$

first let $$a=1$$

then:

$$(2-1)(2^b-1)=(2^b-1)=n^2$$

If $$n$$ is positive integer then:

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

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

and

$$(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

$$2^{4m}-1=(10k-5)^2$$

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

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

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

$$2^{4m-3}-1=(10k-1)^2$$

*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 ?

• $\left(2^{2}-1\right)\left(2^{2}-1\right)=3^{2}$ Sep 12 '21 at 6:29
• @Mason Thank you but I am trying to find solutions other than when $a=b$ Sep 12 '21 at 6:31
• 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. Sep 12 '21 at 7:50
• The other two cases, just look at them modulo eight. Sep 12 '21 at 12:14
• Looks good to me. Sep 12 '21 at 13:02

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:

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

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

$$2^{4m-3}-1=(10k-1)^2$$

we know from above that

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

and

$$(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,...\}$$.