A part of an infinite sequence ofreal numbers (in blue), indexed by a natural number. This sequence is neither increasing, decreasing, convergent, norCauchy. It is, however, bounded (by red dashed lines).
Inmathematics, asequence is an enumerated collection ofobjects in which repetitions are allowed andorder matters. Like aset, it containsmembers (also calledelements, orterms). The number of elements (possiblyinfinite) is called thelength 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 afunction fromnatural numbers (the positions of elements in the sequence) to the elements at each position. The notion of a sequence can be generalized to anindexed family, defined as a function from anarbitrary 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 befinite, as in these examples, orinfinite, such as the sequence of allevenpositive integers (2, 4, 6, ...).
The position of an element in a sequence is itsrank orindex; 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. Inmathematical analysis, a sequence is often denoted by letters in the form of, and, where the subscriptn refers to thenth element of the sequence; for example, thenth element of theFibonacci sequence is generally denoted as.
Incomputing andcomputer science, finite sequences are usually calledstrings,words orlists, with the specific technical term chosen depending on the type of object the sequence enumerates and the different ways to represent the sequence incomputer memory. Infinite sequences are calledstreams.
The empty sequence ( ) is included in most notions of sequence. It may be excluded depending on the context.
A sequence can be thought of as a list of elements with a particular order.[1][2] Sequences are useful in a number of mathematical disciplines for studyingfunctions,spaces, and other mathematical structures using theconvergence properties of sequences. In particular, sequences are the basis forseries, which are important indifferential equations andanalysis. Sequences are also of interest in their own right, and can be studied as patterns or puzzles, such as in the study ofprime 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 numbers 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 withellipsis 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.
Atiling with squares whose sides are successive Fibonacci numbers in length.
Theprime numbers are thenatural numbers greater than 1 that have nodivisors but 1 and themselves. Taking these in their natural order gives the sequence (2, 3, 5, 7, 11, 13, 17, ...). The prime numbers are widely used inmathematics, particularly innumber theory where many results related to them exist.
TheFibonacci numbers comprise the integer sequence in which each element is the sum of the previous two elements. The first two elements are either 0 and 1 or 1 and 1 so that the sequence is (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ...).[1]
Other examples of sequences include those made up ofrational numbers,real numbers andcomplex numbers. The sequence (.9, .99, .999, .9999, ...), for instance, approaches the number 1. In fact, every real number can be written as thelimit of a sequence of rational numbers (e.g. via itsdecimal expansion, also seecompleteness of the real numbers). As another example,π is the limit of the sequence (3, 3.1, 3.14, 3.141, 3.1415, ...), which is increasing. A related sequence is the sequence of decimal digits ofπ, that is, (3, 1, 4, 1, 5, 9, ...). Unlike the preceding sequence, this sequence does not have any pattern that is easily discernible by inspection.
Other examples are sequences offunctions, whose elements are functions instead of numbers.
Other notations can be useful for sequences whose pattern cannot be easily guessed or for sequences that do not have a pattern such as the digits ofπ. One such notation is to write down a general formula for computing thenth term as a function ofn, enclose it in parentheses, and include a subscript indicating the set of values thatn can take. For example, in this notation the sequence of even numbers could be written as. The sequence of squares could be written as. The variablen is called anindex, and the set of values that it can take is called theindex set.
It is often useful to combine this notation with the technique of treating the elements of a sequence as individual variables. This yields expressions like, which denotes a sequence whosenth element is given by the variable. For example:
One can consider multiple sequences at the same time by using different variables; e.g. could be a different sequence than. One can even consider a sequence of sequences: denotes a sequence whosemth term is the sequence.
An alternative to writing the domain of a sequence in the subscript is to indicate the range of values that the index can take by listing its highest and lowest legal values. For example, the notation denotes the ten-term sequence of squares. The limits and are allowed, but they do not represent valid values for the index, only thesupremum orinfimum of such values, respectively. For example, the sequence is the same as the sequence, and does not contain an additional term "at infinity". The sequence is abi-infinite sequence, and can also be written as.
In cases where the set of indexing numbers is understood, the subscripts and superscripts are often left off. That is, one simply writes for an arbitrary sequence. Often, the indexk is understood to run from 1 to ∞. However, sequences are frequently indexed starting from zero, as in
In some cases, the elements of the sequence are related naturally to a sequence of integers whose pattern can be easily inferred. In these cases, the index set may be implied by a listing of the first few abstract elements. For instance, the sequence of squares ofodd numbers could be denoted in any of the following ways.
Moreover, the subscripts and superscripts could have been left off in the third, fourth, and fifth notations, if the indexing set was understood to be thenatural numbers. In the second and third bullets, there is a well-defined sequence, but it is not the same as the sequence denoted by the expression.
Sequences whose elements are related to the previous elements in a straightforward way are often defined usingrecursion. This is in contrast to the definition of sequences of elements as functions of their positions.
To define a sequence by recursion, one needs a rule, calledrecurrence relation to construct each element in terms of the ones before it. In addition, enough initial elements must be provided so that all subsequent elements of the sequence can be computed by successive applications of the recurrence relation.
TheFibonacci sequence is a simple classical example, defined by the recurrence relation
with initial terms and. From this, a simple computation shows that the first ten terms of this sequence are 0, 1, 1, 2, 3, 5, 8, 13, 21, and 34.
A complicated example of a sequence defined by a recurrence relation isRecamán's sequence,[4] defined by the recurrence relation
with initial term
Alinear recurrence with constant coefficients is a recurrence relation of the form
where areconstants. There is a general method for expressing the general term of such a sequence as a function ofn; seeLinear recurrence. In the case of the Fibonacci sequence, one has and the resulting function ofn is given byBinet's formula.
Aholonomic sequence is a sequence defined by a recurrence relation of the form
where arepolynomials inn. For most holonomic sequences, there is no explicit formula for expressing as a function ofn. Nevertheless, holonomic sequences play an important role in various areas of mathematics. For example, manyspecial functions have aTaylor series whose sequence of coefficients is holonomic. The use of the recurrence relation allows a fast computation of values of such special functions.
Not all sequences can be specified by a recurrence relation. An example is the sequence ofprime numbers in their natural order (2, 3, 5, 7, 11, 13, 17, ...).
There are many different notions of sequences in mathematics, some of which (e.g.,exact sequence) are not covered by the definitions and notations introduced below.
In this article, a sequence is formally defined as afunction whosedomain is aninterval ofintegers. This definition covers several different uses of the word "sequence", including one-sided infinite sequences, bi-infinite sequences, and finite sequences (see below for definitions of these kinds of sequences). However, many authors use a narrower definition by requiring the domain of a sequence to be the set ofnatural numbers. This narrower definition has the disadvantage that it rules out finite sequences and bi-infinite sequences, both of which are usually called sequences in standard mathematical practice. Another disadvantage is that, if one removes the first terms of a sequence, one needs reindexing the remainder terms for fitting this definition. In some contexts, to shorten exposition, thecodomain of the sequence is fixed by context, for example by requiring it to be the set of real numbers,[5] the set of complex numbers,[6] or atopological space.[7]
Although sequences are a type of function, they are usually distinguished notationally from functions in that the input is written as a subscript rather than in parentheses, that is,an rather thana(n). There are terminological differences as well: the value of a sequence at the lowest input (often 1) is called the "first element" of the sequence, the value at the second smallest input (often 2) is called the "second element", etc. Also, while a function abstracted from its input is usually denoted by a single letter, e.g.f, a sequence abstracted from its input is usually written by a notation such as, or just as HereA is the domain, or index set, of the sequence.
Sequences and their limits (see below) are important concepts for studying topological spaces. An important generalization of sequences is the concept ofnets. Anet is a function from a (possiblyuncountable)directed set to a topological space. The notational conventions for sequences normally apply to nets as well.
Thelength of a sequence is defined as the number of terms in the sequence.
A sequence of a finite length is afinite sequence. A finite sequence of lengthn is also called ann-tuple. Finite sequences include theempty sequence, denoted( ), that has no elements.
Normally, the terminfinite sequence refers to a sequence that is infinite in one direction, and finite in the other; such a sequence has a first element, but no final element, and are calledsingly infinite sequence or aone-sided infinite sequence when disambiguation is needed. In contrast, a sequence that is infinite in both directions—i.e. that has neither a first nor a final element—is called abi-infinite sequence,two-way infinite sequence, ordoubly infinite sequence. A function from the setZ ofallintegers into a set, such as for instance the sequence of all even integers ( ..., −4, −2, 0, 2, 4, 6, 8, ... ), is bi-infinite. This sequence could be denoted.
A sequence is said to bemonotonically increasing if each term is greater than or equal to the one before it. For example, the sequence is monotonically increasing if and only if for all If each consecutive term is strictly greater than (>) the previous term then the sequence is calledstrictly monotonically increasing. A sequence ismonotonically decreasing if each consecutive term is less than or equal to the previous one, and isstrictly monotonically decreasing if each is strictly less than the previous. If a sequence is either increasing or decreasing it is called amonotone sequence. This is a special case of the more general notion of amonotonic function.
The termsnondecreasing andnonincreasing are often used in place ofincreasing anddecreasing in order to avoid any possible confusion withstrictly increasing andstrictly decreasing, respectively.
If the sequence of real numbers (an) is such that all the terms are less than some real numberM, then the sequence is said to bebounded from above. In other words, this means that there existsM such that for alln,an ≤M. Any suchM is called anupper bound. Likewise, if, for some realm,an ≥m for alln greater than someN, then the sequence isbounded from below and any suchm is called alower bound. If a sequence is both bounded from above and bounded from below, then the sequence is said to bebounded.
Asubsequence of a given sequence is a sequence formed from the given sequence by deleting some of the elements without disturbing the relative positions of the remaining elements. For instance, the sequence of positive even integers (2, 4, 6, ...) is a subsequence of the positive integers (1, 2, 3, ...). The positions of some elements change when other elements are deleted. However, the relative positions are preserved.
Formally, a subsequence of the sequence is any sequence of the form, where is a strictly increasing sequence of positive integers.
A positive integer sequence is sometimes calledmultiplicative, ifanm =anam for all pairsn,m such thatn andm arecoprime.[8] In other instances, sequences are often calledmultiplicative, ifan =na1 for alln. Moreover, amultiplicative Fibonacci sequence[9] satisfies the recursion relationan =an−1an−2.
Abinary sequence is a sequence whose terms have one of two discrete values, e.g.base 2 values (0,1,1,0, ...), a series of coin tosses (Heads/Tails) H,T,H,H,T, ..., the answers to a set of True or False questions (T, F, T, T, ...), and so on.
The plot of a convergent sequence (an) is shown in blue. From the graph we can see that the sequence is converging to the limit zero asn increases.
An important property of a sequence isconvergence. If a sequence converges, it converges to a particular value known as thelimit. If a sequence converges to some limit, then it isconvergent. A sequence that does not converge isdivergent.
Informally, a sequence has a limit if the elements of the sequence become closer and closer to some value (called the limit of the sequence), and they become and remainarbitrarily close to, meaning that given a real number greater than zero, all but a finite number of the elements of the sequence have a distance from less than.
For example, the sequence shown to the right converges to the value 0. On the other hand, the sequences (which begins 1, 8, 27, ...) and (which begins −1, 1, −1, 1, ...) are both divergent.
If a sequence converges, then the value it converges to is unique. This value is called thelimit of the sequence. The limit of a convergent sequence is normally denoted. If is a divergent sequence, then the expression is meaningless.
A sequence of real numbersconverges to a real number if, for all, there exists a natural number such that for all we have[5]
If is a sequence of complex numbers rather than a sequence of real numbers, this last formula can still be used to define convergence, with the provision that denotes the complex modulus, i.e.. If is a sequence of points in ametric space, then the formula can be used to define convergence, if the expression is replaced by the expression, which denotes thedistance between and.
The plot of a Cauchy sequence (Xn), shown in blue, asXn versusn. In the graph the sequence appears to be converging to a limit as the distance between consecutive terms in the sequence gets smaller asn increases. In thereal numbers every Cauchy sequence converges to some limit.
A Cauchy sequence is a sequence whose terms become arbitrarily close together as n gets very large. The notion of a Cauchy sequence is important in the study of sequences inmetric spaces, and, in particular, inreal analysis. One particularly important result in real analysis isCauchy characterization of convergence for sequences:
A sequence of real numbers is convergent (in the reals) if and only if it is Cauchy.
In contrast, there are Cauchy sequences ofrational numbers that are not convergent in the rationals, e.g. the sequence defined by and is Cauchy, but has no rational limit (cf.Cauchy sequence § Non-example: rational numbers). More generally, any sequence of rational numbers that converges to anirrational number is Cauchy, but not convergent when interpreted as a sequence in the set of rational numbers.
Metric spaces that satisfy the Cauchy characterization of convergence for sequences are calledcomplete metric spaces and are particularly nice for analysis.
In calculus, it is common to define notation for sequences which do not converge in the sense discussed above, but which instead become and remain arbitrarily large, or become and remain arbitrarily negative. If becomes arbitrarily large as, we write
In this case we say that the sequencediverges, or that itconverges to infinity. An example of such a sequence isan =n.
If becomes arbitrarily negative (i.e. negative and large in magnitude) as, we write
and say that the sequencediverges orconverges to negative infinity.
Aseries is, informally speaking, the sum of the terms of a sequence. That is, it is an expression of the form or, where is a sequence of real or complex numbers. Thepartial sums of a series are the expressions resulting from replacing the infinity symbol with a finite number, i.e. theNth partial sum of the series is the number
The partial sums themselves form a sequence, which is called thesequence of partial sums of the series. If the sequence of partial sums converges, then we say that the series isconvergent, and the limit is called thevalue of the series. The same notation is used to denote a series and its value, i.e. we write.
A function from a metric space to another metric space iscontinuous exactly when it takes convergent sequences to convergent sequences.
A metric space is aconnected space if and only if, whenever the space is partitioned into two sets, one of the two sets contains a sequence converging to a point in the other set.
More formally, given a sequence of spaces, the product space
is defined as the set of all sequences such that for eachi, is an element of. Thecanonical projections are the mapspi :X →Xi defined by the equation. Then theproduct topology onX is defined to be thecoarsest topology (i.e. the topology with the fewest open sets) for which all the projectionspi arecontinuous. The product topology is sometimes called theTychonoff topology.
When discussing sequences inanalysis, one will generally consider sequences of the form
which is to say, infinite sequences of elements indexed bynatural numbers.
A sequence may start with an index different from 1 or 0. For example, the sequence defined byxn = 1/log(n) would be defined only forn ≥ 2. When talking about such infinite sequences, it is usually sufficient (and does not change much for most considerations) to assume that the members of the sequence are defined at least for all indiceslarge enough, that is, greater than some givenN.
The most elementary type of sequences are numerical ones, that is, sequences ofreal orcomplex numbers. This type can be generalized to sequences of elements of somevector space. In analysis, the vector spaces considered are oftenfunction spaces. Even more generally, one can study sequences with elements in sometopological space.
Asequence space is avector space whose elements are infinite sequences ofreal orcomplex numbers. Equivalently, it is afunction space whose elements are functions from thenatural numbers to thefieldK, whereK is either the field of real numbers or the field of complex numbers. The set of all such functions is naturally identified with the set of all possible infinite sequences with elements inK, and can be turned into avector space under the operations ofpointwise addition of functions and pointwise scalar multiplication. All sequence spaces arelinear subspaces of this space. Sequence spaces are typically equipped with anorm, or at least the structure of atopological vector space.
The most important sequences spaces in analysis are the ℓp spaces, consisting of thep-power summable sequences, with thep-norm. These are special cases ofLp spaces for thecounting measure on the set of natural numbers. Other important classes of sequences like convergent sequences ornull sequences form sequence spaces, respectively denotedc andc0, with the sup norm. Any sequence space can also be equipped with thetopology ofpointwise convergence, under which it becomes a special kind ofFréchet space called anFK-space.
Sequences over afield may also be viewed asvectors in avector space. Specifically, the set ofF-valued sequences (whereF is a field) is afunction space (in fact, aproduct space) ofF-valued functions over the set of natural numbers.
IfA is a set, thefree monoid overA (denotedA*, also calledKleene star ofA) is amonoid containing all the finite sequences (or strings) of zero or more elements ofA, with the binary operation of concatenation. Thefree semigroupA+ is the subsemigroup ofA* containing all elements except the empty sequence.
Inhomological algebra andalgebraic topology, aspectral sequence is a means of computing homology groups by taking successive approximations. Spectral sequences are a generalization ofexact sequences, and since their introduction byJean Leray (1946), they have become an important research tool, particularly inhomotopy theory.
Anordinal-indexed sequence is a generalization of a sequence. If α is alimit ordinal andX is a set, an α-indexed sequence of elements ofX is a function from α toX. In this terminology an ω-indexed sequence is an ordinary sequence.
Incomputer science, finite sequences are calledlists. Potentially infinite sequences are calledstreams. Finite sequences of characters or digits are calledstrings.
Infinite sequences ofdigits (orcharacters) drawn from afinitealphabet are of particular interest intheoretical computer science. They are often referred to simply assequences orstreams, as opposed to finitestrings. Infinite binary sequences, for instance, are infinite sequences ofbits (characters drawn from the alphabet {0, 1}). The setC = {0, 1}∞ of all infinite binary sequences is sometimes called theCantor space.
An infinite binary sequence can represent aformal language (a set of strings) by setting then th bit of the sequence to 1 if and only if then th string (inshortlex order) is in the language. This representation is useful in thediagonalization method for proofs.[11]
^abcGaughan, Edward (2009). "1.1 Sequences and Convergence".Introduction to Analysis. AMS (2009).ISBN978-0-8218-4787-9.
^Edward B. Saff & Arthur David Snider (2003)."Chapter 2.1".Fundamentals of Complex Analysis. Prentice Hall.ISBN978-01-390-7874-3.Archived from the original on 2023-03-23. Retrieved2015-11-15.
^Dawikins, Paul."Series and Sequences".Paul's Online Math Notes/Calc II (notes).Archived from the original on 30 November 2012. Retrieved18 December 2012.