Within the history of mathematics, the history of number theory is dedicated to the origins and subsequent developments of number theory (called, in some historical and current contexts, (higher) arithmetic, though always distinct from arithmetic in the sense of "elementary calculations").
The first historical find of an arithmetical nature is a fragment of a table: the broken clay tablet Plimpton 322 (Larsa, Mesopotamia, ca. 1800 BCE) contains a list of "Pythagorean triples", i.e., integers such that . The triples are too many and too large to have been obtained by brute force. The heading over the first column reads: "The takiltum of the diagonal which has been substracted such that the width..."[1]
The table's outlay suggests[2] that it was constructed by means of what amounts, in modern language, to the identity
which is implicit in routine Old Babylonian exercises[3]. If some other method was used,[4] the triples were first constructed and then reordered by , presumably for actual use as a "table", i.e., with a view to applications.
We do not know what these applications may have been, or whether there could have been any; Babylonian astronomy, for example, truly flowered only later. It has been suggested instead that the table was a source of numerical examples for school problems.[5][6]
While Babylonian number theory - or what survives of Babylonian mathematics that can be called thus - consists of this single, striking fragment, Babylonian algebra (in the secondary-school sense of "algebra") was exceptionally well developed.[7] Late Neoplatonic sources[8] state that Pythagoras learned mathematics from the Babylonians. (Much earlier sources[9] state that Thales and Pythagoras travelled and studied in Egypt.)
Euclid IX 21--34 is very probably Pythagorean;[10] it is very simple material ("odd times even is odd", "if an odd number measures [= divides] an even number, then it also measures [= divides] half of it"), but it is all that is needed to prove that is irrational[11]. (Pythagoraean mystics gave great importance to the odd and the even[12].) The discovery that is irrational is credited to the early Pythagoreans (pre-Theodorus).[13] By revealing (in modern terms) that numbers could be irrational, this discovery seems to have provoked the first foundational crisis in mathematical history; its proof or its divulgation are sometimes credited to Hippasus, who was expelled or split from the Pythagorean sect.[14] It is only here that we can start to speak of a clear, conscious division between numbers (integers and the rationals - the subjects of arithmetic) and lengths (real numbers, whether rational or not).
The Pythagorean tradition spoke also of so-called polygonal or figured numbers.[15] While square numbers, cubic numbers, etc., are seen now as more natural than triangular numbers, square numbers, pentagonal numbers, etc., the study of the sums of triangular and pentagonal numbers would prove fruitful in the early modern period (17th to early 19th century).
We know of no clearly arithmetical material in ancient Egyptian or Vedic sources, though there is some algebra in both. The Chinese remainder theorem appears as an exercise [16] in Sun Zi's Suan Ching (also known as Sun Tzu's Mathematical Classic; 3rd, 4th or 5th century CE.[17]). (There is one important step glossed over in Sun Zi's solution:[18] it is the problem that was later solved by Āryabhaṭa's kuṭṭaka - see below.)
There is also some numerical mysticism in Chinese mathematics,[19] but, unlike that of the Pythagoreans, it seems to have led nowhere. Like the Pythagoreans' perfect numbers, magic squares have passed from superstition into recreation.
Aside from a few fragments, the mathematics of Classical Greece is known to us either through the reports of contemporary non-mathematicians or through mathematical works from the early Hellenistic period.[20] In the case of number theory, this means, by and large, Plato and Euclid, respectively.
Plato had a keen interest in mathematics, and distinguished clearly between arithmetic and calculation. (By arithmetic he meant, in part, theorising on number, rather than what arithmetic or number theory have come to mean.) It is through one of Plato's dialogues -- namely, Theaetetus -- that we know that Theodorus had proven that are irrational. Theaetetus was, like Plato, a disciple of Theodorus's; he worked on distinguishing different kind of inconmensurables, and was thus arguably a pioneer in the study of number systems. (Book X of Euclid's Elements is described by Pappus as being largely based on Theaetetus's work.)
Euclid devoted part of his Elements to prime numbers and divisibility, topics that belong unambiguously to number theory and are basic thereto (Books VII to IX of Euclid's Elements). In particular, he gave an algorithm for computing the greatest common divisor of two numbers (the Euclidean algorithm; Elements, Prop. VII.2) and the first known proof of the infinitude of primes (Elements, Prop. IX.20).
In 1773, Lessing published an epigram he had found in a manuscript during his work as a librarian; it claimed to be a letter sent by Archimedes to Eratosthenes.[21] The epigram proposed what has become known as Archimedes' cattle problem; its solution (absent from the manuscript) requires solving an indeterminate quadratic equation (which reduces to what would later be misnamed Pell's equation). As far as we know, such equations were first successfully treated by the Indian school. It is not known whether Archimedes himself had a method of solution.
Very little is known about Diophantus of Alexandria; he probably lived in the third century CE, that is, about five hundred years after Euclid. Six out of the thirteen books of Diophantus's Arithmetica survive in the original Greek; four more books survive in an Arabic translation. The Arithmetica is a collection of worked-out problems where the task is invariably to find rational solutions to a system of polynomial equations, usually of the form or . Thus, nowadays, we speak of Diophantine equations when we speak of polynomial equations to which rational or integer solutions must be found.
One may say that Diophantus was studying rational points -- i.e., points whose coordinates are rational -- on curves and varieties; however, unlike the Greeks of the Classical period, who did what we would now call basic algebra in geometrical terms, Diophantus did what we would now call basic algebraic geometry in purely algebraic terms. In modern language, what Diophantus does is to find rational parametrisations of many varieties; in other words, he shows how to obtain infinitely many rational numbers satisfying a system of equations by giving a procedure that can be made into an algebraic expression (say, , , , where , and are polynomials or quotients of polynomials; this would be what is sought for if such satisfied a given equation (say) for all values of r and s).
Diophantus also studies the equations of some non-rational curves, for which no rational parametrisation is possible. He manages to find some rational points on these curves -- elliptic curves, as it happens, in what seems to be their first known occurrence -- by means of what amounts to a tangent construction: translated into coordinate geometry (which did not exist in Diophantus's time), his method would be visualised as drawing a tangent to a curve at a known rational point, and then finding the other point of intersection of the tangent with the curve; that other point is a new rational point. (Diophantus also resorts to what could be called a special case of a secant construction.)
While Diophantus is concerned largely with rational solutions, he assumes some results on integer numbers; in particular, he seems to assume that every integer is the sum of four squares, though he never states as much explicitly.
While Greek astronomy - thanks to Alexander's conquests - probably influenced Indian learning, to the point of introducing trigonometry,[22] it seems to be the case that Indian mathematics is otherwise an indigenous tradition;[23] in particular, there is no evidence that Euclid's Elements reached India before the 18th century.[24]
Āryabhaṭa (476–550 CE) showed that pairs of simultaneous congruences , could be solved by a method he called kuṭṭaka, or pulveriser;[25] this is a procedure close to (a generalisation of) the Euclidean algorithm, which was probably discovered independently in India.[26] Āryabhaṭa seems to have had in mind applications to astronomical calculations.[27]
Brahmagupta (628 CE) started the systematic study of indefinite quadratic equations -- in particular, the misnamed Pell equation, in which Archimedes may have first been interested, and which did not start to be solved in the West until the time of Fermat and Euler. Later Sanskrit authors would follow, using Brahmagupta's technical terminology. A general procedure (the chakravala, or "cyclic method") for solving Pell's equation was finally found by Jayadeva (cited in the eleventh century; his work is otherwise lost); the earliest surviving exposition appears in Bhāskara II's Bīja-gaṇita (twelfth century).[28]
Unfortunately, Indian mathematics remained largely unknown in the West until the late eighteenth century;[29] Brahmagupta and Bhāskara's work was translated (into English, by Colebrooke) in 1817.
In the early ninth century, the caliph Al-Ma'mun ordered translations of many Greek mathematical works and at least one Sanskrit work (the Sindhind, which may[30] or may not[31] be Brahmagupta's Brāhmasphuţasiddhānta), thus giving rise to the rich tradition of Islamic mathematics. Diophantus's main work, the Arithmetica, was translated into Arabic by Qusta ibn Luqa (820-912). Part of the treatise al-Fakhri (by al-Karajī, 953 - ca. 1029) builds on it to some extent. Al-Karajī's contemporary Ibn al-Haytham knew[32] what would later be called Wilson's theorem, which, arguably, was thus the first clearly non-trivial result on congruences to prime moduli ever known.
Other than a treatise on squares in arithmetic progression by Fibonacci - who lived and studied in north Africa and Constantinople during his formative years, ca. 1175-1200 - no number theory to speak of was done in western Europe while it went through the Middle Ages. Matters started to change in Europe in the late Rennaissance, thanks to a renewed study of the works of Greek antiquity. A key catalyst was the textual emendation and translation into Latin of Diophantus's Arithmetica (Bachet, 1621, following a first attempt by Xylander, 1575).
Pierre de Fermat (1601 - 1665) never published his writings; in particular, his work on number theory is contained entirely in letters to mathematicians and in private marginal notes[33]. He wrote down nearly no proofs in number theory; he had no models in the area.[34] He did make repeated use of mathematical induction, introducing the method of infinite descent.
One of Fermat's first interests was perfect numbers (which appear in Euclid, Elements IX) and amicable numbers[35]; this led him to work on integer divisors, which were from the beginning among the subjects of the correspondence (1636-onwards) that put him in touch with the mathematical community of the day.[36] He had already studied Bachet's edition of Diophantus carefully;[37] by 1643, his interests had shifted largely to diophantine problems and sums of squares[38] (also treated by Diophantus).
Fermat's achievements in arithmetic include:
Fermat's claim ("Fermat's last theorem") to have shown there are no solutions to for all (a fact completely beyond his methods) appears only on his annotations on the margin of his copy of Diophantus; he never claimed this to others[50] and thus had no need to retract it if he found a mistake in his alleged proof.
The interest of Leonhard Euler (1707-1783) in number theory was first spurred in 1729, when a friend of his, the amateur[51] Goldbach, pointed him towards some of Fermat's work on the subject.[52] This has been called the "rebirth" of modern number theory,[53] after Fermat's relative lack of success in getting his contemporaries' attention for the subject.[54] Euler's work on number theory includes the following:[55]
Lagrange (1736-1813) was the first to give full proofs of some of Fermat's and Euler's work and observations - for instance, the four-square theorem and the basic theory of the misnamed "Pell's equation" (for which an algorithmic solution was found by Fermat and his contemporaries, and also by Jayadeva and Bhaskara II before them). He also studied quadratic forms in full generality (as opposed to ) -- defining their equivalence relation, showing how to put them in reduced form, etc.
Legendre (1752-1833) was the first to state the law of quadratic reciprocity. He also conjectured what amounts to the prime number theorem and Dirichlet's theorem on arithmetic progressions. He gave a full treatment of the equation [64] and worked on quadratic forms along the lines later developed fully by Gauss.[65] In his old age, he was the first to prove "Fermat's last theorem" for (completing work by Dirichlet, and crediting both him and Sophie Germain).[66]
In Disquisitiones Arithmeticae (1798), Gauss (1777-1855) proved the law of quadratic reciprocity and developed the theory of quadratic forms (in particular, defining their composition). He also introduced some basic notation (congruences) and devoted a section to computational matters, including primality tests[67]. The last section of the Disquisitiones established a link between roots of unity and number theory:
The theory of the division of the circle…which is treated in sec. 7 does not belong by itself to arithmetic, but its principles can only be drawn from higher arithmetic.[68]
In this way, Gauss arguably made a first foray towards both Galois's work and algebraic number theory.
The main features of modern number theory began to become clear in the mid-nineteenth century; in particular, its rough subdivision into its current subfields - especially analytic and algebraic number theory - dates from that period.
Algebraic number theory may be said to start with the study of reciprocity and cyclotomy, but truly came into its own with the development of abstract algebra and early ideal theory and valuation theory. An obvious conventional starting point for analytic number theory would be Riemann's memoir on the Riemann zeta function (1859); Jacobi's work on the four square theorem would be an almost equally good choice, in that it connected arithmetical questions with elliptic functions. (Both of these works are indirectly related to the connection between number theory and modular functions, which has been one of the richest fields of research in number theory from the early twentieth century to our days.)
The history of each subfield is sketched in its own section in the main article on Number theory.
[...] the question “how was the tablet calculated?” does not have to have the same answer as the question “what problems does the tablet set?” The first can be answered most satisfactorily by reciprocal pairs, as first suggested half a century ago, and the second by some sort of right-triangle problems.
(Robson, op. cit., 202). Robson takes issue with the notion that the scribe who produced Plimpton 322 (who had to "work for a living", and would not have belonged to a "leisured middle class") could have been motivated by his own "idle curiosity" in the absence of a "market for new mathematics" (Robson, op. cit., 199-200).
[26] Now there are an unknown number of things. If we count by threes, there is a remainder 2; if we count by fives, there is a remainder 3; if we count by sevens, there is a remainder 2. Find the number of things.
Answer: 23.
Method: If we count by threes and there is a remainder 2, put down 140. If we count by fives and there is a remainder 3, put down 63. If we count by sevens and there is a remainder 2, put down 30. Add them to obtain 233 and subtract 210 to get the answer. If we count by threes and there is a remainder 1, put down 70. If we count by fives and there is a remainder 1, put down 21. If we count by sevens and there is a remainder 1, put down 15. When [a number] exceeds 106, the result is obtained by subtracting 105.
[36] Now there is a pregnant woman whose age is 29. If the gestation period is 9 months, determine the sex of the unborn child.
Answer: Male.
Method: Put down 49, add the gestation period and subtract the age. From the remainder take away 1 representing the heaven, 2 the earth, 3 the man, 4 the four seasons, 5 the five phases, 6 the six pitch-pipes, 7 the seven stars [of the Dipper], 8 the eight winds, and 9 the nine divisions [of China under Yu the Great]. If the remainder is odd, [the sex] is male and if the remainder is even, [the sex] is female.
This is the last problem in Sun Zi's otherwise matter-of-fact treatise.