9. (1990 Japan Mathematical Olympiad Team Selection Test) Suppose $4^{27}+4^{500}+4^{n}$ is a perfect square (square of an integer), find the maximum value of the integer $n$.


9. Factorization yields
$$
\begin{array}{l}
4^{27}+4^{501}+4^{n}=4^{27}\left(4^{n-27}+4^{173}+1\right), \\
4^{n-27}+4^{173}=1=\left(2^{n-27}\right)^{2}+2 \cdot 2^{945}+1
\end{array}
$$

When $n-27=945$, i.e., $n=972$, equation (2) is a perfect square, and thus equation (1) is a perfect square.
When $n>972$,
$$
\left(2^{n-27}+1\right)^{2}=\left(2^{n-27}\right)^{2}+2 \cdot 2^{n-27}+1>\left(2^{n-27}\right)^{2}+2 \cdot 2^{945}+1>\left(2^{n-27}\right)^{2} \text {. }
$$

Therefore, at this time, equation (2) is not a perfect square, and thus equation (1) is not a perfect square. Hence, the maximum value of $n$ is 972.