nth term, partial sums and term lists for arithmetic sequences.
Answer
Steps
Why it works
Each term adds the same difference d, so aₙ = a₁ + (n−1)d is just repeated addition collapsed into multiplication. The sum pairs first+last terms (Gauss’s trick): Sₙ = n/2 · (a₁ + aₙ), which is why the average of the endpoints times the count works.