3. Ancient Greek Number Theory

Pythagoreans applied themselves to the study of mathematics....They thought that its principles must be the principles of all existing things.

Aristotle, Metaphysics

In this chapter, we’re going to look at some of the problems studied by ancient Greek mathematicians. Their work on patterns and “shapes” of numbers led to the discovery of prime numbers and the beginnings of a field of mathematics called number theory. They also discovered paradoxes that ultimately produced some mathematical breakthroughs. Along the way, we’ll examine an ancient algorithm for finding primes, and see how to optimize it.

3.1 Geometric Properties of Integers

Pythagoras, the Greek mathematician and philosopher who most of us know only ...

Get From Mathematics to Generic Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.