A sequence is an ordered set of objects. A sequence that goes on forever is called an infinite sequence, whereas one that does not is called a finite sequence. The sum of a sequence is called a series.

Sequences are usually denoted as

${\displaystyle (a_k)_m^n}$

with ${\displaystyle k}$ being the term number and ${\displaystyle m,n}$ being the bounds of the series, and ${\displaystyle a_k}$ being the term, usually found with a function ${\displaystyle a_k = f(k)}$ or rule describing them.

An example would be

${\displaystyle a_k = 3^k}$
${\displaystyle (a_k)_{m=1}^\infty=(3,9,27,81,243,\cdots)}$

Sequences described with the previous terms are called recursive sequences. For instance, the Fibonacci numbers can be described as

${\displaystyle a_0=0,a_1=1, a_k = a_{k-1}+a_{k-2}}$
${\displaystyle (a_k)_{m=0}^{\infty}=(0,1,1,2,3,5,8,\cdots)}$

Two common types are arithmetic and geometric sequences. Arithmetic sequences have a given difference between each term. For example,

${\displaystyle a_k = 2k+1}$
${\displaystyle (a_k)_{m=0}^{\infty}=(1,3,5,7,\cdots)}$

Geometric sequences take the form

${\displaystyle a_k = ar^k}$
${\displaystyle (a_k)_{m=0}^{\infty}=(a,ar,ar^2,ar^3,\cdots)}$

Where ${\displaystyle r}$ is a common ratio.

Sets vs Sequences

Unlike a set, sequences allow repeats and the order matters.

Formal definition

Let ${\displaystyle S}$ be a set
Let ${\displaystyle \mathbb{N}}$ be the set of natural numbers.
Then, a mapping${\displaystyle a:\N\to S}$ is called a sequence of elements of${\displaystyle S}$ . The image of an element of under${\displaystyle a}$ (that is${\displaystyle a(i)}$) is denoted as${\displaystyle S_i}$ , where${\displaystyle i\in\N}$ .

An equivalent definition is an indexed family indexed by the natural numbers.

While the formal definition of a sequence is a treats a sequence as a function, in practice they are treated somewhat like a set with "order".