If $2^{2017} + 2^{2014} + 2^n$ is a perfect square, find $n$. 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.

We are going to solve a more general question: For any given natural number $k$, find the integer $n$ satisfying that
$$
2^{2k}+2^{2k+3}+2^n=m^2,
$$
where $m$ is a natural number.
Simplifying the equation to $$9\cdot 2^{2k}+2^n=m^2 \Leftrightarrow 2^n=(m+p)(m-p), $$
where $p=3\cdot 2^{k}.$
Splitting the power of $2$ yields
$$
\left\{\begin{array}{l}
m+p=2^s \cdots (1)\\
m-p=2^{n-s} \cdots (2)
\end{array}\right.
$$
for some integer $s>n-s.$
$(1)-(2)$ gives $$
3 \cdot 2^{k}=p=2^{n-s-1}\left(2^{2s-n}-1\right)  
$$
$$
\Rightarrow \left\{\begin{array}{l}
n-s-1=k \\
2 s-n=2
\end{array}\right. \Rightarrow \boxed{n=2k+4},
$$
which is the unique solution of the equation,
Back to our equation, when $2k=2014, n=2018$ is its unique solution.
