n=3
Clear[x]
Clear[y]
B[0] = Piecewise[{{1, 1/2 < x && x < 1/2}, {0, x <= 1/2},
{0, 1/2 <= x}}]
For[i=1,i<=n,i=i+1, B[i]=Convolve[B[i1] /. x > y, B[0] /. x > y,
y, x]]
B[n_, z_] := B[n] /. x > z
Btilde[n_,x_]:=B[n,x(n+1)/2]
Clear[x]
Ck = Map[Function[k,
NIntegrate[
Btilde[n, x]*Btilde[n, x  k], {x, \[Infinity], +\[Infinity]}]],
Range[n, n]]
Sgma[x_] := Sum[Ck[[k + n + 1]]*Exp[2*Pi*I*k*x], {k, n, n}]
Plot[Re[Sgma[x]], {x, 0, 1}]
