The real sequence $(a_n)$ is defined by
$$a_1=5,\qquad a_n=\sqrt[n]{a_{n-1}^{n-1}+2^{n-1}+2\cdot3^{n-1}}\quad(n\ge2).$$
1. Find the general term of $(a_n)$.
2. Prove that $(a_n)$ is decreasing.
In the plane, let $(O)$ be a circle and let $B,C$ be fixed points on it such that chord $BC$ is not a diameter. Let $A$ vary on $(O)$ with $AB\ne AC$ and $A$ distinct from $B,C$. Let $D,E$ be the intersections of line $BC$ with the internal and external bisectors, respectively, of $\angle BAC$. Let $I$ be the midpoint of $DE$. The line through the orthocenter of triangle $ABC$ perpendicular to $AI$ meets $AD,AE$ at $M,N$, respectively.
1. Prove that line $MN$ always passes through a fixed point.
2. Determine the positions of $A$ for which triangle $AMN$ has greatest area.
Let $n$ be a positive integer. A $3\times3$ grid of square cells is colored using $n$ colors, with each cell receiving one color. Two colorings are considered the same if one is obtained from the other by a rotation about the center of the grid. How many pairwise different colorings are there?
Note: A coloring need not use all $n$ colors.