proving that $ab$ is a perfect square. let $a,b \ge 2$ be integers, such that for every positive integer $n$, the expression :
$(a^n-1)(b^n-1)$ is a perfect square.
How to prove that $ab$ is a perfect square.
 A: Since $[a^{3n}-1][b^{3n}-1]$ is a square and $[a^{n}-1][b^{n}-1]$ is a non-zero square, the quotient $[a^{2n}+a^n+1][b^{2n}+b^n+1]$ is also a square for all $n\in\mathbb N$.
Suppose that $ab$ is not a square.  A consequence of quadratic reciprocity is that there are infinitely many primes $p$ such that $\left(\frac{ab}p\right) = \left(\frac{3}p\right)=-1$ (the density of such primes is at least $\tfrac14$).  Fix $p$ to be one such prime.
Now, exactly one of $a$ and $b$ is a quadratic residue mod $p$.  Choosing $n=(p-1)/2$, Euler's criterion shows that $a^{2n}+a^n+1$ is $3 \pmod p$ if $a$ is a residue and $1\pmod p$ if $a$ is a non-residue.  Therefore $[a^{2n}+a^n+1][b^{2n}+b^n+1] \equiv 3 \pmod p$, so it can't be a square.
This is a very nice problem, and I imagine that other quite different attacks are possible.  I'd like to know if there is a way to deduce the much stronger statement that $a = b$, since that seems like the only plausible way to make $[a^{n}-1][b^{n}-1]$ always a non-zero square.
A: Here's a different approach using the LTE lemma.
Assume $(a^n-1)(b^n-1)$ is a perfect square for all $n\ge 1$ with $ab$ being a non perfect square. This means $$\left(\frac{ab}{p}\right)=-1$$ for some odd prime $p$.
Without lost of generality, assume $a$ is a quadratic residue and $b$ a quadratic nonresidue $\pmod p$. Now set $n=r=(p-1)/2$ using Euler's criterion we get $$p\mid a^{r}-1 \text{ and } p\mid b^{r}+1$$
We know $(a^r-1) (b^r-1)$ is a square so $$2\mid\nu_p((a^r-1) (b^r-1))=\nu_p(a^r-1)$$ because $p\not\mid b^r-1$ otherwise $p=2$ Now set $n=r p$ and note that $p \not\mid b^{rp}-1$ because $p\mid b^{pr}+1$ to get $$\nu_p((a^{rp}-1)(b^{rp}-1))=\nu_p(a^{r}-1)+\nu_p(p)=\nu_p(a^r-1)+1 $$ which is odd so it can't be divisible by $2$ hence the contradiction.
A: It is obvious that for $a=b$ the product $(a^n-1)(b^n-1)$ is square for all $n$. We  prove that this is the only possibility.
Let $b^n=a^n+h_n$; one has $(a^n-1)(a^n-1+h_n)=x_n^2$ so
$$(a^n-1)^2+h_n(a^n-1)-x_n^2=0\Rightarrow 2(a^n-1)=-h_n\pm\sqrt{h_n^2+4x_n^2}$$ so we have a Pythagorean triple
$$(h_n, 2x_n,z_n)=(r_n^2-s_n^2,\space 2r_ns_n,\space r_n^2+s_n^2)$$ and
$$2(a^n-1)=-(r_n^2-s_n^2)\pm(r_n^2+s_n^2)$$ thus for all $n$ $$a^n=s_n^2+1\\b^n=r_n^2+1$$  For $n=2$ we have
$$a^2-s_2^2=1\\b^2-r_2^2=1$$ We are done.
