In
mathematics, a
sequence is an ordered collection of objects in which repetitions are allowed. Like a
set, it contains
members (also called
elements, or
terms). The number of elements (possibly infinite) 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. Formally, a sequence can be defined as a
function whose domain is a convex subset of the set of
integers, such as , , , or .