Sequence
A
sequence is an ordered list. Like a set, it contains members. The number of ordered elements is called the
length of the sequence. Unlike a set, order matters, and exactly the same elements can appear multiple times at different positions in the sequence. Most precisely, a sequence can be defined as a function whose domain is a countable totally ordered set, such as the natural numbers. For example, is a sequence of letters with the letter 'M' first and 'Y' last. This sequence differs from. Also, the sequence, which contains the number 1 at two different positions, is a valid sequence. Sequences can be
finite, as in this example, or
infinite, such as the sequence of all even positive integers. Finite sequences are sometimes known as
strings or
words and infinite sequences as
streams. The empty sequence is included in most notions of sequence, but may be excluded depending on the context. An infinite sequence of real numbers. This sequence is neither increasing, nor decreasing, nor convergent, nor Cauchy. It is, however, bounded.