Consider spacetime to be homogeneous and isotropic. Then, the Green's function for the wave equation satisfies \begin{equation} \square G(x^{\mu}) = \delta^{n+1}(x^{\mu}).\tag{1} \end{equation}
In $3+1$ dimensions, this can be solved to get the retarded Green's function \begin{equation} G(x^{\mu}) = \frac{\delta(t-r)}{4\pi r},\tag{2} \end{equation} or, in a covariant form, \begin{equation} G(x^{\mu}) = \frac{1}{2\pi} \theta(t)\delta(x^{\mu}x_{\mu}).\tag{3} \end{equation}
Can we get a similar covariant expression in $n+1$ dimensions? If so, how do we go about doing it?