Finite Geometric Series Formula

We know that:

a = first term
r = common ratio
n = number of terms

We'r going to use a notation $S_n$ to denote the sum of first n terms as following:

$S_n$= sum of first n terms

$S_n=a+ar+ar^2+\cdot\cdot\cdot+ar^{n-1}$

We want to come up with a nice clean formula for evaluating this and we're gonna use a little trick to do it.

Let's just multiple negative r on both sides of equation as following:

$-rS_n=-ar-ar^2-\cdot\cdot\cdot-ar^{n-1}-ar^n$

So:

$S_n-rS_n=a-ar^n$

$S_n(1-r)=a(1-r^n)$

$S_n=\frac{a(1-r^n)}{1-r}$

Comments

Popular posts from this blog

BdsDex: failed to load Boot0001 "UEFI BHYVE SATA DISK BHYVE-OABE-20A5-E582" from PciRoot(0x0)/Pci (0x2, 0x0)/Stat(0x0,0xFFFF,0x0) : Not Found

How To Install Nginx, MySQL and PHP (FEMP) Stack on FreeBSD 13.0

Install samba on FreeBSD(on VMware Workstation) to share files with Window.