# Finding the number of integer solutions, why is this wrong?

The question is to find the number of solutions such that $(x, y)$ are integers: $(x-8)(x-10)=2^y$. Here's what I did: $u(u-2)=2^y$. From the quadratic formula, $u=1+\sqrt{1+2^y}$. This is where I think this question was meant to be solved by modular arithmetic here, but I don't know it so please try not to use it in your answers. I now constructed two right angle triangles. Triangle 1 has sides $1$, $2^{y/2}$,a hypotenuse of $\sqrt{1+2^y}$, and an angle $t$ such that $\sin(t)=\dfrac {1}{\sqrt{1+2^y}}$. Triangle 2 has sides of $1$, $w$, a hypotenuse of $u$, and an angle $t$ such that $\cos t=\dfrac{1}{u}$. Now we want $\cot(t)+\dfrac1u=1$, or $\cot(t)+\cos(t)=1$. The problem now just reduces to finding the number solutions to that equation. However, this gives me an infinite number of solutions. Why is this wrong? Thanks!

-

Let us continue your calculation at the point you reached $u=1+\sqrt{1+2^y}$. The calculation after that was not a good idea: introducing transcendental functions is unlikely to help in a problem of elementary number theory.

The solutions are $u=1\pm\sqrt{1+2^y}$. We want $\sqrt{1+2^y}$ to be an integer. So we want $1+2^y$ to be a perfect square, say $t^2$. We have arrived at the equation $1+2^y=t^2$ or equivalently $$2^y=t^2-1=(t-1)(t+1).$$ Now we can argue precisely as in the other solutions: $t-1$ and $t+1$ are each a power of $2$. That forces $t=\pm 3$. Since we are using $1\pm\sqrt{1+2^y}$, the choice $t=3$ is enough.

To finish, we have $u=1\pm 3$. So $u=-2$ or $u=4$. That gives $x=u+8=6$ or $x=12$. Each has $y=3$.

Remark: The OP mentions modular arithmetic. That cannot quite work. The reason is that the equation does have a solution. A pure congruential argument would show there are no solutions at all. We can use congruences to rule out certain types of solutions, but certainly not all.

-
Thanks, I see how this is a better solution but why doesn't my solution work? cot(t)+cos(t)=1 has an infinite number of solutions. (I edited my question again, people keep editing the question and making mistakes). – Ovi May 25 '13 at 18:49
@Ovi: We do sort of have to worry about $1-\sqrt{1+2^y}$. It gives a solution. (Well, we don't have to worry about it if we note that the solutions of $2^y+1=t^2$ have $t=\pm 3$. But we do have to use one or the other.) Note that there are two $x$ that work in the original problem, but only one $y$. – André Nicolas May 25 '13 at 19:14
As to the $\cot t+\cos t =1$, there is nothing wrong with it. But you will be looking for solutions of this equation of very specific form. So it still leaves a problem to be solved. – André Nicolas May 25 '13 at 19:19
Could you elaborate on what specific form of solutions would I be looking for? And it is not the case that only some solutions of cot(t)+cos(t)=1 work, because according to wolframalpha all the solutions are wrong; they are not even integers: wolframalpha.com/input/?i=cot%28x%29%2Bcos%28x%29%3D1 – Ovi May 25 '13 at 19:25
I should not have said the trig equation is OK. If I understand your triangles correctly, we have $\cos t=\frac{1}{u}\sqrt{u^2-1}$. But $\sqrt{u^2-1}$ is not $\cot t$ of the first triangle. – André Nicolas May 25 '13 at 19:39

$$u,y\in\Bbb Z\;,\;\;u(u-2)=2^y\iff u, u-2\;\;\text{are powers of}\;\;2,$$

and the only possibility I see is

$$u=4\,,\,u-2=2\ldots\ldots$$

-

Hint:

$(x-8)(x-10)=2^y \implies x-8=2^m$ and $x-10=2^k$. Only possible way such that both are powers of two and differ by $2$?

$2^m-2^k=2$

$2(2^{m-1}-2^{k-1})=2 \implies 2^{m-1}-1=1 \implies 2^{m-1}=2$, $m=2$ and $k=1$

-