Alternatingsum
Alternatingsum, more commonly called an alternating sum, is the sum of a sequence in which consecutive terms enter with opposite signs. For a sequence a1, a2, a3,... the nth partial sum is s_n = a1 - a2 + a3 - a4 + ... + (-1)^{n-1} a_n. The associated infinite series is ∑_{n=1}^∞ (-1)^{n-1} a_n. When a_n ≥ 0, this is called an alternating series.
Special case: If a_n = n, the partial sums are 1 - 2 + 3 - 4 + 5 - 6 + ... . The
Convergence: If a_n is nonnegative, decreasing to 0, the series converges (Leibniz criterion). The remainder after
Examples: The alternating harmonic series ∑ (-1)^{n-1} (1/n) converges to ln 2. The series 1 - 1 + 1
Generalizations: For any sequence a_n, the alternating form ∑ (-1)^{n-1} a_n is linear in the sense that
Applications: Alternating sums appear in numerical analysis, series acceleration, and analytic evaluations in combinatorics and number