4 views

1 Answers

In mathematics, a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. Like a set, it contains members. The number of elements is called the length of the sequence. Unlike a set, the same elements can appear multiple times at different positions in a sequence, and unlike a set, the order does matter. Formally, a sequence can be defined as a function from natural numbers to the elements at each position. The notion of a sequence can be generalized to an indexed family, defined as a function from an index set that may not be numbers to another set of elements.

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 these examples, or infinite, such as the sequence of all even positive integers.

The position of an element in a sequence is its rank or index; it is the natural number for which the element is the image. The first element has index 0 or 1, depending on the context or a specific convention. In mathematical analysis, a sequence is often denoted by letters in the form of a n {\displaystyle a_{n}} , b n {\displaystyle b_{n}} and c n {\displaystyle c_{n}} , where the subscript n refers to the nth element of the sequence; for example, the nth element of the Fibonacci sequence F {\displaystyle F} is generally denoted as F n {\displaystyle F_{n}} .

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.

4 views