Two variable integer equation

63 Views Asked by At

I have the following equation:

$$ p^q(2^{q-1}-1)=9p^7q $$

I need to solve for $p$ and $q$. $p$ and $q$ are integers.

I think I could take the case $p=0$ separately and for that one $q$ could be equal to anything.

Now, I take the case $p\neq0$ and for this one if $q\leq0$ the left term would be a fraction while the right term is an integer so I conclude that $q>0$.

Also for $q=1$, the term $(2^{q-1}-1)$ is 0 so the left term is 0 and because $q=1$, $p$ will be 0.

So I have left to solve for $q>1$ and $p\neq0$ which I am not able to do.

1

There are 1 best solutions below

0
On BEST ANSWER

We see that if $q=7$, then $p$ can be any integer. Also, if we substitute $q=1,2,3,4,5$ and $6$ in the equation, we see that in each case the only value of $p$ which satisfies the equation is $0$. So we are now left to solve for the cases when $q \gt 7$ and $p \neq 0$.
In this case we rearrange the terms and get the modified equation as
$$(p^{q-7})(2^{q-1}-1) = 9q$$
Now clearly, the R.H.S is positive and so are $(q-7)$ and $(2^{q-1}-1)$.
Based on these facts and $p \neq 0$, we are forced to conclude that $p^{q-7}$ is a positive integer.
But in that case we have
$$(p^{q-7})(2^{q-1}-1) \geq (2^{q-1}-1) \gt 9q$$
[since, for $n \gt 7$, $(2^{n-1}-1) \gt 9n$, which can be easily proved by induction.]
Thus the only solution of $p$ when $q \gt 7$ is $0$.
So, the solution set is given by $(0,m)$ and $(n,7)$ where $m$ belongs to the set of positive integers and $n$ takes all the integers.