This question is about finding the number of samples in a sequence required for the convergence of a series as a function of an error tolerance $\epsilon$. I want to show what I have tried so far.
The function is
$$ \sum_{q=1}^{N-1} \exp(-q^2 \sigma^2/2)(1 - q/N) $$ for $\sigma > 0$ and $N \geq 1$
It is confirmed that this function converges with a large N. I want to find a function for $N$ at which the error is $\epsilon$.
So, the sum of this expression from $N$ to $\infty$ is less than $\epsilon$. The sum of this from $N$ to $\infty$ can be represented as,
$$ \sum_{q=1}^{\infty} \exp(-q^2\sigma^2/2) - \sum_{q=1}^{N-1} \exp(-q^2\sigma^2/2) (1-q/N) < \epsilon $$
For the first term, I tried something like this. If $q \geq 1$, $q(q-1) \geq 0$.
So,
$$ \sum_{q=1}^{\infty} \exp(-q(q-1)\sigma^2/2) \exp(-q \sigma^2/2) \leq \sum_{q=1}^{\infty} \exp(-q \sigma^2/2) = \frac{\exp(-\sigma^2/2)}{(1 - \exp(-\sigma^2/2))} $$
For the second term,
$$ \sum_{q=1}^{N-1} \exp(-q^2\sigma^2/2) (1-q/N) $$
I used the same trick as above, but now I say that as $q \leq N-1, \quad q(q-1) \leq (N-1)(N-2) $
For the second term, as there is a negative in equation (2), we will test for greater than equal to conditional properties of that function.
$$ \sum_{q=1}^{N-1} \exp(-q^2\sigma^2/2) (1-q/N) =\sum_{q=1}^{N-1} \exp(-q(q-1)\sigma^2/2) \exp(-q \sigma^2/2) (1-q/N) $$
$$ \sum_{q=1}^{N-1} \exp(-q^2\sigma^2/2) (1-q/N) \geq \exp(-(N-1)(N-2)\sigma^2/2) \sum_{q=1}^{N-1} (1-q/N) \exp(-q \sigma^2/2) $$
I typed this sum on wolfram, and the final expression I have is this,
$$ \sum_{q=1}^{N-1} \exp(-q^2\sigma^2/2) (1-q/N) \geq \exp(-(N-1)(N-2)\sigma^2/2) \frac{\exp(-\sigma^2/2) (N-1 + \exp(-N \sigma^2/2) - N \exp(-\sigma^2/2))}{((1 - \exp(-\sigma^2/2))^2 N}$$
Rearranging a bit,
$$ \sum_{q=1}^{N-1} \exp(-q^2\sigma^2/2) (1-q/N) \geq \exp(-(N^2-3N+3)\sigma^2/2) \frac{(N-1 + \exp(-N \sigma^2/2) - N \exp(-\sigma^2/2))}{((1 - \exp(-\sigma^2/2))^2 N}$$
If I plug this into the original inequality, things become complicated.
$$ \sum_{q=1}^{\infty} \exp(-q^2\sigma^2/2) - \sum_{q=1}^{N-1} \exp(-q^2\sigma^2/2) (1-q/N) \leq \frac{\exp(-\sigma^2/2)}{(1 - \exp(-\sigma^2/2))} - \exp(-(N^2-3N+3)\sigma^2/2) \frac{(N-1 + \exp(-N \sigma^2/2) - N \exp(-\sigma^2/2))}{((1 - \exp(-\sigma^2/2))^2 N} < \epsilon $$
I don't know how to proceed from here.