TITLE: At what times were people interested in prime numbers
QUESTION [30 upvotes]: While prime numbers are central objects in mathematics it looks that they were ignored and forgotten for long periods of time. I am interested to get some facts and insights about this matter, in particular:
1) Were prime numbers studied in ancient times only by the ancient Greeks? At what periods were they studied by the ancient Greeks themselves?
2) Is it the case that people largely or even entirely lost their interest in the prime numbers for about fifteen centuries until Fermat? What are the facts of the matter and what are the  reasons that may explain these facts.
(motivated by conversations with Ron Livne.)

REPLY [2 votes]: This is a VERY interesting question to which I do not have an answer, despite some research and much cogitation.  In India and China there was substantial deep mathematical thought well before 500 BCE. I find it hard to believe that people did not think about prime numbers but I have been able to find NO evidence.
It is striking to me that the earliest classical Greek mathematicians lived on the Greek shores of Turkey, not in mainland Greece. Some are said to have visited Egypt and inland Turkey, but the history is so vague as to be probably only conjectures made centuries after these people died.  There is little evidence that previous civilizations within the Greek area of travel, made substantial contributions to the kind of mathematical ideas that Greek mathematicians began to explore.  But why did  Thales of Miletus (ca. 624–548 BCE)  and Pythagoras of Samos (ca. 580–500 BCE) (he moved to Croton later) grow up where they did?