Please tell me an efficient equation to calculate the nth sum of the series $$(-1) + 2 + (-3) + ... + (-1)^{n}\cdot n$$
2026-04-24 09:49:57.1777024197
What is an efficient equation to calculate the nth sum of the series -1 + 2 - 3 + .. + ( - 1)^n n?
120 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
Hint: note that sum of two consecutive elements is const (exactly $1$).
Sum of all first elements except at most once (if $n$ is odd) is obvious ($1 \cdot \lfloor\frac{n}{2}\rfloor$), you have to add at most last number. It is not hard to come that
$$ S_n = \frac{n}{2} \cdot (-1)^n + \frac{(-1)^n-1}{4} = \frac{(-1)^n (1+2n) - 1}{4}$$