5. For a third-order arithmetic sequence $\left\{a_{n}\right\}$, the first 4 terms are $30,72,140,240$, then its general term formula is $a_{n}=$
5. $a_{n}=n^{3}+7 n^{2}+14 n+8$ From the properties of higher-order arithmetic sequences, $a_{n}$ is a cubic polynomial in $n$, set $a_{n}=A n^{3}+$ $B n^{2}+C n+D, A, B, C, D$ are coefficients to be determined.
Given $a_{1}=30, a_{2}=72, a_{3}=140, a_{4}=240$, we can form the system of equations $\left\{\begin{array}{l}A+B+C+D=30 \\ 8 A+4 B+2 C+D=72 \\ 27 A+9 B+3 C+D=140 \\ 64 A+16 B+4 C+D=240\end{array}\right.$.