An arithmetico-geometric series has the form: sum = a + (a+d)r + (a+2d)r^2 + ...
Infinite AGP (|r| < 1): S = a/(1-r) + dr/(1-r)^2
Finite AGP (n terms): Step 1: Write S = a + (a+d)r + (a+2d)r^2 + ... + [a+(n-1)d]r^(n-1) Step 2: Multiply by r: rS = ar + (a+d)r^2 + ... + [a+(n-1)d]r^n Step 3: Subtract: S(1-r) = a + d(r+r^2+...+r^(n-1)) - [a+(n-1)d]r^n Step 4: Sum the GP: S(1-r) = a + dr(1-r^(n-1))/(1-r) - [a+(n-1)d]r^n Step 5: Solve for S.
Common examples:
- sum k*x^k = x/(1-x)^2 (for |x|<1)
- sum k^2*x^k = x(1+x)/(1-x)^3
- 1+2x+3x^2+... = 1/(1-x)^2