This is a page about mathematics. For other usages of "sequence", see: sequence (non-mathematical).

In mathematics, a sequence is a list of objects (or events) which have been ordered in a numerical (and sequential) fashion; such that each member either comes before, or after, every other member. A sequence is a function with a domain equal to the set of positive integers.

The sequence of positive integers is: 1, 2, 3, ..., n - 1, n, n + 1, ... Each number is a term, with n being the "n-th term". A sequence can be denoted by: {an }; such that, in the above list of positive integers, a1 is 1, a317 is 317, and an is n -- this is also indicated by: a0, a1, a2, ..., an, ... The terms of a sequence, are part of a set, commonly indicated by S; they are a "sequence in S".

A sequence may have a finite or infinite number of terms; thus, it is called either finite or infinite. Obviously, it is impossible to give all the terms of an infinite sequence. Infinite sequences are given by listing the first few terms, followed by an ellipsis.

Formally, a sequence can be defined as a function from N (the set of natural numbers) into some set S.

If S is the set of integers, then the sequence is an integer sequence.

If S is endowed with a topology then it is possible to talk about convergence of the sequence. This is discussed in detail in the article about limits.

For a given sequence the corresponding sequence of partial sums is called an infinite series.

E.g.: 1 + 1/2 + 1/4 + ... is a convergent series, meaning that the sequence 1, 1 + 1/2, 1 + 1/2 + 1/4, ... is convergent.

A subsequence is a sequence with some of its members omitted.

See also: Farey sequence