 Sequence. In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed. Like I said, it contains numbers also called elements, or terms. The number of elements possibly infinite is called the length of the sequence. Unlike I said, the same elements can appear multiple times at different positions in a sequence, and order matters. Formally, a sequence can be defined as a function whose domain is either the set of the natural numbers for infinite sequences or the set of the first and natural numbers for a sequence of finite length n. The position of an element in a sequence is its rank or index. It is a natural number from which the element is the image. It depends on the context for a specific convention, if the first element has index 0 or 1. When a symbol has been chosen for denoting a sequence, the nth element of the sequence is denoted by this symbol with n as subscript. For example, the nth element of the Fibonacci sequence is generally denoted footnote. For example, m, a, r, y is a sequence of letters with the letter m first and y last. This sequence differs from a, r, m, y. Also, the sequence 1, 1, 2, 3, 5, 8 which contains the number 1 at 2 different positions is a valid sequence. Sequences can be finite, as in these examples, for infinite, such as the sequence of all evens positive integers 2, 4, 6. In computing and computer science, finite sequences are sometimes called strings, words or lists. The different names commonly corresponding to different ways to represent them in computer memory, infinite sequences are called streams. The empty sequence is included in most notions of sequence, but may be excluded depending on the context.