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.)



At what times were people interested in prime numbers
The [Liber Abaci](http://en.wikipedia.org/wiki/Liber_Abaci) (1202) of Fibonacci contains a chapter on perfect numbers and Mersenne primes (of course Mersenne came much later, but possibly slightly before Fermat; he is born slightly before Fermat but is essentially a contemporary). 


I do not know if there are any new results; but at least it seems he was interested in them.


I am not sure if this counts as interested in prime numbers, but it is certainly number theory and involves primes very directly: the Chinses Remainder Theorem developped from about 3rd to 13th century in China (no surprise here); but also in 6th and 7th century in India.


A non-example would be the [Chinese Hypothesis](http://en.wikipedia.org/wiki/Chinese_hypothesis) that used to be believed to originate in ancient China but did not. 


