Solution (source code)

= Solution

Interpret the requested scale-dependent rms as the contribution from a logarithmic band of wavelengths, or equivalently a band centered at $k\sim R^{-1}$. A global uncut rms is not finite for this scale-free spectrum. The dimensionless density power per logarithmic wavenumber is
$$
\Delta_\delta^2(k)=\frac{k^3P(k)}{2\pi^2}=\frac{A}{2\pi^2}k^{n+3}.
$$
The <cosmological Poisson equation> gives $\varphi_{\mathbf k}=-(4\pi Ga^2\bar\rho)\delta_{\mathbf k}/k^2$. Therefore
$$
\boxed{\Delta_\varphi^2(k)=\frac{k^3P_\varphi(k)}{2\pi^2}
=\frac{A}{2\pi^2}(4\pi Ga^2\bar\rho)^2k^{n-1},\qquad
\varphi_{\rm rms}(R)\propto R^{(1-n)/2}.}
$$
This is the <potential fluctuations per logarithmic wavenumber> scaling. A simple dimensional argument gives the same answer: the density amplitude on scale $R$ is proportional to $R^{-(n+3)/2}$, and its potential amplitude is of order $G\bar\rho(aR)^2\delta_R$, supplying two additional powers of $R$.

For $n=1$, the <Harrison-Zeldovich spectrum> has scale-independent potential amplitude per logarithmic interval. If the density-spectrum amplitude grows as $A(t)=b^2(t)A_{\rm in}$, then $4\pi Ga^2\bar\rho=C/a$, so the potential amplitude evolves as $b/a$. It is constant in the pure growing matter mode of an <Einstein-de Sitter universe>, where $b=a$.

A literal total variance would be proportional to $\int_0^\infty k^{n-2}\,dk$. Infrared convergence requires $n>1$ and ultraviolet convergence requires $n<1$, so no index makes both ends finite. At $n=1$ both divergences are logarithmic. Thus cutoffs or a band specification are essential for a numerical rms; the boxed statement describes the intended scale-local fluctuations rather than claiming a finite unsmoothed potential variance.