6
$\begingroup$

If $2^{2017} + 2^{2014} + 2^n$ is a perfect square, find $n$.


My first shot would be to assume the perfect square is $2^{2018}$, but how would I prove that? Even if it is, what is $n$? All help is appreciated.

  • 1
    First consider that $2^{2014}$ is the square of $2^{1007}$, but $2^{2017}$ is no square. Now, you have $(2^{1007}+a)^2=2^{2014}+2^{2017}+2^n$. Take it from here2017-01-19
  • 3
    This is another current contest question from the awesome math contest. This contest is running until tomorrow. Google search "AwesomeMath Test A January 6 – January 20, 2017". To be fair, this is one of the easiest questions on there, so if you can't get this, no wonder you're here cheating.2017-01-19
  • 1
    the problem probably asks to determine all such $n$, which is slightly harder.2017-01-19
  • 0
    Hmm, I'm finding that finding all such $n$ to be surprisingly difficult. I'm getting infinite regressions. I'm assuming the n = 2018 is the only solution but I'm having a hard with that.2017-01-20
  • 0
    It looks a lot like a scaled version of (the latter half of) [this old question](http://math.stackexchange.com/q/57177/11619). The scaling factor is $2^{2006}$. Admittedly here checking for the smaller values is not as trivial as in my solution back in the day :-)2017-01-20
  • 0
    If we can somehow determine that a binary number with exactly three ones is only a perfect square of a binary number with exactly two ones, that'd be enough. That doesn't seem likely to be true though.2017-01-20
  • 0
    I gave a solution on how to find all such $n$ yesterday.2017-01-20

4 Answers 4

11

$(2^x+2^y)^2=2^{2x}+2^{x+y+1}+2^{2y}$ so we can take $y=1007$ and $x=1009$ to conclude $2^{2018}+2^{2017}+2^{2014}$ is a square.


how to obtain all $n$:

$9(2^{2014})=2^{2017}+2^{2014}=k^2-2^n$.

Notice that we must have $k^2\equiv 1 \bmod 3$ implying $2^n\equiv 1\bmod 3$.

So $n=2m$.

From here we have $2^{2014}\times 9= (k+2^m)(k-2^m)=z(z+2^{m+1})$

there are now two cases, case one is when $z=9(2^j)$ and case two is when $z=2^j$

the first case is impossible because the number $9$ in binary is $1001$ and adding a power of two clearly wont make it a power of $2$. The other case is clearly only solved by taking $z=2^{1007}$ and taking $m=1009$ thus getting $z(z+2^{m+1})=2̣^{1007}(2^{1007}+2^{1010})=9(2^{2014})$.

So we need $n=2(1009)=2018$

  • 0
    how would one first guess that the square would be of the form $(2^x + 2^y)^2$2017-01-19
  • 0
    @RSerrao: what else would you try? If you think about $(a+b)^2=a^2+2ab+b^2$ it sure looks like you want $a,b$ powers of $2$.2017-01-19
  • 0
    A perfect square is of the form $(a +b)^2 = a^2 + 2ab + b^2$ so we can have $a^2 = 2^{2014}$ (since it's even) $2ab = 2^{2017}$ (since it is odd) and $b = 2^n$. this makes the problem $\frac {2014}2 + n + 1 = 2017$2017-01-20
  • 0
    well, that sure is a cleaner proof that there is only one solution than mine! But somehow your n turned into an m at some point.2017-01-20
  • 0
    Because we have $k^2 \equiv 1\bmod 3$ we must also have $2^n\equiv 1 \bmod 3$. So $n$ must be even, and we can write it as $n=2m$.2017-01-20
9

The square is $$(2^{1007}+2^{1009})^2=2^{2014}+2^{2017}+2^{2018}$$

The answe is therefore $n=2018$

3

If you want an answer then $(a+b)^2 = a^2 + 2ab + b^2$ should suggest an obvious answer by setting $a^2 = 2^{2014}; 2ab=2^{2017}; 2^n = c^2$.

i.e $(2^{1007} + 2^{\frac n2})^2 = 2^{2014} + 2*2^{1007}*2^{\frac n2} + 2^n= 2^{2014} + 2^{1 + 1007 + \frac n2} + 2^n$. We just have to solve for $1 + 1007 + \frac n2 = 2017$. So $n = 2018$.

But is it the only solution?

Bear with me.

Let $m$ be any positive integer. Let $m = \sum_{i=0}^k a_i2^i; a_i = \{0|1\}$ but its unique binary expansion.

Claim: If $m$ has 3 or more non-zero terms in its binary expansion then $m^2$ has more than 3 non-zero terms in its binary expansion.

Proof: Let $m = 2^a + 2^b + 2^c + \sum_{i= c+1}^k a_i 2^i; a < b < c$. ($a$ may equal $0$. and $a_i; i > c$ may all be $0$.)

Then $m = (1 + 2^{b'} + 2^{c'} + \sum_{i=c+1}^k a_i2^{i - a})2^a; c'= c-a;b'=b-a$

So $m^2 = [(1 + 2^{b'} + 2^{c'} + 2*2^{b'}2^{c'}+ 2^{2b'} + 2^{c'}) + 2(1 + 2^{b'} + 2^{c'})\sum_{i=c+1}^k a_i2^{i - a} + (\sum_{i=c+1}^k a_i2^{i - a})^2]2^{2a}$.

$= 2^a + 2^b + 2^c + 2^{1+b+c} +2^{2b} + 2^{2c} +..... $.

Note all the later terms, if they exist, are larger than $2^{2c}$ so $m^2$ has at least four non-zero terms in its binary expansion.

Okay...

So $2^{2017} + 2^{2014} + 2^n = m^2$ has at most three non-zero terms in its expansion. So $m$ has at most $2$ it its expansion.

So $m = 2^k$ or $m = 2^k + 2^j$.

$2^{2017} + 2^{2014} + 2^n = 2^{2k}$ is impossible.

And $2^{2017} + 2^{2014} + 2^n = (2^k + 2^j)^2 = 2^{2k} + 2*2^j*2^k + 2^{2k}$ has only $n = 2018$ for solution.

So $n = 2018$ is the only solution.

1

The simple, fast, paper and pencil approach to find an answer (not all answers) is thus:

$$2^{2017} + 2^{2014} + 2^n$$ Factor: $$2^{2014}(2^{3} + 1 + 2^{n-2014})$$

If you factor out a perfect square from any number, the result is a perfect square if and only if the original number was a perfect square. Therefore we can just ignore the factor $2^{2014}$ as it is a perfect square, and seek to find an $n$ such that the following is a perfect square: $$2^{3} + 1 + 2^{n-2014}$$ Simplified: $$9+2^{n-2014}$$

So the simple question is, what power of two added to $9$ results in a perfect square?

The smallest answer to this modified question* is easily found by trial and error, or by remembering the $3,4,5$ pythagorean triple, or any number of other ways:

$$9 + 16 = 25 \Rightarrow 9+2^4=25$$

Thus, we can get a possible value for $n$ using: $$n-2014=4$$

So one possible value for $n$ is $4+2014=2018$.


*This allows us to find the smallest possible value of $n$ that is greater than $2014$. There may be a smaller answer.

  • 0
    You are assuming $n < 2014$. But similar arguments can be made. I think the boils do to seeing how many ways can $2^a + 2^b + 1; a > b > 0$ can be a perfect square. Obviously $2^{2k} + 2^{k+1} + 1$ is a solution. I think it is the only solution be I'm having a bit a trouble proving it and isolating all the cases.2017-01-20
  • 0
    Typo. I meant to type you are assuming $n > 2014$. Which may not matter.2017-01-20
  • 0
    @fleablood, thanks, updated.2017-01-20