# $(x^n-x^m)a=(ax^m-4)y^2$ in positive integers

How do I find all positive integers $(a,x,y,n,m)$ that satisfy $a(x^{n}-x^{m}) = (ax^{m}-4) y^{2}$ and $m\equiv n\pmod{2}$, with $ax$ odd?

-
By $ax$ is odd, you mean product is odd,right?? – Aang Jul 12 '12 at 11:12
Of course ..... – Frank Jul 12 '12 at 11:15
The L.H.S. is even => y must be even – lab bhattacharjee Jul 12 '12 at 11:46
$m$ and $n$ are of same parity, $a$ and $x$ both are odd, $y$ is even. – Aang Jul 12 '12 at 12:30

Some partial results. Case 1) $n<m$.

Then $ax^m<4$.

The solutions of this inequality are: $$a=1, m=1, x=1,2,3,\\ m\geq2, x=1,$$ and $$a=2,3, x=1, m\geq 1.$$

From these we obtain two candidates (i) $x=1$ and (ii) $x=3$.

(i) Substituting into the original equation we get $$0=(a-4)y^2.$$ Since $y>0$ and $ax^m=a<4$ there is no solution.

(ii) Substituting into the original equation we get $$3^n-3=(3-4)y^2.$$ Since $n<m$ and $n\equiv m \pmod{2}$, thus $n=1$ which gives $y=0$ that is no solution.

Case 2) $n=m$.

Substituting into the original equation we have $$(ax^m-4)y^2=0.$$ Since $y>0$ we get $$ax^m=4.$$ Since $ax$ is odd there is no solution.

Thus we have justified that $n>m$.

So we can write $$x^m(x^{n-m}-1)a=(ax^m-4)y^2.$$ Since $a$ is odd and $(a,ax^m-4)=1$, therefore $a|y^2$, and similarly $x^m|y^2$. Furthermore $n=m+2k$ where $k$ is positive integer. Thus we obtain $$ax^m(x^{2k}-1)=(ax^m-4)y^2.$$ Introducing the new variables $u:=ax^m$, $z:=x^k$ we obtain $$u(z^2-1)=(u-4)y^2,$$ where $u,z$ are odd and $z>1$. Obviously $8|z^2-1$, thus $4|y$. Since $$u(z^2-1)=(u-4)y^2<uy^2,$$ it follows $z<y$.

-
Could you explain why $n = m + 2k$ please. – Peter Phipps Jul 16 '12 at 23:16
@PeterPhipps it was assumed in the question that $m\equiv n \pmod{2}$. – vesszabo Jul 17 '12 at 11:01

Brute force finds three solutions so far:

a=3, x=3, y=12, n=5, m=1
a=1, x=3, y=12, n=6, m=2
a=1, x=9, y=12, n=3, m=1

which are just different ways of saying that $729 - 9 = (9-4)\times12^2.$

-