This looks like a simple convolution over the $p$-dimensional hypercube, but I am unable to find a closed form expression for arbitrary integer $p$:
$$f_p(a)=\int_0^1 dx_1\int_0^1 dx_2\cdots \int_0^1 dx_p\, B(x_1-x_2)B(x_2-x_3)\cdots B(x_{p-1}-x_{p})B(x_p-x_1),$$
where the box function $B(x)=1$ for $|x|<a$ and $B(x)=0$ for $|x|>a$, with $0<a<1$.
For small $p$
$$f_2(a)=2a-a^2,\;\;f_3(a)=3a^2-2a^3,$$
$$f_4(a)=\begin{cases}
\frac{2}{3} \left(-7 a^4+8 a^3\right)&\text{if}\;\;0<a<1/2,\\
\frac{1}{3} \left(2 a^4-16 a^3+24 a^2-8 a+1\right)&\text{if}\;\;1/2<a<1.
\end{cases}$$
Related questions:
- What is the coefficient $c_p$ in the small-$a$ behavior $f_p(a)=c_pa^{p-1}+{\cal O}(a^p).$
- What is the large-$p$ asymptotics?
- Can the calculation (even numerically) be simplified by Fourier transformation?
The hypercube integral arose from this MO question.
Update, September 2023:
a closed-form expression for the coefficient $c_p$ was found by Iosif Pinelis, following up on fedja's comment here below:
$$c_p=\frac{2^{p-1} }{(p-1)!}\sum_{k=0}^{\lfloor p/2\rfloor}(-1)^{k}\binom pk\Big(\frac p2-k\Big)^{p-1}$$ $$=\{2,3,16/3,115/12,88/5\}\;\;\text{for}\;\; p=2,3,\ldots 6.$$ For large $p$ the coefficient $c_p\rightarrow 2^p(2\pi p/3)^{-1/2}$.