Wanted: Positivity certificate for the AM-GM inequality in low dimension
The following paper:
Fujiwara, Kazumasa, and Tohru Ozawa. Identities for the Difference between the Arithmetic and Geometric Means, (2014).
proves the following representation for odd $n$:
\begin{equation*} \frac{1}{n}\sum_i x_i^n - \prod_i x_i = \sum_{i=1}^n x_i\sum_{j \in J(n)} (P_{ij}(x_1,\ldots,x_n))^2, \end{equation*} for suitable polynomials $P_{ij}$. For even $n$, a SOS representation is available in Ch.2 of Hardy, Littlewood, Polyá.
Let $$\phi(x_1,\cdots,x_n)=\frac{x_1^n+\cdots+x_n^n}{n}-x_1x_2\cdots x_n$$ In his proof of AG inequality, Hurwitz (1891) proves that $$\phi(x_1,\cdots,x_n)=\frac{1}{2\times n!}\left(\phi_1+\phi_2+\cdots+\phi_n\right)$$ where \begin{align*} \phi_1=& \sum(x_1^{n-2}+x_1^{n-3}x_2+\cdots+x_1x_2^{n-3}+x_2^{n-2})(x_1-x_2)^2,\\ \phi_2=&\sum(x_1^{n-3}+x_1^{n-4}x_2+\cdots+x_1x_2^{n-4}+x_2^{n-3})(x_1-x_2)^2x_3,\\ \dots\\ \phi_n=&\sum(x_1-x_2)^2x_3x_4\cdots x_n. \end{align*}
Hurwitz, A. (1891). Ueber den Vergleich des arithmetischen und des geometrischen Mittels. Journal für die reine und angewandte Mathematik, 108, 266-268.