In mathematics, a sequence is a collection of objects possibly with repetition, that come in a specified order. Like a set, it contains members (also called elements, or terms). Unlike a set, the same elements can appear multiple times at different positions in a sequence, and unlike a set, the order does matter. The notion of a sequence can be generalized to an indexed family, defined as a function from an arbitrary index set. 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 two different positions, is a valid sequence. Sequences can be finite, as in these examples, or infinite, such as the sequence of positive even integers (2, 4, 6, 8, ...). The length of a finite sequence is defined as the number of elements in the sequence. 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 typically has index 0 or 1. 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 usually called strings, words or lists, with the specific technical term chosen depending on the type of object the sequence enumerates and the different ways to represent the sequence in computer memory. Infinite sequences are called streams. The empty sequence ( ) is included in most notions of sequence. It may be excluded depending on the context.
Examples and notation A sequence can be thought of as a list of elements with a particular order. Sequences are useful in a number of mathematical disciplines for studying functions, spaces, and other mathematical structures using the convergence properties of sequences. In particular, sequences are the basis for series, which are important in differential equations and analysis. Sequences are also of interest in their own right, and can be studied as patterns or puzzles, such as in the study of prime numbers. There are a number of ways to denote a sequence, some of which are more useful for specific types of sequences. One way to specify a sequence is to list all its elements. For example, the first four odd integers form the sequence (1, 3, 5, 7). This notation is used for infinite sequences as well. For instance, the infinite sequence of positive odd integers is written as (1, 3, 5, 7, ...). Because notating sequences with ellipsis leads to ambiguity, listing is most useful for customary infinite sequences which can be easily recognized from their first few elements. Other ways of denoting a sequence are discussed after the examples.
Examples
A prime number is a natural numbers greater than 1 that has no divisors except 1 and itself. Listing the prime numbers in their natural order gives the sequence (2, 3, 5, 7, 11, 13, 17, ...). The prime numbers are widely used in mathematics, particularly in number theory where many results related to them exist. The Fibonacci numbers are a sequence for which each element is the sum of the previous two elements. The zeroth and first elements are 0 and 1, so the sequence is (0, 1, 1, 2, 3, 5, 8, 13, ...). Other sequences have rational numbers as elements. The sequence (.9, .99, .999, .9999, ...), for instance, approaches the number 1. As another example, π is the limit of the sequence (3, 3.1, 3.14, 3.141, 3.1415, ...), which is increasing. In fact, every real number can be written as the limit of a sequence of rational numbers (e.g. via its decimal expansion, also see completeness of the real numbers). A related type of sequence consists of the decimal digits of a real number, for example the sequence of digits of π, (3, 1, 4, 1, 5, 9, ...). This sequence does not have any pattern that is easily discernible by inspection. The elements of a sequence can be functions instead of numbers. For example, the monomial basis for polynomials of a single variable forms the sequence ( x ↦ 1 , x ↦ x , x ↦ x 2 , x ↦ x 3 , … ) {\displaystyle (x\mapsto 1,x\mapsto x,x\mapsto x^{2},x\mapsto x^{3},\ldots )} , using arrow notation. The On-Line Encyclopedia of Integer Sequences comprises a large list of examples of integer sequences.
… excerpt ends here. Continue reading the full article.





