# Definition:Sequence

## Informal Definition

A **sequence** is a set of objects which is listed in a **specific order**, one after another.

Thus one can identify the elements of a **sequence** as being the **first**, the **second**, the **third**, ... the **$n$th**, and so on.

## Formal Definition

A **sequence** is a mapping whose domain is a subset of the set of natural numbers $\N$.

It can be seen that a sequence is an instance of a family of elements indexed by $\N$.

## Notation

The notation for a sequence is as follows.

If $f: A \to S$ is a sequence, then a symbol, for example "$a$", is chosen to represent elements of this sequence.

Then for each $k \in A$, $f \left({k}\right)$ is denoted $a_k$, and $f$ itself is denoted $\left \langle {a_k} \right \rangle_{k \mathop \in A}$.

Other types of brackets may be encountered, for example:

- $\left({a_k}\right)_{k \mathop \in A}$
- $\left\{{a_k}\right\}_{k \mathop \in A}$

The latter is discouraged because of the implication that the order of the terms does not matter.

Any expression can be used to denote the domain of $f$ in place of $k \in A$.

For example:

- $\left \langle {a_k} \right \rangle_{k \mathop \ge n}$
- $\left \langle {a_k} \right \rangle_{p \mathop \le k \mathop \le q}$

The sequence itself may be defined by a simple formula, and so for example:

- $\left \langle {k^3} \right \rangle_{2 \mathop \le k \mathop \le 6}$

is the same as:

- $\left \langle {a_k} \right \rangle_{2 \mathop \le k \mathop \le 6}$ where $a_k = k^3$ for all $k \in \left\{{2, 3, \ldots, 6}\right\}$.

The set $A$ is usually taken to be the set of natural numbers $\N = \left\{{0,1, 2, 3, \ldots}\right\}$ or a subset.

In particular, for a finite sequence, $A$ is usually $\left\{{0, 1, 2, \ldots, n-1}\right\}$ or $\left\{{1, 2, 3, \ldots, n}\right\}$.

If this is the case, then it is usual to write $\left \langle {a_k} \right \rangle_{k \mathop \in A}$ as $\left \langle {a_k} \right \rangle$ or even as $\left \langle {a} \right \rangle$ if brevity and simplicity improve clarity.

A finite sequence of length $n$ can be denoted:

- $\left({a_1, a_2, \ldots, a_n}\right)$

and by this notational convention the brackets are always round.

## Terms

The elements of a sequence are known as its **terms**.

Let $\sequence {x_n}$ be a sequence.

Then the **$k$th term** of $\sequence {x_n}$ is the ordered pair $\tuple {k, x_k}$.

## Finite Sequence

A **finite sequence** is a sequence whose domain is finite.

### Length of Sequence

The **length** of a finite sequence is the number of terms it contains, or equivalently, the cardinality of its domain.

#### Sequence of $n$ Terms

A **sequence of $n$ terms** is a (finite) sequence whose length is $n$.

### Empty Sequence

An **empty sequence** is a (finite) sequence containing no terms.

Thus an **empty sequence** is a mapping from $\varnothing$ to $S$, that is, the empty mapping.

## Infinite Sequence

An **infinite sequence** is a sequence whose domain is infinite.

That is, an **infinite sequence** is a sequence that has infinitely many terms.

Hence for an **infinite sequence** $\sequence {s_n}_{n \mathop \in \N}$ whose range is $S$, $\sequence {s_n}_{n \mathop \in \N}$ is an element of the set of mappings $S^{\N}$ from $\N$ to $S$.

## Range

Let $\sequence {x_n}_{n \mathop \in A}$ be a sequence.

The **range of $\sequence {x_n}$** is the set:

- $\set {x_n: n \mathop \in A}$

## Codomain

The codomain of a sequence can be elements of a set of any objects.

If the codomain of a sequence $f$ is $S$, then the sequence is said to be a **sequence of elements of $S$**, or a **sequence in $S$**.

## Sequence of Distinct Terms

A **sequence of distinct terms of $S$** is an injection from a subset of $\N$ into $S$.

Thus a sequence $\sequence {a_k}_{k \mathop \in A}$ is a **sequence of distinct terms** if and only if:

- $\forall j, k \in A: j \ne k \implies a_j \ne a_k$

## Equality of Sequences

Let $f$ and $g$ be two sequences on the same set $A$:

- $f = \left\langle{a_k}\right\rangle_{k \mathop \in A}$
- $g = \left\langle{b_k}\right\rangle_{k \mathop \in B}$

Then $f = g$ if and only if:

- $A = B$
- $\forall i \in A: a_i = b_i$

## Extension of Sequence

As a sequence is, by definition, also a mapping, the definition of an **extension of a sequence** is the same as that for an extension of a mapping:

Let:

- $\left \langle {a_k} \right \rangle_{k \mathop \in A}$ be a sequence on $A$, where $A \subseteq \N$.
- $\left \langle {b_k} \right \rangle_{k \mathop \in B}$ be a sequence on $B$, where $B \subseteq \N$.
- $A \subseteq B$
- $\forall k \in A: b_k = a_k$.

Then $\left \langle {b_k} \right \rangle_{k \mathop \in B}$ **extends** or **is an extension of** $\left \langle {a_k} \right \rangle_{k \mathop \in A}$.

### Negative Integers

A sequence on $\N$ can be extended to the negative integers.

Let $\left \langle {a_k} \right \rangle_{k \mathop \in \N}$ and $\left \langle {b_k} \right \rangle_{k \mathop \in \N}$ be sequences on $\N$.

Let $a_0 = b_0$.

Let $c_k$ be defined as:

- $\forall k \in \Z: c_k = \begin{cases} a_k & : k \ge 0 \\ b_{-k} : & k \le 0 \end{cases}$

Then $\left \langle {c_k} \right \rangle_{k \mathop \in \Z}$ **extends** (or **is an extension of**) $\left \langle {a_k} \right \rangle_{k \mathop \in \N}$ to the negative integers.

## Doubly Subscripted Sequence

A **doubly subscripted sequence** is a mapping whose domain is a subset of the cartesian product $\N \times \N$ of the set of natural numbers $\N$ with itself.

It can be seen that a **doubly subscripted sequence** is an instance of a family of elements indexed by $\N^2$.

A **doubly subscripted sequence** can be denoted $\left\langle{a_{m n} }\right\rangle_{m, \, n \mathop \ge 0}$

## Also defined as

Some sources, generally expositions of set theory, define a **sequence** as a mapping whose domain is an ordinal.

In such cases, the natural numbers $\N$ are defined (usually) by the von Neumann construction, resulting in the fact that the two definitions are in complete agreement.

Note, however, that this definition of **sequence** extends to the transfinite ordinals.

Some sources define a **sequence** as a succession of **numbers** only, particularly those addressing **analysis**.

## Also known as

Some sources refer to a **sequence** as a **series**.

This usage is not endorsed on $\mathsf{Pr} \infty \mathsf{fWiki}$, as that term is used to mean something different.

## Also see

- Definition:Integer Sequence
- Definition:Rational Sequence
- Definition:Real Sequence
- Definition:Complex Sequence

- Definition:Arithmetic Function, which can be considered as an example of an infinite sequence

- Results about
**sequences**can be found here.

## Sources

- 1960: Paul R. Halmos:
*Naive Set Theory*... (previous) ... (next): $\S 11$: Numbers - 1965: Claude Berge and A. Ghouila-Houri:
*Programming, Games and Transportation Networks*... (previous) ... (next): $1$. Preliminary ideas; sets, vector spaces: $1.1$. Sets - 1965: Seth Warner:
*Modern Algebra*... (previous) ... (next): $\S 18$ - 1966: Richard A. Dean:
*Elements of Abstract Algebra*... (previous) ... (next): $\S 0.4$: Example $13$ - 1975: T.S. Blyth:
*Set Theory and Abstract Algebra*... (previous) ... (next): $\S 6$. Indexed families; partitions; equivalence relations: Example $6.1$ - 1978: Lynn Arthur Steen and J. Arthur Seebach, Jr.:
*Counterexamples in Topology*(2nd ed.) ... (previous) ... (next): Part $\text I$: Basic Definitions: Section $1$: General Introduction: Limit Points - 1982: P.M. Cohn:
*Algebra Volume 1*(2nd ed.) ... (previous) ... (next): Chapter $1$: Sets and mappings: $\S 1.2$: Sets - 1993: Keith Devlin:
*The Joy of Sets: Fundamentals of Contemporary Set Theory*(2nd ed.) ... (previous) ... (next): $\S 1$: Naive Set Theory: $\S 1.7$: Well-Orderings and Ordinals - 2008: Paul Halmos and Steven Givant:
*Introduction to Boolean Algebras*... (previous) ... (next): Appendix $\text{A}$: Set Theory: Sequences