# IB Mathematics/HL/Algebra/Sequences and Series
## Number Patterns

An important skill in mathematics is to be able to:
* recognise patterns in sets of numbers,
* describe the patterns in words, and
* continue the pattern
A list of numbers where there is a pattern is called a number sequence. The members (numbers) of a sequence are said to be its terms.

### Example

$3,7,11,15,\ldots$
The above is a type of number sequence. The first term is $3$ , the second is $7$ , etc. The rule of the sequence is that "the sequence starts at 3 and each term is 4 more than the previous term."

## Arithmetic Sequences

An arithmetic sequence is a sequence in which each term differs from the previous by the same fixed number:
$2,5,8,11,14,\ldots$ is arithmetic as $5-2=8-5=11-8=14-11$ etc

### Algebraic Definition

Within an arithmetic sequence, the $n$-th term is defined as follows:
$a_{n}=a_{1}+(n-1)d$
Where $d$ is defined as:
$d=a_{n+1}-a_{n}$
Here, the notation is as follows:
$a_{1}$ is the first term of the sequence.
$n$ is the number of terms in the sequence.
$d$ is the common difference between terms in an arithmetic sequence.

### Example

Given the sequence $1,3,5,7,\ldots ,n$ , the values of the notation are as follows:
${\begin{aligned}d&=a_{n+1}-a_{n}\\d&=a_{2}-a_{1}=3-1\\d&=2\end{aligned}}$
And
$a_{1}=1$
Therefore
${\begin{aligned}a_{n}&=a_{1}+(n-1)d\\a_{n}&=1+(n-1)2\\a_{n}&=1+2n-2\\a_{n}&=2n-1\end{aligned}}$
Thus we can determine any value within a sequence:
$a_{5}=2(5)-1=10-1=9$

## Arithmetic Series

An arithmetic series is the addition of successive terms of an arithmetic sequence.
$21+23+27+\cdots +49$

### Sum of an Arithmetic Series

Recall that if the first term is $a_{1}$ and the common difference is $d$ , then the terms are:
$a_{1},a_{1}+d,a_{1}+2d,a_{1}+3d,\ldots$
Suppose that $a_{n}$ is the last or final term of an arithmetic series. Then, where $S_{n}$ is the sum of the arithmetic series:
${\begin{matrix}&S_{n}&=&a_{1}&+&(a_{1}+d)&+&(a_{1}+2d)&+&\cdots &+&(a_{n}-2d)&+&(a_{n}-d)&+&a_{n}\\+\\&S_{n}&=&a_{n}&+&(a_{n}-d)&+&(a_{n}-2d)&+&\cdots &+&(a_{1}+2d)&+&(a_{1}+d)&+&a_{1}\\\hline \\&2S_{n}&=&(a_{1}+a_{n})&+&(a_{1}+a_{n})&+&(a_{1}+a_{n})&+&\cdots &+&(a_{1}+a_{n})&+&(a_{1}+a_{n})&+&(a_{1}+a_{n})\end{matrix}}$
One can see that there there in fact $n$ terms that look identical, thus:
${\begin{matrix}2S_{n}=n(a_{1}+a_{n})\\S_{n}={\dfrac {n(a_{1}+a_{n})}{2}}\end{matrix}}$

## Geometric Sequences

A sequence is geometric if each term can be obtained from the previous one by multiplying by the same non-0 constant.
$2,10,50,250,\ldots$ is geometric as $2\times 5=10$ and $10\times 5=50$ and $50\times 5=250$ .
Notice that
${\frac {10}{2}}={\frac {50}{10}}={\frac {250}{50}}=5$
i.e., each term divided by the previous one is a non-0 constant.

### Algebraic definition

$\{a_{n}\}$ is geometric $\iff {\frac {u_{n+1}}{u_{n}}}=r$ for all positive integers $n$ , where $r$ is a constant (the common ratio).

### The 'Geometric' Mean

If $a,b,c$ are any consecutive terms of a geometric sequence, then
${\frac {a}{b}}={\frac {b}{c}}$ {equating common ratios}
Therefore
$b^{2}=ac$ and so $b=\pm {\sqrt {ac}}$ where ${\sqrt {ac}}$ is the geometric mean of $a,c$ .

### The General Term

Suppose the first term of a geometric sequence is $a_{1}$ and the common ratio is $r$ .
Then $a_{2}=a_{1}r$ therefore $a_{3}=a_{1}r^{2}$ etc.
Thus $a_{n}=a_{1}r^{n-1}$
$a_{1}$ is the first term of the sequence.
$n$ is the general term.
$r$ is the common ratio between terms in an geometric sequence.

## Compound Interest

Compound interest is the interest earned on top of the original investment. The interest is added to the amount. Thus the investment grows by a large amount each time period.

### Consider the following

You invest $1000 into a bank. You leave the money in the back for 3 years. You are paid an interest rate of 10% per annum (p.a.). The interest is added to your investment each year.
An interest rate of 10% p.a. is paid, increasing the value of your investment yearly.
Your percentage increase each year is 10%, i.e.,
$100\%+10\%=110\%$
So 110% of the value at the start of the year, which corresponds to a multiplier of 1.1.
After one year your investment is worth
$1000\$\times 1.1=1100\$$
| After two years it is worth | After three years it is worth |
| $1100\$\times 1.1$ | $1210\$\times 1.1$ |
| $=1000\$\times 1.1\times 1.1$ | $=1000\$\times (1.1)^{2}\times 1.1$ |
| $=1000\$\times (1.1)^{2}$ | $=1000\$\times (1.1)^{3}$ |
| $=1210\$$ | $=1331\$$ |

### Note

| $a_{1}=1000\$$ | The initial investment |
| $a_{2}=a_{1}\times 1.1$ | The amount after 2 year |
| $a_{3}=a_{1}\times (1.1)^{2}$ | The amount after 3 years |
| $a_{4}=a_{1}\times (1.1)^{3}$ | The amount after 4 years |
| $\vdots$ ||
| $a_{n+1}=a_{1}\times (1.1)^{n}$ | The amount after $n$ years |
In general, $a_{n+1}=a_{1}r^{n}$is used for compound growth, where
$a_{1}$ is the initial investment
$r$ is the growth multiplier
$n$ is the number of years
$a_{n+1}$ is the amount after $n$ years