# Early history of prime numbers

Prime numbers are those whole numbers greater than 1 which cannot be written as a product of numbers greater than 1. I'm curious about their very early history, say 200 BC and earlier. What I know:

• Apparently Thymaridas (Θυμαρίδας) of Paros knew of prime numbers, around 350 BC
• About 50 years later, Euclid (Εὐκλείδης) of Alexandria proved that there were infinitely many primes
• Eratosthenes (Ἐρατοσθένης) of Cyrene discovered a fast method for finding primes about 100 years after Euclid

But this is only a skeleton, and looks only to the Greeks. What other cultures knew of these numbers? (Many people seem to think -- without good evidence -- that the Ishango bone means that primes were understood in the Paleolithic.) What did Thymaridas know? What is the first mention of prime numbers in a historical source?

Of course I would be happy for a pointer to sources covering this information.

• Created the tag, hope you like it:) Jul 18, 2012 at 17:07
• Hmmm. Since everything here should (by definition) be history, should it just be something like "math"? I do highly approve of you making a new tag though.
– T.E.D.
Jul 18, 2012 at 22:00
• @T.E.D.: I've always heard the field called "history of mathematics" or HOM. I have no strong opinion of what the tag should be called. Jul 18, 2012 at 22:05
• E.g. homsigmaa.org Jul 18, 2012 at 22:10
• The Sumerians has clay tablets showing multiplication tables and division, that might be a good place to start looking for written historical evidence. Aug 7, 2017 at 2:38

This paper (in .pdf) argues against ancient Chinese mathematics being aware of prime numbers.

The Rhind Mathematical Papyrus, dating to the 15-16th century BCE, indicates an Egyptian knowledge of primes evidenced in their fractional system, but it's not definitive proof.

It looks like the Greeks were indeed the first.

Mathematicians are better at mathematics than at history, and have perpetuated an error concerning what Euclid did. They frequently state in textbooks and elsewhere that Euclid's proof that there are infinitely many prime numbers is by contradiction. But it is not. Euclid considered what happens if you multiply finitely many prime numbers and then add 1. For example:

(2 × 11 × 37) + 1 = 815

The number you get cannot be divisible by any of the finitely many prime numbers you started with. 815 cannot be divisible by 2 because 814 is; 815 cannot be divisible by 11 because 814 is; 814 cannot be divisible by 37 because 814 is. (The next prime number after 814 that is divisible by 37 is 814+37; the next after 814 that is divisible by 11 is 814+11; the next after 814 that is divisible by 2 is 814+2.)

Therefore, whichever prime numbers 815 is divisible by, whether it is prime itself or not, cannot be among the finitely many you started with (in this example 2, 11, and 37). (In fact 815 is 5 × 163, and 5 and 163 are prime.) In this way it is seen that every finite list of prime numbers can be extended to a longer finite list of prime numbers.

That is how Euclid prove there are infinitely many prime numbers.

Catherine Woodgold and I wrote a joint paper in which we refuted the historical error and explained some practical reasons why it matters:

Michael Hardy and Catherine Woodgold, "Prime Simplicity", Mathematical Intelligencer, volume 31, number 4, fall 2009, pages 44–52.

I learned only after the paper appeared that the historical error may have originated with Johann Peter Gustav Lejeune Dirichlet. It appears in his posthumous book on number theory.

• I am afraid, this has nothing to do with the original question. Aug 6, 2017 at 17:26
• @MoisheCohen : How so? This is about what Euclid did with prime numbers in the 3rd century BC, and the question explicitly asks about that, among other things. Aug 6, 2017 at 19:28
• The specific questions are "What other cultures knew of these numbers?", "What did Thymaridas know?", "What is the first mention of prime numbers in a historical source?". They clearly have nothing to do with the specific nature of Euclid's proof. Aug 7, 2017 at 22:50
• @MoisheCohen : The question says "I'm curious about their very early history, say 200 BC and earlier." That includes Euclid. It then goes on to say that not only the Greeks were involved, but others that the poster doesn't know about. But "early history [before] 200 BC" includes Euclid and my answer goes into something insufficiently appreciated about Euclid. Aug 7, 2017 at 23:20
• @Michael Hardy: Every proof can be understood as proof by contradiction, namely simply by assuming the contrary. But Euclid's proof is by contradiction according to Euclid's own words: In the course of Proposition 20 The (set of all) prime numbers is more numerous than any assigned multitude of prime numbers. Euclid says: "G will also measure the remainder, unit DF, (despite) being a number. The very thing (is) absurd. Thus, G is not the same as one of A, B, C. And it was assumed (to be) prime." (my italics) Aug 16, 2017 at 12:16

I was a student learning Vedic mathematics a couple of years ago. I remember they talked about prime numbers also being mentioned in the vedas(probably Rig Veda). I tried to find links that mention it. I was only able to find a few references (might be because Vedic maths is not used outside India ?)

here. Also this link and this for some general info on what vedic math is! Also I don't know how old they are(although Vedas are considered to be one of the oldest known texts) but I just wanted to share this!

• Your second and third links are about Venkatraman's 20th-century book Vedic Mathematics which is several thousand years too new. The first link does mention prime numbers but unfortunately does not actually have information on where they appear in Vedic mathematics. Aug 30, 2012 at 17:48
• Well the book might be toooo new, but the sanskrit sutras/phrases they were talking about are deduced from vedas! Aug 30, 2012 at 18:18
• That's a common misconception. Your second link deals with it explicitly: Aug 30, 2012 at 18:56
• "From what has been said above it is evident that the sixteen siitras of Swamiji's Vedic Mathematics are his own compositions, and have nothing to do with the mathematics of the Vedic period. Although there is nothing Vedic in his book, Swlimiji designates his preface to the book as A Descriptive Prefactory Note on the Astounding Wonders of Ancient Indian Mathematics [...] The deceptive title of Swiimiji' s book and the attribution of the sixteen siitras to the Parisistas of the Atharvaveda etc., have confused and baffled the readers who have failed to recognize the real nature of the book" Aug 30, 2012 at 18:57