We need all integers n satisfying ∣2n2−n−1∣≤800
Since
2n2−n−1=(2n+1)(n−1) and the parabola opens upward, solve −800≤2n2−n−1≤800
First,
2n2−n−1≤800
2n2−n−801≤0
The roots are n=41±6409=41±80.056…
Hence
−19.76…≤n≤20.26…
So the integer values are −19≤n≤20
Now check the other inequality:
2n2−n−1≥−800
2n2−n+799≥0
Its discriminant is 1−4(2)(799)=1−6392<0 and the quadratic opens upward, so it is always positive.
Therefore
S={−19,−18,…,20} and ∑n∈Sf(n)=∑n=−1920(2n2−n−1)
There are 40 terms.
Also,
∑n=−1920n=240(−19+20)=20
Further,
∑n=−1920n2=∑n=119n2+∑n=120n2
=619⋅20⋅39+620⋅21⋅41
=2470+2870
=5340
Hence
∑n∈Sf(n)=2(5340)−20−40
=10680−60
=10620
Final Answer : 10620