EDIT
A more compact code (assuming 50 terms for the sum):
Manipulate[Plot[Evaluate@{f[x], a0/2 + Sum[coeffs[[n]].(#[2 \[Pi] n x/2529] & /@ {Cos, Sin}),
{n, 1, k}]}, {x, offset, offset + range},
PlotRange -> {{offset, offset + range}, {800, 2800}}, Frame -> True,
Axes -> False],
{{k, 0, "Number of Terms"}, 0, 50, 1, Appearance -> "Labeled"},
{{range, 10, "x-interval"}, 0, 2529 - offset, 10, Appearance -> "Labeled"},
{{offset, 0, "Offset x-value"}, 0, 2529 - range, 10, Appearance -> "Labeled"},
ContinuousAction -> False,
Initialization :> (coeffs = Table[(2/2529)*(NIntegrate[f[x]*(#[2 \[Pi] n x/2529] & /@ {Cos, Sin}),
{x, 0,2529}]), {n, 1, 50}];
a0 = (2/2529)*(Integrate[f[x], {x, 0, 2529}]))]