Solution (source code)

= Solution

The <kinetic term> fixes the <mass dimension> of the <scalar field>, and the interaction then fixes that of its coupling:
$$
[\phi]=\frac{d-2}{2},\qquad [\lambda]=d-\frac{n(d-2)}2.
$$
A <relevant coupling> has positive <mass dimension>; a <marginal coupling> has zero <mass dimension>. Therefore
$$
\boxed{d\leq2:\ n\geq3\text{ arbitrary};\qquad d>2:\ 3\leq n\leq\frac{2d}{d-2}.}
$$
For integer dimensions the complete interacting list is
$$
\begin{array}{c|c|c}
d&\text{relevant }n&\text{marginal }n\\\hline
1,2&\text{every }n\geq3&\text{none}\\
3&3,4,5&6\\
4&3&4\\
5&3&\text{none}\\
6&\text{none}&3\\
d\geq7&\text{none}&\text{none}
\end{array}.
$$
If the noninteracting $n=1,2$ terms are included, their couplings have <mass dimensions> $(d+2)/2$ and $2$, respectively, and are relevant for every positive $d$. This is a classification by <power counting in quantum field theory>; it does not assert the stability of odd monomial potentials.