Solution (source code)

= Solution

Define the <matter power spectrum> by the <Fourier transform> convention
$$
\delta(\mathbf x,\tau)=\int\frac{d^3k}{(2\pi)^3}\delta_{\mathbf k}(\tau)e^{i\mathbf k\cdot\mathbf x},\qquad
\langle\delta_{\mathbf k}\delta_{\mathbf k'}^*\rangle=(2\pi)^3\delta^3(\mathbf k-\mathbf k')P_\delta(k,\tau).
$$
Statistical isotropy then gives
$$
\langle\delta^2\rangle=\int d\log k\,\frac{k^3P_\delta(k,\tau)}{2\pi^2}.
$$
For the growing mode found above, write $P_\delta(k,\tau)=\tau^4P_A(k)$. At <cosmological horizon entry>, $\tau_H\propto k^{-1}$, so the variance contribution per logarithmic interval is proportional to $k^3k^{-4}P_A(k)=P_A(k)/k$. Making it independent of $k$ requires $P_A(k)\propto k$. Hence
$$
\boxed{P_\delta(k,\tau)\propto\tau^4k.}
$$
This is the <Harrison-Zeldovich spectrum>. Scale invariance applies at horizon entry, not to the unprocessed density variance on a common late-time slice. In the notation $\delta_{\mathbf k}\propto k^{n/2}\tau^2$, it means \b[$n=1$], with random Fourier coefficients supplying the ensemble statistics.