Solution (source code)

= Solution

At leading order the scalar curvature power and total tensor power are
$$
\mathcal P_S=\frac{V}{24\pi^2M^4\epsilon_V},\qquad
\mathcal P_T=\frac{2V}{3\pi^2M^4},\qquad
\epsilon_V=\frac{M^2}{2}\left(\frac{V'}V\right)^2,\quad\eta_V=\frac{M^2V''}{V}.
$$
Applying the preceding $d/d\ln k$ relation gives the <scalar spectral index> $n-1=-6\epsilon_V+2\eta_V$ and the <tensor spectral index> $n_T=-2\epsilon_V$. For this hilltop,
$$
\eta_V\simeq-\frac{36M^2\phi^2}{\sigma^4}=-\frac3{2N},\qquad
\epsilon_V\simeq\frac{72M^2\phi^6}{\sigma^8}
=\frac{\sigma^4}{192M^4N^3}.
$$
Thus, fifty e-folds before the end,
$$
\boxed{n\simeq1-\frac3{50}=0.94,\qquad
n_T\simeq-\frac{\sigma^4}{96M^4(50)^3}
=-5.26\times10^{-5}\left(\frac{\sigma}{m_{\rm pl}}\right)^4.}
$$
The tiny $-6\epsilon_V$ contribution and finite-endpoint corrections have been omitted in the quoted leading scalar tilt. The tensor tilt is nearly zero but slightly negative; treating $H$ as exactly constant in its spectrum would incorrectly discard its leading nonzero value.