# Find max(n)

#### Albert

##### Well-known member
$4^{27}+4^{500}+4^\text{n}=\text {k}^2$

where n and k are positive integers ,please find max(n)

#### Opalg

##### MHB Oldtimer
Staff member
$4^{27}+4^{500}+4^n=k^2$

where n and k are positive integers ,please find max(n)
First, notice that $n$ must be quite large. The reason for that is that $4^{500} = \bigl(2^{500}\bigr)^2$ is a square. The next square after that is $\bigl(2^{500}+1\bigr)^2 = 4^{500} + 2^{501} + 1$. So we must have $4^{27}+4^n > 2^{501} > 4^{250}$, and it follows that $n$ must be at least $250$.

In particular, $n$ is certainly greater than 27. So let $m = n-27$. Then $4^{27}+4^{500}+4^n= 4^{27}\bigl(4^{473} + 4^m + 1\bigr)$. Since $4^{27} = \bigl(2^{27}\bigr)^2$ is a square, we want $4^{473} + 4^m + 1$ to be a square. You can find one solution to this by noticing that $\bigl(2\cdot 4^{236} + 1\bigr)^2 = 4^{473} + 4^{237} + 1$. Thus $m=237$ is a solution. The corresponding value for $n$ is $n=237+27 = 264$.

Pushing that idea a bit further, we have another solution: $\bigl(2\cdot 4^{472} + 1\bigr)^2 = 4^{945} + 4^{473} + 1$. That gives a bigger solution, $m=945$, corresponding to $\boxed{n= 972}$.

Now we want to show that $n=972$, or $m=945$, is the greatest possible solution. The reason for that is that if $x>945$ then $4^x + 4^{473}+1 > 4^x = \bigl(2^x\bigr)^2$. If $4^x + 4^{473}+1$ is a square, then it must be at least as big as $\bigl(2^x+1\bigr)^2$. But $\bigl(2^x+1\bigr)^2 = 4^x + 2^{x+1} + 1$. Therefore $4^{473} \geqslant 2^{x+1} > 2^{946} = 4^{473}$, which is a contradiction.

Opalg :well done