I was thinking about various kinds of mappings of prime numbers and wondered in particular what prime numbers would look like when projected from the (extended) real line to the 1-sphere by a homeomorphism linking these two spaces. When I did the calculations I was amazed to find that prime numbers are mapped to a family of Pythagorean triples on the 1-sphere! This came as a complete surprise to me but I later learned that the link between stereographic projection and Pythagorean triples is already well known. Nevertheless, in this note I want to quickly record how I stumbled on this result.
Consider the three points
,
and
in the diagram. Since they are collinear there must be a scalar
such that
Writing this equation in vector form we get
from which we deduce
and
Equating these two expressions for we get
The function is the homeomorphism which maps points on the 1-sphere to points on the extended real line.
I was more interested in the inverse function which maps points on the extended real line to the 1-sphere. To find this, observe that
Using we have
so the above equation can be written as
Therefore
and then
Therefore if is a prime, the corresponding point on the 1-sphere is
However, the numbers ,
and
are then Pythagorean triples, as can easily be demonstrated by showing that these terms satisfy the identity