# Math Help - How to find the pairs?

1. ## How to find the pairs?

Find all such positive integers pairs (a,b) that $2^a+5^b$ is a square of an integer.

OK, so we have to find t's in: $2^a+5^b=t^2$ whilst $t \in N_+$. How should I do this, though? I'm sitting at this for some time and have not a slightest idea...

2. ## Re: How to find the pairs?

Can you at least find one value each for a, b, and t so that this is true?

3. ## Re: How to find the pairs?

Yes, a=2, b=1 and then t would be 3. It was found brute-force, though...

4. ## Re: How to find the pairs?

Hello, GGPaltrow!

I don't have the complete solution yet,
. . but I can narrow down the choices.

$\text{Find all such positive integers pairs }(a,b)\text{ that }2^a+5^b\text{ is a square integer.}$

Note that $5^b$ will always end in 5.

Now note the final digit when adding $2^a.$

. . $\begin{array}{ccc}2^a + 5^b & \text{ends in}\\ \hline 2^1+ 5^b & 7 \\ 2^2 + 5^b & 9 \\ 2^3 + 5^b & 3 \\ 2^4 + 5^b & 1 \\ 2^5 + 5^b & 7 \\ 2^6 + 5^b & 9 \\ 2^7 + 5^b & 3 \\ 2^8 + 5^b & 1 \\ \vdots & \vdots \end{array}$

The 4-step pattern repeats indefinitely.
Note that a square canNOT end in 7 or 3.

We find that 2 must be raised to an even power.

Does that help?

5. ## Re: How to find the pairs?

Originally Posted by Soroban
Hello, GGPaltrow!

I don't have the complete solution yet,
. . but I can narrow down the choices.

Note that $5^b$ will always end in 5.

Now note the final digit when adding $2^a.$

. . $\begin{array}{ccc}2^a + 5^b & \text{ends in}\\ \hline 2^1+ 5^b & 7 \\ 2^2 + 5^b & 9 \\ 2^3 + 5^b & 3 \\ 2^4 + 5^b & 1 \\ 2^5 + 5^b & 7 \\ 2^6 + 5^b & 9 \\ 2^7 + 5^b & 3 \\ 2^8 + 5^b & 1 \\ \vdots & \vdots \end{array}$

The 4-step pattern repeats indefinitely.
Note that a square canNOT end in 7 or 3.

We find that 2 must be raised to an even power.

Does that help?

Let $a = 2m$.

$5^b=t^2-2^{2m}=(t+2^m)(t-2^m)$

Then,

$t+2^m=5^p$

$t-2^m=5^q$

where p and q are non-negative integers.

Assume that p and q are both positive integers.

Then, $2t=5^p+5^q\equiv 0\ (mod\ 10)$

$t\equiv 0\ (mod\ 5)$

Consider the equation $t+2^m=5^p$.

$5 | t$ and $5 | 5^p$

So, $5 | 2^m$ (Contradiction)

So, either p or q is zero. (Both p and q cannot be zero, because then b would be zero, which is not allowed by the question.)

ie either $t+2^m$ or $t-2^m$ is 1. Clearly, $t+2^m\neq 1$.

So, $t-2^m=1$

Then, t can end with 3, 5, 7 or 9.

If t ends with 5, $2^m$ ends with 4 but then $t+2^m$ ends with 9 and $t+2^m=5^p$ will not be satisfied. So, t cannot end with 5. Similarly, t cannot end with 7 or 9.

So, t must end with 3. For t = 3, we have the solution (t, m, b) = (3, 1, 1), which leads to (a, b, t) = (2, 1, 3). I don't know if there are any more solutions.

6. ## Re: How to find the pairs?

Originally Posted by alexmahone
Let $a = 2m$.

$5^b=t^2-2^{2m}=(t+2^m)(t-2^m)$

Then,

$t+2^m=5^p$

$t-2^m=5^q$

where p and q are non-negative integers.

Assume that p and q are both positive integers.

Then, $2t=5^p+5^q\equiv 0\ (mod\ 10)$

$t\equiv 0\ (mod\ 5)$

Consider the equation $t+2^m=5^p$.

$5 | t$ and $5 | 5^p$

So, $5 | 2^m$ (Contradiction)

So, either p or q is zero. (Both p and q cannot be zero, because then b would be zero, which is not allowed by the question.)
Continuing alexmahone's argument, he has shown that

$t+2^m=5^b,$

$t-2^m=5^0 = 1.$

Subtract the second equation from the first to see that

$2^{m+1} = 5^b-1.$

But it is shown here that the equation $2^{m+1} = (2k+1)^b-1$ has no solutions with m>0, b>1 and k=2. So we must conclude that b=1, and therefore (a,b,t) = (2,1,3) is the only solution.

7. ## Re: How to find the pairs?

Absolutely brilliant, thank you all very much. I have one question, though. Alexmahone showed that "either p or q is zero" - why do you, Opalg, suppose q=0 and p=b? Why not q=b and p=0, for example? This excerpt, I mean:

Originally Posted by Opalg
$t+2^m=5^b,$

$t-2^m=5^0 = 1.$

8. ## Re: How to find the pairs?

Originally Posted by GGPaltrow
Absolutely brilliant, thank you all very much. I have one question, though. Alexmahone showed that "either p or q is zero" - why do you, Opalg, suppose q=0 and p=b? Why not q=b and p=0, for example? This excerpt, I mean:
$p = 0\implies t+2^m=1$, which has no positive integer solutions.

9. ## Re: How to find the pairs?

Originally Posted by GGPaltrow
Alexmahone showed that "either p or q is zero" - why do you, Opalg, suppose q=0 and p=b? Why not q=b and p=0, for example? This excerpt, I mean:
Originally Posted by Opalg
$t+2^m=5^b,$

$t-2^m=5^0 = 1.$.
If you assume that t is positive, then $t+2^m$ must be greater than $t-2^m.$ So the larger number has to be $5^b,$ and the smaller one equal to 1.

10. ## Re: How to find the pairs?

I see. Thank you very much!

11. ## Re: How to find the pairs?

Hmm.. When talking about this solution with my teacher, he said there's another one without involving such "advanced" things like Catalan's conjecture. Sooner or later he'll tell what he had in my mind but I wonder what this could have been.. Is there any such solution?