In mathematics , a sequence is an enumerated collection of objects in which repetitions are allowed and order matters. 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, 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 (the positions of elements in the sequence) to the elements at each position. The notion of a sequence can be generalized to an indexed family , defined as a function from an arbitrary index set.
119-418: 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 all even positive integers (2, 4, 6, ...). The position of an element in
238-460: A {\displaystyle a} or p {\displaystyle p} divides b {\displaystyle b} (or both). Conversely, if a number p {\displaystyle p} has the property that when it divides a product it always divides at least one factor of the product, then p {\displaystyle p} must be prime. There are infinitely many prime numbers. Another way of saying this
357-438: A n ) n = − ∞ ∞ {\textstyle {(a_{n})}_{n=-\infty }^{\infty }} is a bi-infinite sequence , and can also be written as ( … , a − 1 , a 0 , a 1 , a 2 , … ) {\textstyle (\ldots ,a_{-1},a_{0},a_{1},a_{2},\ldots )} . In cases where
476-464: A n ) . {\textstyle (a_{n}).} Here A 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 of nets . A net is a function from a (possibly uncountable ) directed set to a topological space. The notational conventions for sequences normally apply to nets as well. The length of
595-538: A bijection between a finite set S and a proper subset of S . Any set with this property is called Dedekind-finite . Using the standard ZFC axioms for set theory , every Dedekind-finite set is also finite, but this implication cannot be proved in ZF (Zermelo–Fraenkel axioms without the axiom of choice ) alone. The axiom of countable choice , a weak version of the axiom of choice, is sufficient to prove this equivalence. Any injective function between two finite sets of
714-454: A prime ) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number . For example, 5 is prime because the only ways of writing it as a product, 1 × 5 or 5 × 1 , involve 5 itself. However, 4 is composite because it is a product (2 × 2) in which both numbers are smaller than 4. Primes are central in number theory because of
833-663: A distance from L {\displaystyle L} less than d {\displaystyle d} . For example, the sequence a n = n + 1 2 n 2 {\textstyle a_{n}={\frac {n+1}{2n^{2}}}} shown to the right converges to the value 0. On the other hand, the sequences b n = n 3 {\textstyle b_{n}=n^{3}} (which begins 1, 8, 27, ...) and c n = ( − 1 ) n {\displaystyle c_{n}=(-1)^{n}} (which begins −1, 1, −1, 1, ...) are both divergent. If
952-478: A finite set is finite. The set of values of a function when applied to elements of a finite set is finite. All finite sets are countable , but not all countable sets are finite. (Some authors, however, use "countable" to mean "countably infinite", so do not consider finite sets to be countable.) The free semilattice over a finite set is the set of its non-empty subsets, with the join operation being given by set union. In Zermelo–Fraenkel set theory without
1071-599: A function of n . Nevertheless, holonomic sequences play an important role in various areas of mathematics. For example, many special functions have a Taylor 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 of prime 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
1190-534: A larger finite set to a smaller finite set. Formally, a set S {\displaystyle S} is called finite if there exists a bijection for some natural number n {\displaystyle n} (natural numbers are defined as sets in Zermelo-Fraenkel set theory ). The number n {\displaystyle n} is the set's cardinality, denoted as | S | {\displaystyle |S|} . If
1309-416: A limit if the elements of the sequence become closer and closer to some value L {\displaystyle L} (called the limit of the sequence), and they become and remain arbitrarily close to L {\displaystyle L} , meaning that given a real number d {\displaystyle d} greater than zero, all but a finite number of the elements of the sequence have
SECTION 10
#17327810803701428-482: A natural number N {\displaystyle N} such that for all n ≥ N {\displaystyle n\geq N} we have If ( a n ) {\displaystyle (a_{n})} 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 | ⋅ | {\displaystyle |\cdot |} denotes
1547-451: A natural number n {\displaystyle n} are the natural numbers that divide n {\displaystyle n} evenly. Every natural number has both 1 and itself as a divisor. If it has any other divisor, it cannot be prime. This leads to an equivalent definition of prime numbers: they are the numbers with exactly two positive divisors . Those two are 1 and the number itself. As 1 has only one divisor, itself, it
1666-493: A number, so they could not consider its primality. A few scholars in the Greek and later Roman tradition, including Nicomachus , Iamblichus , Boethius , and Cassiodorus , also considered the prime numbers to be a subdivision of the odd numbers, so they did not consider 2 to be prime either. However, Euclid and a majority of the other Greek mathematicians considered 2 as prime. The medieval Islamic mathematicians largely followed
1785-423: A prime factorization with one or more prime factors. N {\displaystyle N} is evenly divisible by each of these factors, but N {\displaystyle N} has a remainder of one when divided by any of the prime numbers in the given list, so none of the prime factors of N {\displaystyle N} can be in the given list. Because there is no finite list of all
1904-428: A prime occurs multiple times, exponentiation can be used to group together multiple copies of the same prime number: for example, in the second way of writing the product above, 5 2 {\displaystyle 5^{2}} denotes the square or second power of 5. {\displaystyle 5.} The central importance of prime numbers to number theory and mathematics in general stems from
2023-469: A prime. Christian Goldbach formulated Goldbach's conjecture , that every even number is the sum of two primes, in a 1742 letter to Euler. Euler proved Alhazen's conjecture (now the Euclid–Euler theorem ) that all even perfect numbers can be constructed from Mersenne primes. He introduced methods from mathematical analysis to this area in his proofs of the infinitude of the primes and the divergence of
2142-414: A recurrence relation is Recamán's sequence , defined by the recurrence relation with initial term a 0 = 0. {\displaystyle a_{0}=0.} A linear recurrence with constant coefficients is a recurrence relation of the form where c 0 , … , c k {\displaystyle c_{0},\dots ,c_{k}} are constants . There
2261-400: A sequence are discussed after the examples. The prime numbers are the natural numbers greater than 1 that have no divisors 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 in mathematics , particularly in number theory where many results related to them exist. The Fibonacci numbers comprise
2380-440: A sequence converges, then the value it converges to is unique. This value is called the limit of the sequence. The limit of a convergent sequence ( a n ) {\displaystyle (a_{n})} is normally denoted lim n → ∞ a n {\textstyle \lim _{n\to \infty }a_{n}} . If ( a n ) {\displaystyle (a_{n})}
2499-404: A sequence is defined as the number of terms in the sequence. A sequence of a finite length n is also called an n -tuple . Finite sequences include the empty sequence ( ) that has no elements. Normally, the term infinite sequence refers to a sequence that is infinite in one direction, and finite in the other—the sequence has a first element, but no final element. Such a sequence
SECTION 20
#17327810803702618-467: 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
2737-463: 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 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
2856-409: 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 of odd 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
2975-450: A sequence of sequences: ( ( a m , n ) n ∈ N ) m ∈ N {\textstyle ((a_{m,n})_{n\in \mathbb {N} })_{m\in \mathbb {N} }} denotes a sequence whose m th term is the sequence ( a m , n ) n ∈ N {\textstyle (a_{m,n})_{n\in \mathbb {N} }} . An alternative to writing
3094-448: A set S {\displaystyle S} meets a criterion in the list then it meets all of the following criteria. In the absence of the axiom of choice the reverse implications are all unprovable, but if the axiom of choice is assumed then all of these concepts are equivalent. (Note that none of these definitions need the set of finite ordinal numbers to be defined first; they are all pure "set-theoretic" definitions in terms of
3213-405: A set is finite, its elements may be written — in many ways — in a sequence : In combinatorics , a finite set with n {\displaystyle n} elements is sometimes called an n {\displaystyle n} -set and a subset with k {\displaystyle k} elements is called a k {\displaystyle k} -subset . For example,
3332-510: A sum of three primes. Chen's theorem says that every sufficiently large even number can be expressed as the sum of a prime and a semiprime (the product of two primes). Also, any even integer greater than 10 can be written as the sum of six primes. The branch of number theory studying such questions is called additive number theory . Another type of problem concerns prime gaps , the differences between consecutive primes. The existence of arbitrarily large prime gaps can be seen by noting that
3451-484: A theorem of Wright . These assert that there are real constants A > 1 {\displaystyle A>1} and μ {\displaystyle \mu } such that are prime for any natural number n {\displaystyle n} in the first formula, and any number of exponents in the second formula. Here ⌊ ⋅ ⌋ {\displaystyle \lfloor {}\cdot {}\rfloor } represents
3570-493: Is Goldbach's conjecture , which asserts that every even integer n {\displaystyle n} greater than 2 can be written as a sum of two primes. As of 2014 , this conjecture has been verified for all numbers up to n = 4 ⋅ 10 18 . {\displaystyle n=4\cdot 10^{18}.} Weaker statements than this have been proven; for example, Vinogradov's theorem says that every sufficiently large odd integer can be written as
3689-565: Is monotonically decreasing if each consecutive term is less than or equal to the previous one, and is strictly monotonically decreasing if each is strictly less than the previous. If a sequence is either increasing or decreasing it is called a monotone sequence. This is a special case of the more general notion of a monotonic function . The terms nondecreasing and nonincreasing are often used in place of increasing and decreasing in order to avoid any possible confusion with strictly increasing and strictly decreasing , respectively. If
Sequence - Misplaced Pages Continue
3808-474: Is a divergent sequence, then the expression lim n → ∞ a n {\textstyle \lim _{n\to \infty }a_{n}} is meaningless. A sequence of real numbers ( a n ) {\displaystyle (a_{n})} converges to a real number L {\displaystyle L} if, for all ε > 0 {\displaystyle \varepsilon >0} , there exists
3927-468: Is a general method for expressing the general term a n {\displaystyle a_{n}} of such a sequence as a function of n ; see Linear recurrence . In the case of the Fibonacci sequence, one has c 0 = 0 , c 1 = c 2 = 1 , {\displaystyle c_{0}=0,c_{1}=c_{2}=1,} and the resulting function of n
4046-564: Is a multiple of any integer between 2 and n {\displaystyle {\sqrt {n}}} . Faster algorithms include the Miller–Rabin primality test , which is fast but has a small chance of error, and the AKS primality test , which always produces the correct answer in polynomial time but is too slow to be practical. Particularly fast methods are available for numbers of special forms, such as Mersenne numbers . As of October 2024
4165-454: Is a prime between n {\displaystyle n} and 2 n {\displaystyle 2n} , proved in 1852 by Pafnuty Chebyshev . Ideas of Bernhard Riemann in his 1859 paper on the zeta-function sketched an outline for proving the conjecture of Legendre and Gauss. Although the closely related Riemann hypothesis remains unproven, Riemann's outline was completed in 1896 by Hadamard and de la Vallée Poussin , and
4284-411: Is a simple classical example, defined by the recurrence relation with initial terms a 0 = 0 {\displaystyle a_{0}=0} and a 1 = 1 {\displaystyle a_{1}=1} . 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
4403-401: Is a strictly increasing sequence of positive integers. Some other types of sequences that are easy to define include: An important property of a sequence is convergence . If a sequence converges, it converges to a particular value known as the limit . If a sequence converges to some limit, then it is convergent . A sequence that does not converge is divergent . Informally, a sequence has
4522-511: Is based on Wilson's theorem and generates the number 2 many times and all other primes exactly once. There is also a set of Diophantine equations in nine variables and one parameter with the following property: the parameter is prime if and only if the resulting system of equations has a solution over the natural numbers. This can be used to obtain a single formula with the property that all its positive values are prime. Other examples of prime-generating formulas come from Mills' theorem and
4641-464: Is bi-infinite. This sequence could be denoted ( 2 n ) n = − ∞ ∞ {\textstyle {(2n)}_{n=-\infty }^{\infty }} . A sequence is said to be monotonically increasing if each term is greater than or equal to the one before it. For example, the sequence ( a n ) n = 1 ∞ {\textstyle {(a_{n})}_{n=1}^{\infty }}
4760-409: Is called a lower bound . If a sequence is both bounded from above and bounded from below, then the sequence is said to be bounded . A subsequence 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
4879-424: Is called a prime number (or a prime ) if it is greater than 1 and cannot be written as the product of two smaller natural numbers. The numbers greater than 1 that are not prime are called composite numbers . In other words, n {\displaystyle n} is prime if n {\displaystyle n} items cannot be divided up into smaller equal-size groups of more than one item, or if it
Sequence - Misplaced Pages Continue
4998-465: Is called a singly infinite sequence or a one-sided infinite sequence when disambiguation is necessary. In contrast, a sequence that is infinite in both directions—i.e. that has neither a first nor a final element—is called a bi-infinite sequence , two-way infinite sequence , or doubly infinite sequence . A function from the set Z of all integers into a set, such as for instance the sequence of all even integers ( ..., −4, −2, 0, 2, 4, 6, 8, ... ),
5117-418: Is called an index , and the set of values that it can take is called the index 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 ( a n ) n ∈ N {\textstyle (a_{n})_{n\in \mathbb {N} }} , which denotes a sequence whose n th element
5236-429: Is called the cardinality (or the cardinal number ) of the set. A set that is not a finite set is called an infinite set . For example, the set of all positive integers is infinite: Finite sets are particularly important in combinatorics , the mathematical study of counting . Many arguments involving finite sets rely on the pigeonhole principle , which states that there cannot exist an injective function from
5355-402: Is denoted as and means that the ratio of π ( n ) {\displaystyle \pi (n)} to the right-hand fraction approaches 1 as n {\displaystyle n} grows to infinity. This implies that the likelihood that a randomly chosen number less than n {\displaystyle n} is prime is (approximately) inversely proportional to
5474-415: Is easily discernible by inspection. Other examples are sequences of functions , whose elements are functions instead of numbers. The On-Line Encyclopedia of Integer Sequences comprises a large list of examples of integer sequences. 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
5593-406: Is given by Binet's formula . A holonomic sequence is a sequence defined by a recurrence relation of the form where c 1 , … , c k {\displaystyle c_{1},\dots ,c_{k}} are polynomials in n . For most holonomic sequences, there is no explicit formula for expressing a n {\displaystyle a_{n}} as
5712-413: Is given by the offset logarithmic integral An arithmetic progression is a finite or infinite sequence of numbers such that consecutive numbers in the sequence all have the same difference. This difference is called the modulus of the progression. For example, is an infinite arithmetic progression with modulus 9. In an arithmetic progression, all the numbers have the same remainder when divided by
5831-503: Is given by the variable a n {\displaystyle a_{n}} . For example: One can consider multiple sequences at the same time by using different variables; e.g. ( b n ) n ∈ N {\textstyle (b_{n})_{n\in \mathbb {N} }} could be a different sequence than ( a n ) n ∈ N {\textstyle (a_{n})_{n\in \mathbb {N} }} . One can even consider
5950-431: 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, called recurrence 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. The Fibonacci sequence
6069-426: Is incomplete. The key idea is to multiply together the primes in any given list and add 1. {\displaystyle 1.} If the list consists of the primes p 1 , p 2 , … , p n , {\displaystyle p_{1},p_{2},\ldots ,p_{n},} this gives the number By the fundamental theorem, N {\displaystyle N} has
SECTION 50
#17327810803706188-417: Is known. Dirichlet's theorem on arithmetic progressions , in its basic form, asserts that linear polynomials with relatively prime integers a {\displaystyle a} and b {\displaystyle b} take infinitely many prime values. Stronger forms of the theorem state that the sum of the reciprocals of these prime values diverges, and that different linear polynomials with
6307-404: Is monotonically increasing if and only if a n + 1 ≥ a n {\textstyle a_{n+1}\geq a_{n}} for all n ∈ N . {\displaystyle n\in \mathbf {N} .} If each consecutive term is strictly greater than (>) the previous term then the sequence is called strictly monotonically increasing . A sequence
6426-464: Is not possible to arrange n {\displaystyle n} dots into a rectangular grid that is more than one dot wide and more than one dot high. For example, among the numbers 1 through 6, the numbers 2, 3, and 5 are the prime numbers, as there are no other numbers that divide them evenly (without a remainder). 1 is not prime, as it is specifically excluded in the definition. 4 = 2 × 2 and 6 = 2 × 3 are both composite. The divisors of
6545-412: Is not prime by this definition. Yet another way to express the same thing is that a number n {\displaystyle n} is prime if it is greater than one and if none of the numbers 2 , 3 , … , n − 1 {\displaystyle 2,3,\dots ,n-1} divides n {\displaystyle n} evenly. The first 25 prime numbers (all
6664-500: Is replaced by the expression dist ( a n , L ) {\displaystyle \operatorname {dist} (a_{n},L)} , which denotes the distance between a n {\displaystyle a_{n}} and L {\displaystyle L} . If ( a n ) {\displaystyle (a_{n})} and ( b n ) {\displaystyle (b_{n})} are convergent sequences, then
6783-399: Is sometimes denoted by P {\displaystyle \mathbf {P} } (a boldface capital P) or by P {\displaystyle \mathbb {P} } (a blackboard bold capital P). The Rhind Mathematical Papyrus , from around 1550 BC, has Egyptian fraction expansions of different forms for prime and composite numbers. However, the earliest surviving records of
6902-516: Is that the sequence of prime numbers never ends. This statement is referred to as Euclid's theorem in honor of the ancient Greek mathematician Euclid , since the first known proof for this statement is attributed to him. Many more proofs of the infinitude of primes are known, including an analytical proof by Euler , Goldbach's proof based on Fermat numbers , Furstenberg's proof using general topology , and Kummer's elegant proof. Euclid's proof shows that every finite list of primes
7021-398: Is the limiting probability that two random numbers selected uniformly from a large range are relatively prime (have no factors in common). The distribution of primes in the large, such as the question how many primes are smaller than a given, large threshold, is described by the prime number theorem , but no efficient formula for the n {\displaystyle n} -th prime
7140-568: Is to write down a general formula for computing the n th term as a function of n , enclose it in parentheses, and include a subscript indicating the set of values that n can take. For example, in this notation the sequence of even numbers could be written as ( 2 n ) n ∈ N {\textstyle (2n)_{n\in \mathbb {N} }} . The sequence of squares could be written as ( n 2 ) n ∈ N {\textstyle (n^{2})_{n\in \mathbb {N} }} . The variable n
7259-453: The Islamic mathematician Ibn al-Haytham (Alhazen) found Wilson's theorem , characterizing the prime numbers as the numbers n {\displaystyle n} that evenly divide ( n − 1 ) ! + 1 {\displaystyle (n-1)!+1} . He also conjectured that all even perfect numbers come from Euclid's construction using Mersenne primes, but
SECTION 60
#17327810803707378-600: The Lucas–Lehmer primality test (originated 1856), and the generalized Lucas primality test . Since 1951 all the largest known primes have been found using these tests on computers . The search for ever larger primes has generated interest outside mathematical circles, through the Great Internet Mersenne Prime Search and other distributed computing projects. The idea that prime numbers had few applications outside of pure mathematics
7497-520: The Meissel–Lehmer algorithm can compute exact values of π ( n ) {\displaystyle \pi (n)} faster than it would be possible to list each prime up to n {\displaystyle n} . The prime number theorem states that π ( n ) {\displaystyle \pi (n)} is asymptotic to n / log n {\displaystyle n/\log n} , which
7616-438: The codomain of the sequence is fixed by context, for example by requiring it to be the set R of real numbers, the set C of complex numbers, or a topological space . 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, a n rather than a ( n ) . There are terminological differences as well:
7735-427: 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
7854-559: The floor function , the largest integer less than or equal to the number in question. However, these are not useful for generating primes, as the primes must be generated first in order to compute the values of A {\displaystyle A} or μ . {\displaystyle \mu .} Many conjectures revolving about primes have been posed. Often having an elementary formulation, many of these conjectures have withstood proof for decades: all four of Landau's problems from 1912 are still unsolved. One of them
7973-479: The fundamental theorem of arithmetic . This theorem states that every integer larger than 1 can be written as a product of one or more primes. More strongly, this product is unique in the sense that any two prime factorizations of the same number will have the same numbers of copies of the same primes, although their ordering may differ. So, although there are many different ways of finding a factorization using an integer factorization algorithm, they all must produce
8092-431: The fundamental theorem of arithmetic : every natural number greater than 1 is either a prime itself or can be factorized as a product of primes that is unique up to their order. The property of being prime is called primality . A simple but slow method of checking the primality of a given number n {\displaystyle n} , called trial division , tests whether n {\displaystyle n}
8211-424: The largest known prime number is a Mersenne prime with 41,024,320 decimal digits . There are infinitely many primes, as demonstrated by Euclid around 300 BC. No known simple formula separates prime numbers from composite numbers. However, the distribution of primes within the natural numbers in the large can be statistically modelled. The first result in that direction is the prime number theorem , proven at
8330-411: The limit of a sequence of rational numbers (e.g. via its decimal expansion , also see completeness 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
8449-420: The natural numbers . In the second and third bullets, there is a well-defined sequence ( a k ) k = 1 ∞ {\textstyle {(a_{k})}_{k=1}^{\infty }} , 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 using recursion . This
8568-435: The sieve of Eratosthenes would not work correctly if it handled 1 as a prime, because it would eliminate all multiples of 1 (that is, all other numbers) and output only the single number 1. Some other more technical properties of prime numbers also do not hold for the number 1: for instance, the formulas for Euler's totient function or for the sum of divisors function are different for prime numbers than they are for 1. By
8687-525: The Cartesian product of finitely many finite sets is finite. A finite set with n {\displaystyle n} elements has 2 n {\displaystyle 2^{n}} distinct subsets. That is, the power set ℘ ( S ) {\displaystyle \wp (S)} of a finite set S is finite, with cardinality 2 | S | {\displaystyle 2^{|S|}} . Any subset of
8806-768: The Greeks in viewing 1 as not being a number. By the Middle Ages and Renaissance, mathematicians began treating 1 as a number, and by the 17th century some of them included it as the first prime number. In the mid-18th century, Christian Goldbach listed 1 as prime in his correspondence with Leonhard Euler ; however, Euler himself did not consider 1 to be prime. Many 19th century mathematicians still considered 1 to be prime, and Derrick Norman Lehmer included 1 in his list of primes less than ten million published in 1914. Lists of primes that included 1 continued to be published as recently as 1956. However, around this time, by
8925-439: The axiom of choice (ZF), the following conditions are all equivalent: If the axiom of choice is also assumed (the axiom of countable choice is sufficient), then the following conditions are all equivalent: In ZF set theory without the axiom of choice , the following concepts of finiteness for a set S {\displaystyle S} are distinct. They are arranged in strictly decreasing order of strength, i.e. if
9044-520: The biggest prime rather than growing past every x {\displaystyle x} . The growth rate of this sum is described more precisely by Mertens' second theorem . For comparison, the sum does not grow to infinity as n {\displaystyle n} goes to infinity (see the Basel problem ). In this sense, prime numbers occur more often than squares of natural numbers, although both sets are infinite. Brun's theorem states that
9163-441: The complex modulus, i.e. | z | = z ∗ z {\displaystyle |z|={\sqrt {z^{*}z}}} . If ( a n ) {\displaystyle (a_{n})} is a sequence of points in a metric space , then the formula can be used to define convergence, if the expression | a n − L | {\displaystyle |a_{n}-L|}
9282-432: The definitions and notations introduced below. In this article, a sequence is formally defined as a function whose domain is an interval of integers . 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
9401-471: The development of various branches of number theory, focusing on analytic or algebraic aspects of numbers. Primes are used in several routines in information technology , such as public-key cryptography , which relies on the difficulty of factoring large numbers into their prime factors. In abstract algebra , objects that behave in a generalized way like prime numbers include prime elements and prime ideals . A natural number (1, 2, 3, 4, 5, 6, etc.)
9520-428: The differences among more than two prime numbers. Their infinitude and density are the subject of the first Hardy–Littlewood conjecture , which can be motivated by the heuristic that the prime numbers behave similarly to a random sequence of numbers with density given by the prime number theorem. Analytic number theory studies number theory through the lens of continuous functions , limits , infinite series , and
9639-697: 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 ( k 2 ) ) k = 1 10 {\textstyle (k^{2}){\vphantom {)}}_{k=1}^{10}} denotes the ten-term sequence of squares ( 1 , 4 , 9 , … , 100 ) {\displaystyle (1,4,9,\ldots ,100)} . The limits ∞ {\displaystyle \infty } and − ∞ {\displaystyle -\infty } are allowed, but they do not represent valid values for
9758-433: The domain of a sequence to be the set of natural 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,
9877-461: The early 20th century, mathematicians began to agree that 1 should not be listed as prime, but rather in its own special category as a " unit ". Writing a number as a product of prime numbers is called a prime factorization of the number. For example: The terms in the product are called prime factors . The same prime factor may occur more than once; this example has two copies of the prime factor 5. {\displaystyle 5.} When
9996-450: The early 20th century, mathematicians started to agree that 1 should not be classified as a prime number. If 1 were to be considered a prime, many statements involving primes would need to be awkwardly reworded. For example, the fundamental theorem of arithmetic would need to be rephrased in terms of factorizations into primes greater than 1, because every number would have multiple factorizations with any number of copies of 1. Similarly,
10115-509: The end of the 19th century, which says that the probability of a randomly chosen large number being prime is inversely proportional to its number of digits, that is, to its logarithm . Several historical questions regarding prime numbers are still unsolved. These include Goldbach's conjecture , that every even integer greater than 2 can be expressed as the sum of two primes, and the twin prime conjecture, that there are infinitely many pairs of primes that differ by two. Such questions spurred
10234-578: The equality and membership relations, not involving ω.) The forward implications (from strong to weak) are theorems within ZF. Counter-examples to the reverse implications (from weak to strong) in ZF with urelements are found using model theory . Most of these finiteness definitions and their names are attributed to Tarski 1954 by Howard & Rubin 1998 , p. 278. However, definitions I, II, III, IV and V were presented in Tarski 1924 , pp. 49, 93, together with proofs (or references to proofs) for
10353-674: The first prime gap of length 8 is between the primes 89 and 97, much smaller than 8 ! = 40320. {\displaystyle 8!=40320.} It is conjectured that there are infinitely many twin primes , pairs of primes with difference 2; this is the twin prime conjecture . Polignac's conjecture states more generally that for every positive integer k , {\displaystyle k,} there are infinitely many pairs of consecutive primes that differ by 2 k . {\displaystyle 2k.} Andrica's conjecture , Brocard's conjecture , Legendre's conjecture , and Oppermann's conjecture all suggest that
10472-419: The following limits exist, and can be computed as follows: Finite set In mathematics , particularly set theory , a finite set is a set that has a finite number of elements . Informally, a finite set is a set which one could in principle count and finish counting. For example, is a finite set with five elements. The number of elements of a finite set is a natural number (possibly zero) and
10591-418: The forward implications. At that time, model theory was not sufficiently advanced to find the counter-examples. Each of the properties I-finite thru IV-finite is a notion of smallness in the sense that any subset of a set with such a property will also have the property. This is not true for V-finite thru VII-finite because they may have countably infinite subsets. Prime number A prime number (or
10710-474: The index, only the supremum or infimum of such values, respectively. For example, the sequence ( a n ) n = 1 ∞ {\textstyle {(a_{n})}_{n=1}^{\infty }} is the same as the sequence ( a n ) n ∈ N {\textstyle (a_{n})_{n\in \mathbb {N} }} , and does not contain an additional term "at infinity". The sequence (
10829-433: The integer sequence whose elements are 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, ...). Other examples of sequences include those made up of rational numbers , real numbers and complex numbers . The sequence (.9, .99, .999, .9999, ...), for instance, approaches the number 1. In fact, every real number can be written as
10948-655: The largest gaps between primes from 1 {\displaystyle 1} to n {\displaystyle n} should be at most approximately n , {\displaystyle {\sqrt {n}},} a result that is known to follow from the Riemann hypothesis, while the much stronger Cramér conjecture sets the largest gap size at O ( ( log n ) 2 ) . {\displaystyle O((\log n)^{2}).} Prime gaps can be generalized to prime k {\displaystyle k} -tuples , patterns in
11067-533: The modulus; in this example, the remainder is 3. Because both the modulus 9 and the remainder 3 are multiples of 3, so is every element in the sequence. Therefore, this progression contains only one prime number, 3 itself. In general, the infinite progression can have more than one prime only when its remainder a {\displaystyle a} and modulus q {\displaystyle q} are relatively prime. If they are relatively prime, Dirichlet's theorem on arithmetic progressions asserts that
11186-495: The number of digits in n {\displaystyle n} . It also implies that the n {\displaystyle n} th prime number is proportional to n log n {\displaystyle n\log n} and therefore that the average size of a prime gap is proportional to log n {\displaystyle \log n} . A more accurate estimate for π ( n ) {\displaystyle \pi (n)}
11305-498: The number of primes up to x {\displaystyle x} is asymptotic to x / log x {\displaystyle x/\log x} , where log x {\displaystyle \log x} is the natural logarithm of x {\displaystyle x} . A weaker consequence of this high density of primes was Bertrand's postulate , that for every n > 1 {\displaystyle n>1} there
11424-628: 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 ( a n ) n ∈ N {\displaystyle (a_{n})_{n\in \mathbb {N} }} is any sequence of the form ( a n k ) k ∈ N {\textstyle (a_{n_{k}})_{k\in \mathbb {N} }} , where ( n k ) k ∈ N {\displaystyle (n_{k})_{k\in \mathbb {N} }}
11543-674: The prime numbers less than 100) are: No even number n {\displaystyle n} greater than 2 is prime because any such number can be expressed as the product 2 × n / 2 {\displaystyle 2\times n/2} . Therefore, every prime number other than 2 is an odd number , and is called an odd prime . Similarly, when written in the usual decimal system, all prime numbers larger than 5 end in 1, 3, 7, or 9. The numbers that end with other digits are all composite: decimal numbers that end in 0, 2, 4, 6, or 8 are even, and decimal numbers that end in 0 or 5 are divisible by 5. The set of all primes
11662-493: The primes, there must be infinitely many primes. The numbers formed by adding one to the products of the smallest primes are called Euclid numbers . The first five of them are prime, but the sixth, is a composite number. There is no known efficient formula for primes. For example, there is no non-constant polynomial , even in several variables, that takes only prime values. However, there are numerous expressions that do encode all primes, or only primes. One possible formula
11781-446: The progression contains infinitely many primes. The Green–Tao theorem shows that there are arbitrarily long finite arithmetic progressions consisting only of primes. Euler noted that the function yields prime numbers for 1 ≤ n ≤ 40 {\displaystyle 1\leq n\leq 40} , although composite numbers appear among its later values. The search for an explanation for this phenomenon led to
11900-467: The related mathematics of the infinite and infinitesimal . This area of study began with Leonhard Euler and his first major result, the solution to the Basel problem . The problem asked for the value of the infinite sum 1 + 1 4 + 1 9 + 1 16 + … , {\displaystyle 1+{\tfrac {1}{4}}+{\tfrac {1}{9}}+{\tfrac {1}{16}}+\dots ,} which today can be recognized as
12019-485: The result is now known as the prime number theorem . Another important 19th century result was Dirichlet's theorem on arithmetic progressions , that certain arithmetic progressions contain infinitely many primes. Many mathematicians have worked on primality tests for numbers larger than those where trial division is practicably applicable. Methods that are restricted to specific number forms include Pépin's test for Fermat numbers (1877), Proth's theorem (c. 1878),
12138-415: The same b {\displaystyle b} have approximately the same proportions of primes. Although conjectures have been formulated about the proportions of primes in higher-degree polynomials, they remain unproven, and it is unknown whether there exists a quadratic polynomial that (for integer arguments) is prime infinitely often. Euler's proof that there are infinitely many primes considers
12257-414: The same cardinality is also a surjective function (a surjection). Similarly, any surjection between two finite sets of the same cardinality is also an injection. The union of two finite sets is finite, with In fact, by the inclusion–exclusion principle : More generally, the union of any finite number of finite sets is finite. The Cartesian product of finite sets is also finite, with: Similarly,
12376-546: The same result. Primes can thus be considered the "basic building blocks" of the natural numbers. Some proofs of the uniqueness of prime factorizations are based on Euclid's lemma : If p {\displaystyle p} is a prime number and p {\displaystyle p} divides a product a b {\displaystyle ab} of integers a {\displaystyle a} and b , {\displaystyle b,} then p {\displaystyle p} divides
12495-419: The sequence n ! + 2 , n ! + 3 , … , n ! + n {\displaystyle n!+2,n!+3,\dots ,n!+n} consists of n − 1 {\displaystyle n-1} composite numbers, for any natural number n . {\displaystyle n.} However, large prime gaps occur much earlier than this argument shows. For example,
12614-426: The sequence of real numbers ( a n ) is such that all the terms are less than some real number M , then the sequence is said to be bounded from above . In other words, this means that there exists M such that for all n , a n ≤ M . Any such M is called an upper bound . Likewise, if, for some real m , a n ≥ m for all n greater than some N , then the sequence is bounded from below and any such m
12733-418: The set { 5 , 6 , 7 } {\displaystyle \{5,6,7\}} is a 3-set – a finite set with three elements – and { 6 , 7 } {\displaystyle \{6,7\}} is a 2-subset of it. Any proper subset of a finite set S {\displaystyle S} is finite and has fewer elements than S itself. As a consequence, there cannot exist
12852-460: The set of indexing numbers is understood, the subscripts and superscripts are often left off. That is, one simply writes ( a k ) {\textstyle (a_{k})} for an arbitrary sequence. Often, the index k 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
12971-676: The square root. In 1640 Pierre de Fermat stated (without proof) Fermat's little theorem (later proved by Leibniz and Euler ). Fermat also investigated the primality of the Fermat numbers 2 2 n + 1 {\displaystyle 2^{2^{n}}+1} , and Marin Mersenne studied the Mersenne primes , prime numbers of the form 2 p − 1 {\displaystyle 2^{p}-1} with p {\displaystyle p} itself
13090-488: The study of prime numbers come from the ancient Greek mathematicians , who called them prōtos arithmòs ( πρῶτος ἀριθμὸς ). Euclid 's Elements (c. 300 BC) proves the infinitude of primes and the fundamental theorem of arithmetic , and shows how to construct a perfect number from a Mersenne prime . Another Greek invention, the Sieve of Eratosthenes , is still used to construct lists of primes. Around 1000 AD,
13209-482: The subscript n refers to the n th element of the sequence; for example, the n th 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
13328-590: The sum of the reciprocals of twin primes , is finite. Because of Brun's theorem, it is not possible to use Euler's method to solve the twin prime conjecture , that there exist infinitely many twin primes. The prime-counting function π ( n ) {\displaystyle \pi (n)} is defined as the number of primes not greater than n {\displaystyle n} . For example, π ( 11 ) = 5 {\displaystyle \pi (11)=5} , since there are five primes less than or equal to 11. Methods such as
13447-458: The sum of the reciprocals of the primes 1 2 + 1 3 + 1 5 + 1 7 + 1 11 + ⋯ {\displaystyle {\tfrac {1}{2}}+{\tfrac {1}{3}}+{\tfrac {1}{5}}+{\tfrac {1}{7}}+{\tfrac {1}{11}}+\cdots } . At the start of the 19th century, Legendre and Gauss conjectured that as x {\displaystyle x} tends to infinity,
13566-419: The sums of reciprocals of primes, Euler showed that, for any arbitrary real number x {\displaystyle x} , there exists a prime p {\displaystyle p} for which this sum is bigger than x {\displaystyle x} . This shows that there are infinitely many primes, because if there were finitely many primes the sum would reach its maximum value at
13685-492: 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. 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
13804-598: The value ζ ( 2 ) {\displaystyle \zeta (2)} of the Riemann zeta function . This function is closely connected to the prime numbers and to one of the most significant unsolved problems in mathematics, the Riemann hypothesis . Euler showed that ζ ( 2 ) = π 2 / 6 {\displaystyle \zeta (2)=\pi ^{2}/6} . The reciprocal of this number, 6 / π 2 {\displaystyle 6/\pi ^{2}} ,
13923-546: 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 ( a n ) n ∈ A {\textstyle (a_{n})_{n\in A}} , or just as (
14042-742: Was shattered in the 1970s when public-key cryptography and the RSA cryptosystem were invented, using prime numbers as their basis. The increased practical importance of computerized primality testing and factorization led to the development of improved methods capable of handling large numbers of unrestricted form. The mathematical theory of prime numbers also moved forward with the Green–Tao theorem (2004) that there are arbitrarily long arithmetic progressions of prime numbers, and Yitang Zhang 's 2013 proof that there exist infinitely many prime gaps of bounded size. Most early Greeks did not even consider 1 to be
14161-422: Was unable to prove it. Another Islamic mathematician, Ibn al-Banna' al-Marrakushi , observed that the sieve of Eratosthenes can be sped up by considering only the prime divisors up to the square root of the upper limit. Fibonacci took the innovations from Islamic mathematics to Europe. His book Liber Abaci (1202) was the first to describe trial division for testing primality, again using divisors only up to
#369630