Geometric progression (source code)

= Geometric progression
{title2=$a_n=ar^n$}
{wiki}

= Geometric sequence
{synonym}

= GP
{c}
{synonym}

A geometric progression is a <sequence> obtained by repeatedly multiplying by one fixed <common ratio> $r$:
$$
a_0=a,\qquad a_{n+1}=ra_n,\qquad a_n=ar^n\quad(n\ge0).
$$
Here $a$ and $r$ may be <real numbers> or <complex numbers>. The recurrence is meaningful even when $a=0$ or $r=0$; expressing $r$ as a <ratio> of successive terms requires a nonzero denominator. As a polynomial convention, $r^0=1$, including at $r=0$.

For example, quantities $100,80,64,51.2,\ldots$ retain four fifths of their preceding value at every step. The decrement changes, but the retained fraction does not. With the same initial value and <common ratio> $2$, the terms are $100,200,400,800,\ldots$. This multiplicative structure is useful whenever the same proportional rule repeats: it turns many updates into the single <exponentiation> $r^n$. An <arithmetic progression> instead repeats an additive increment.

For nonzero $a$, the <modulus> of $a_n$ tends to zero when $|r|<1$, stays fixed when $|r|=1$, and grows without bound when $|r|>1$. For a negative real <common ratio>, successive nonzero terms also alternate in sign. Thus the terms $1,-1/2,1/4,-1/8,\ldots$ decay in size while crossing zero at every step. Adding the terms gives a <geometric series>; the individual terms and their accumulated <partial sums> are different <sequences>.