La Serie de Fourier de 

f(x) = 0\:\:si\:\:-π<x<0\:\:\:\:y\:\:\:\:1\:\:si\:\:0<x<π

f(x)∼\frac{1}{2}+\frac{2}{π}\sum_{n=1}^{∞}{\frac{1}{2n-1}sin(2n-1)x

y\:\:\:\:f(x+2π)=f(x)

k = 2 (slider from 1 to 100, step 1)
Fourier = Sequence(sin((((2 * n) - 1) * x)) / ((2 * n) - 1), n, 1, k)
a(x) = 1 / 2 + (2 / π * Sum[Fourier])
f(x) = If[(-π)  <  x  <  0, 0]
g(x) = If[0  <  x  <  π, 1]
h(x) = If[π  <  x  <  (2 * π), 0]
p(x) = If[(2 * π)  <  x  <  (3 * π), 1]
q(x) = If[(3 * π)  <  x  <  (4 * π), 0]
r(x) = If[(4 * π)  <  x  <  (5 * π), 1]
s(x) = If[(5 * π)  <  x  <  (6 * π), 0]
t(x) = If[(-2 * π)  <  x  <  (-π), 1]
f_1(x) = If[(-3 * π)  <  x  <  (-2 * π), 0]
g_1(x) = If[(-4 * π)  <  x  <  (-3 * π), 1]
h_1(x) = If[(-5 * π)  <  x  <  (-4 * π), 0]