# Perfect squares with two variables.

Find all positive integers m, n such that $$6^m + 2^n + 2$$ is a perfect square. I've tried keeping a constant value of m and finding out n. Eg:

$$m=1, n=0$$

$$m=1, n=3$$

• Here is a hint: Unless $m= 0$ or $n= 0$ then $6^m + 2^n + 2$ is even so if it is a square it is a square of an even number. – Alex J Best Apr 19 '19 at 8:40
• Compare with this question, or this one, or this one. – Dietrich Burde Apr 19 '19 at 8:56
• Another hint : If $m>1$ and $n>1$ , the number is of the form $4k+2$ , hence not a perfect square. Usually $0$ is not considered positive. – Peter Apr 19 '19 at 13:01

As people in the comments mentioned, if $$m > 1$$ and $$n > 1$$ than our number divide $$2$$, but not divide $$4$$, so it cant be square. So the only cases are:

$$1$$) $$m = 1$$ In this case we have equation $$2^n + 8$$ is a perfect square. But if $$n > 3$$ than this number divide $$8$$, but not divide $$16$$, so it cant be square. So just consider $$n = {1,2,3}$$

$$2$$) $$n = 1$$ In this case we have equation $$6^m + 4$$ is a perfect square. But $$6^m + 4 \equiv$$ $$3\ or \ 5\ (mod\ 7)$$ which is not quadratic residue.

Thats all cases.

• Numbers are positive integers or non-negative? – Arial Pilisov Apr 19 '19 at 18:43
• If you need non-negative integers than: 1) $m = 0\\$. $2^n+3 \equiv 3 \ (mod\ 4)$ which in not quadratic residue. 2)$n = 0\\$ $6^m+3$ is square. If $m>1$ than this equation divide $3$, but not divide $9$, so it cant be square. Than just consider $m=0\ or\ 1$ – Arial Pilisov Apr 19 '19 at 18:48
• I needed the postive integers only. Thank you so much. – Tapi Apr 20 '19 at 15:49
• In Case 1, shouldn't we show that when a number is divisible by a prime but not by the prime square, then it is not a perfect square? However, you've shown that it is divisible by "8" but not by 16. Shouldn't it be 4 instead of 8 as the square of 4 is 16? Also, 4 is not a prime number. So is the case still justified considering I cannot find any n>3? – Tapi Apr 22 '19 at 19:26
• I showed that the number is divisible $2^3$, but not divisible by $2^4$, so it cant be square, because if the number is square than every prime that divide our square has even power. – Arial Pilisov Apr 23 '19 at 11:19