For any positive integer $m,n$, show that $(2^m-1)(3^n-1)$ is never a perfect square?

maybe this is old problem? I find some $m,n$ the problem is right ,so How to prove it?

The conjecture was based on my solution to this following (different) problem :

Problem: >Find all non-negative integers $m$ and $n$, such that $(2^n-1) \cdot (3^n-1)=m^2$

Solution: Assume that $n > 0$ is a solution. First, note that $2 \mid n$, otherwise the exponent of $2$ in LHS in odd. From this (by lifting) we deduce that $n$ must be divisible by $3$ as well.

Let $n=6k$. Then $$ (2^{6k}-1)(3^{6k}-1) \equiv (2^k-1)(16^k-1) \equiv (2^k-1)^2 (2^k+1)(4^k+1) \pmod{31} $$ must be a quadratic residue. We claim this implies $5 \mid k$. Indeed, for $k \equiv 1,2,3,4 \pmod5$ we get $3 \cdot 5$, $5 \cdot 17$, $5 \cdot 13$, $17 \cdot 9$ are non-quadratic residues mod $31$, since of the primes here, only $5$ is a quadratic residue.

So let $n = 10c$. Then we have that $\left( (2^{10})^c - 1 \right)\left( (3^{10})^c - 1 \right)$ is a perfect square. But now by lifting the exponent on the prime $11$ we get a contradiction, because $\nu_{11}(2^{10}-1) = 1$ and $\nu_{11}(3^{10}-1) = 2$, thus the exponent of $11$ in the original is $3+2\nu_{11}(c)$.

  • $\begingroup$ can't be a square you mean ? $\endgroup$
    – user451844
    Aug 27, 2017 at 1:33
  • $\begingroup$ @wightahtl If you have found some $m,n$ where your expression is a square, then you have proved that your condition is not always true. $\endgroup$
    – Toby Mak
    Aug 27, 2017 at 1:36
  • $\begingroup$ Your conjecture must perhaps rarely always often true. $\endgroup$ Aug 27, 2017 at 1:42
  • $\begingroup$ Is it $(2^m-1)(3^n-1)$ or $(2^n-1)(3^n-1)$? I am confused. $\endgroup$ Aug 27, 2017 at 1:47
  • $\begingroup$ Do you mean to ask whether $(2^m-1)(3^n-1)$ can never be a perfect square? $\endgroup$
    – Joffan
    Aug 27, 2017 at 1:49

1 Answer 1


Another partial solution, is to note that all squares of integers are 0 1 or 4 mod 8, $2^m-1$ is either 1,3 or 7 mod 8, and $3^n-1$ is either 0 or 2 mod 8.

$$1\cdot0\equiv0\bmod8; 1\cdot2\equiv2\bmod8; 3\cdot0\equiv0 \bmod8; 3\cdot2\equiv6\bmod8; 7\cdot0\equiv0\bmod8; 7\cdot2\equiv6\bmod8$$

None of these are 1 or 4 mod 8, so the only possibility left is 0 mod 8. when $3^n-1\equiv0\bmod8$ it's always one less than a square. so that part doesn't help. it then comes down can the square free parts for a square because a non primitive is the product of two or more squares. so either it's a primitive square in which case $2^m-1 =3^n-1$ which means there's a power of two that's a power of three, contradiction. So if it's not a primitive square it must factor into squares. since it takes $3^n-1\equiv0\bmod8$ for there to be a chance, and this factors as $(3^{n\over 2}+1)\cdot(3^{n\over2}-1)$ these must then half to combine with the factors of $2^m-1$ to make squares.


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.