The church father Irenaeus associated the number of the beast (Rev 13:18) with the six days of creation as well as 6,000 years of Earth's history. (Against The Heresies V.XXVIII.2-3)Irenaeus was a disciple of Polycarp who was a disciple of John. Of course, Irenaeus got the number from the book of Revelation. According to this church father, the number was foreshadowed by the six days of creation, the flood, and the book of Daniel. It was also a prophecy. Surprisingly, the idea for 666 was preceded by the first-century Jewish scholar Philo of Alexandria (25 BC-50 AD).

Since, therefore, the first beginning of the generation of our race, after the destruction caused by the deluge, commenced with Noah, men being again sown and procreated, therefore he also is recognised as resembling the first man born of the earth, as far as such resemblance or recognition is possible. And the six hundredth year has for its origin the number six; and the world was created under the number six, therefore, by this same number does he reprove the wicked, putting them to shame because he would, unquestionably, never, after he had created the universe by means of the number six, have destroyed all the men who lived on the earth under the form of six, if it had not been for the preposterous excess of their iniquities. For the third power of six and the minor power is the number six hundred, and the mean between both is sixty, since the number ten more evidently represents the likeness of unity, and the number a hundred represents the minor power.
Philo, Book 42: Questions and Answers on Genesis, II

Both Irenaeus and Philo saw a spiritual or philosophical reason behind the number, and Philo wrote before the Book of Revelation was even written. They agreed that some of the following ideas were related to the number. 6 - days of creation 60 - The mean, 600 divided by 10 is sixty, or 60 and 6 cubits (Dan 3:1) 600 - Noah's flood, Noah was 600 years old when the flood began (Gen 7:11). This symbolizes the punishment of the wicked, and the idea of Judgement. Irenaeus and Philo agreed that the number 666 was based on the creation week, Noah’s flood, the idea of Judgement, and the punishment of the wicked. One concept mentioned by Irenaeus and not by Philo was six thousand years. Irenaeus said since the world was created in six days there would be six thousand years of earth history. Philo, on the other hand, believed the world wouldn’t be destroyed.