I have a function of the following form:
$$
\varphi_n(x)= \underbrace{\int\limits_\mathbb{R}\ldots\int\limits_\mathbb{R}}_{n}\exp\left[-\sum\limits_{j=2}^{n}\left(x_{j}-x_{j-1}\right)^2-(x-x_{n})^2\right]dx_1\ldots dx_{n}\quad \left(\varphi_n(x)\equiv \pi^{n/2}\right),
$$
and I'm trying to define a function Phi[x, n]
that will calculate the above integral. I know, how to define this function for fixed $n$, for example
$$
\varphi_1(x)= \int\limits_\mathbb{R}e^{-(x-x_{1})^2}dx_1,
$$
defines as
Phi1 = Integrate[Exp[-(x - #)^2], {x, -Infinity, Infinity}] &;
and $$ \varphi_2(x)= \int\limits_\mathbb{R}\int\limits_\mathbb{R}e^{-(x_2-x_1)^2-(x-x_2)^2}dx_1dx_2, $$ defines as
Phi2 = Integrate[Integrate[Exp[-(x2 - x1)^2 - (# - x2)^2], {x1, -Infinity, Infinity}], {x2, -Infinity, Infinity}] &;
How to define a function, that would take $n$ as an argument?