5. Rewrite the equation as $\left(n^{2}-1\right)\left(3^{a-1}+3^{1-a}\right)=\frac{16 n}{3}$. The values $n= \pm 1$ and $n=0$ are not solutions. Since $3^{a-1}+3^{1-a} \geqslant 2$, it is necessary that $\frac{16 n}{3 n^{2}-3} \geqslant 2$ $\Leftrightarrow 3 n^{2}-8 n-3 \leqslant 0$ (considering that $|n|>1$). $n \in\left[-\frac{1}{3} ; 3\right]$. For $n=2$, we get $3^{a-1}+3^{1-a}=\frac{32}{9}$, from which $a=1+\log _{3} \frac{16 \pm 5 \sqrt{7}}{9}$. For $n=3$, we get $3^{a-1}+3^{1-a}=2$, from which $a=1$.
Answer: $a=1, a=1+\log _{3} \frac{16 \pm 5 \sqrt{7}}{9}$.

Solution of the second option:

Rewrite the equation as $\left(1-n^{2}\right)\left(2^{a}+2^{-a}\right)=\frac{16 n}{3}$. The values $n= \pm 1$ and $n=0$ are not solutions. Since $2^{a}+2^{-a} \geqslant 2$, it is necessary that $\frac{16 n}{3-3 n^{2}} \geqslant 2$ $\Leftrightarrow 3 n^{2}+8 n-3 \leqslant 0$ (considering that $|n|>1$). $n \in\left[-3 ; \frac{1}{3}\right]$. For $n=-2$, we get $2^{a}+2^{-a}=\frac{32}{9}$, from which $a=\log _{2} \frac{16 \pm 5 \sqrt{7}}{9}$. For $n=3$, we get $2^{a}+2^{-a}=2$, from which $a=0$.

Answer: $a=0, a=\log _{2} \frac{16 \pm 5 \sqrt{7}}{9}$.

## Lomonosov Moscow State University

 Olympiad "Conquer the Sparrow Hills" Variant 4-1