For which integer $n$ is $$28 + 101 + 2^n$$ a perfect square. Please also suggest an algorithm to solve similar problems. Thanks
Btw, this question has been taken from an Aryabhatta exam for 8th graders in India.
For which integer $n$ is $$28 + 101 + 2^n$$ a perfect square. Please also suggest an algorithm to solve similar problems. Thanks
Btw, this question has been taken from an Aryabhatta exam for 8th graders in India.
On
One way is to notice that
$28+101+2^n=128+1+2^n=2^7+1+2^n=2^n+2*2^6+1$.
Therefore, if we let $n=12$ we have
$2^{12}+2*2^6+1=(2^6)^2+2*2^6+1=(2^6+1)^2$
Which is a perfect square, as desired. This relies on noticing this specific pattern, so doesn't lend itself to a general method. One could always guess and check.
On
Write:$$28 + 101 + 2^n =k^2$$
For $n$ odd the expresion $$28 + 101 + 2^n\equiv 2\pmod 3$$ so in this case there is no solution (since $k^2\equiv 0,1\pmod 3$)
So $n= 2m$ and we have $$129 = k^2-2^{2m} = (k-2^m)(k+2^m)$$
Since $k-2^m<k+2^m$ we have only this possibiltes
$129 = k+2^m$ and $1=k-2^m$ ($m=6$)
or
$43 = k+2^m$ and $3=k-2^m$ (no solution)
You can move terms around to try to get things to look like a perfect square trinomial: $(a + b)^2 = a^2 + 2ab + b^2$
Specifically, the special case where $a$ or $b$ is 1: $(1 + b)^2 = 1 + 2 b + b^2$
Start by combining the constant terms, and notice that 128 is a power of 2:
$28 + 101 + 2^n = 1 + 128 + 2^n = 1 + 2 \cdot 2^6 + 2^n$
We can see that $(1 + 2^6)^2 = 1 + 2 \cdot 2^6 + (2^6)^2 = 1 + 2 \cdot 2^6 + 2^{12}$
I think the squaring binomials/perfect square trinomials is your best general approach.
But given that the question was multiple choice, guess and check would solve this particular problem quickly ;)