Connections between prime numbers and geometry

This might be a little open-ended, but I was wondering: are there any natural connections between geometry and the prime numbers? Put differently, are there any specific topics in either field which might entertain relatively close connections?

PS: feel free to interpret the term natural in a broad sense; I only included it to avoid answers along the lines of "take [fact about the primes] $\to$ [string of connections between various areas of mathematics] $\to$ [geometry!]"


The Gauss-Wantzel theorem on constructible polygons immediately springs to mind. This states that a regular $n$-gon is constructible with a straightedge and compass iff $n$ is the product of a power of $2$ and a collection of distinct Fermat primes.

The power of $2$ is only there because if you can construct an $n$-gon, you can easily construct a $2n$-gon by constructing an isoceles triangle on each side of the $n$-gon. Doing this repeatedly, you can get a $2^mn$-gon. So really, this is about the nature of Fermat primes.


Here’s an example, far from the best, of prime numbers entering into a (relatively) geometric problem. Consider all the points on the unit circle, $X^2+Y^2=1$. Notice that by considering this as the set of complex numbers $a+bi$ of absolute value one, i.e. $a^2+b^2=1$, this has a natural group structure. Explicitly, $(a,b)*(c,d)=(ac-bd,ad+bc)$.

Now, here’s the question: What are the rational points on the circle? That is, what are the points $(a,b)$ on the circle for which both $a$ and $b$ are rational numbers? Your first interesting case is $(3/5,4/5)$. Of course there’s an answer to this question coming from the classical solution to the problem of finding all Pythagorean Triples. But I want to ask an arithmetic question: What are the possible denominators of all the rational points on the circle?

The answer comes out of looking at the “primes” in the ring of Gaussian Integers, but I’ll cut to the chase: a number will appear as the (common) denominator $D$ of a rational pair $(a,b)$ on the unit circle if and only if the only primes dividing $D$ are those of the form $4k+1$. Naturally, I want the rational numbers $a$ and $b$ to be in lowest terms.


How about another imagery about prime numbers? A prime number $p = 1 \times p$ and hence, geometrically it is like a one-dimensional segment. On the other hand, a composite number $c= a \times b$, where $a$ and $b$ are its prime factors, is like a rectangle having an area $c$, with side lengths $a$ and $b$ . So, in general, composite numbers $c$ may be imagined as multi-dimensional rectangular parallelepipeds with volumes $c= a \times b \times c \times d \cdots$, having side lengths corresponding to their prime factors. Of course, the question that is pertinent is: does this imagery lead to interesting results or insights?


A simple example: number p>2 is prime iff any equiangular p-gon with rational side lengths is regular, see, e.g., http://www.cut-the-knot.org/Outline/Geometry/EquiangularP-gon.shtml