SERIES / The Mathematics of Musical Pitch · Article 02
The Circle of Fifths Does Not Close: A Diophantine Problem in Music
ABSTRACT
Repeated pure fifths generate a remarkably useful map of musical pitch, but the map never closes exactly. This article constructs Pythagorean tuning from the ratio 3/2, compares twelve fifths with seven octaves, and proves that no positive number of pure fifths can equal a stack of octaves. The proof is an elementary application of unique prime factorization. The resulting mismatch, the Pythagorean comma, explains why tuning systems must choose how to distribute small errors rather than preserve every interval perfectly.
- Published
- Updated
- Reading time
- 10 min
- Author
- Natoandro
The circle of fifths is one of music theory’s most useful diagrams. Start on any note, move by perfect fifths, and you seem to travel through the twelve notes of the chromatic scale before arriving back where you began.
But there is a mathematical catch. If every fifth is the pure ratio , the route does not return exactly to its starting pitch after twelve steps. The discrepancy is tiny, but it is not zero.
That failure is not an accident of notation or an imperfection in one instrument. It follows from a simple fact about prime numbers.
The central question is:
Why can repeated pure fifths never return exactly to a stack of octaves?
The short answer is encoded in the equation
If positive integers and could satisfy it, then some number of pure fifths would equal some number of octaves. We will prove that this is impossible.
From one fifth to a tuning system
In the ratio model introduced in the first article, an interval from frequency to frequency is represented by . A pure octave has ratio , while a pure perfect fifth has ratio .
Suppose a reference note has frequency . Moving up by one pure fifth gives
Moving up by two fifths gives
The result is above the original octave, since . To put it back into the octave beginning at , divide by :
The ratio is a whole tone in the Pythagorean construction. Repeated fifths, together with octave adjustment, generate a collection of rational frequency relationships. This is the basic mathematical idea behind Pythagorean tuning.
More generally, after upward fifths, the raw frequency ratio is
Octave adjustment multiplies this by a suitable power of so that the result lies in a chosen octave. In symbols, a generated interval has the form
where is an integer. The exact value of depends on how many octaves we add or remove.
This construction does not say that all historical music used one identical Pythagorean scale. Tuning systems are historical solutions to practical problems, and different systems preserve or compromise among interval relationships in different ways.
The history also resists a simple origin story. Ancient Greek writers discussed numerical relationships among intervals, but surviving texts and later interpretations do not amount to one uniform doctrine attributable without qualification to Pythagoras. Historical scholarship is therefore useful here not because it supplies a single “discovery date,” but because it distinguishes mathematical constructions from the stories later told about them. [, ]
Computing the octave adjustment
The exponent is not arbitrary. We choose it so that the octave-adjusted ratio lies in the reference octave:
Taking the base-two logarithm gives
The floor operator, written and defined as the greatest integer less than or equal to , gives the required integer directly:
Indeed, if , then . Negating and adding yields
so with we obtain
which is automatically between and . In other words, the exponent removes exactly the number of octaves needed to return the generated pitch to the chosen octave.
For two fifths,
so , and the normalized ratio is
For twelve fifths,
so . The normalized ratio is therefore
the Pythagorean comma ratio encountered below. The floor formula does not make the cycle close. It only chooses the representative of each generated pitch class inside one octave, leaving the residual mismatch visible.
What would it mean for the circle to close?
A fifth raises frequency by . An octave raises it by . Therefore, for fifths to match octaves exactly, we would need
The exponents and would count the number of fifths and octaves, respectively. For the familiar comparison, twelve fifths are set against seven octaves:
The first quantity is
To compare it with , divide the two ratios:
This ratio is greater than , so twelve upward pure fifths overshoot seven octaves by a small amount. The ratio
is the Pythagorean comma in this orientation. Reversing the comparison gives its reciprocal, . The two descriptions name the same mismatch, with opposite directions. The ratio is approximately cents when converted to a logarithmic interval measure.
Numerically,
So the excess is about as a frequency multiplier. It is small enough to be musically manageable, but large enough that a closed cycle of exact fifths cannot simply ignore it.
The theorem hiding inside the tuning problem
We can now prove the stronger statement.
Theorem
There are no positive integers and such that
Proof
Assume, for contradiction, that such positive integers exist. Multiply both sides by :
The left side has only the prime factor . The right side has only the prime factor . But the fundamental theorem of arithmetic says that every integer greater than has a unique prime factorization. Two positive integers with different prime factors cannot be equal.
Therefore the assumed equality is impossible. Hence no positive number of pure fifths can equal a positive number of octaves.
The proof is short because the musical question has been translated into the right arithmetic language. The issue is not that twelve is a poor choice, or that the circle was drawn inaccurately. Any proposed exact closure would require a power of to equal a power of , and unique factorization forbids that.
The same argument works for every pair of positive counts. Five fifths cannot equal three octaves. Fifty-three fifths cannot equal thirty-one octaves. No finite choice can close the two multiplicative systems exactly.
Why the circle of fifths still works
At this point, “the circle of fifths” may sound misleading. If pure fifths never close, why is it a circle at all?
The answer is that the familiar diagram identifies pitches after octave equivalence and usually works within a finite, practical tuning system. It is a map of relationships among note names or pitch classes, not a claim that repeated pure ratios return to the same physical frequency.
We can state that identification precisely. For positive frequencies and , say that they are octave-equivalent when
for some integer . In other words, multiplying or dividing by powers of does not change the pitch class in this model. The resulting object is a quotient of the positive real numbers by the subgroup generated by :
This is already a useful answer to the apparent paradox. Pure-ratio arithmetic lives among actual positive frequencies, where twelve fifths and seven octaves are different. The circle of fifths lives after we identify all frequencies related by an octave. The quotient makes the diagram close while the Pythagorean comma records the mismatch that was identified away. This is the same distinction that appears in discussions of enharmonic spellings and the difference between Pythagorean and equal-tempered scales.
We will not develop the geometry of this quotient fully here. The next article will use the logarithm to turn multiplication into addition. Under that change of coordinates, multiplying by becomes adding an integer , and the same construction becomes the more familiar circle
In pure-ratio arithmetic, the endpoint after twelve fifths is slightly above the endpoint after seven octaves:
If we identify pitches that differ by octaves, the two endpoints occupy the same nominal pitch class. If we insist on exact frequencies, they remain distinct. The circle is therefore produced by an equivalence convention, while the comma records what that convention has hidden.
This distinction is a recurring theme in mathematics and music: an object can become simpler after we declare certain differences irrelevant. The simplification is useful, but it does not make the differences disappear.
The practical consequence: tuning is compromise
A tuning system has to decide what to do with the non-closing cycle. One possibility is to preserve many fifths as closely as possible and let the discrepancy collect somewhere. Another is to distribute small deviations across the intervals so that the whole system is usable in multiple keys.
Historical accounts describe Pythagorean tuning, meantone, well temperaments, and equal temperament as different ways of handling these competing demands. They do not represent one timeless standard, but a succession of choices about which relationships to preserve and which errors to accept.
Equal temperament makes a particularly clear choice: instead of retaining twelve exact pure fifths, it divides the octave into twelve equal multiplicative steps. If the octave ratio is , one semitone has ratio
Twelve such steps multiply to exactly one octave:
But the resulting fifth, seven semitones, has ratio
which is close to rather than equal to it. The mismatch has not been disproved. It has been redistributed according to a new design rule. The next article will explain why logarithms make this comparison natural and how rational approximation helps us understand the choice of twelve.
What the theorem establishes
The musical construction and the number-theoretic proof can now be stated together:
- A pure fifth multiplies frequency by .
- A pure octave multiplies frequency by .
- Repeated fifths generate ratios of the form .
- Exact closure against octaves would require .
- That equality would force .
- Unique prime factorization makes the equality impossible.
- Twelve fifths exceed seven octaves by the Pythagorean comma .
- Tuning systems are ways of managing this and related incompatibilities among desired interval relationships.
The important lesson is not merely that one historical tuning contains a small error. It is that a familiar musical shape can encode an exact impossibility theorem:
The circle remains useful because music can identify pitches by octave, by note name, or by a chosen tuning convention. Mathematics lets us see both sides at once: the elegant closed diagram and the irreducible discrepancy hidden behind it.
Notation and prerequisites
- denotes a positive frequency.
- counts pure fifths and counts octaves; in the theorem, both are positive integers.
- A ratio greater than means that the second frequency is higher in the chosen direction.
- The proof uses only integer exponents, fractions, and unique prime factorization. Logarithms and rational approximation will be introduced in the next article.
Bibliography
- Götz Kersting, The Mathematical Structure of Pythagorean-like Tuning Systems. 2025. doi:10.1007/s00283-025-10478-y
- Dave Benson, Music: A Mathematical Offering. 2006. Source
- J. Murray Barbour, Tuning and Temperament: A Historical Survey. 1951. Source
- Andrew Barker, Greek Musical Writings, Volume 2: Harmonic and Acoustic Theory. 1989. doi:10.1017/CBO9780511552776
- Thomas J. Mathiesen, Apollo's Lyre: Greek Music and Music Theory in Antiquity. 1999. Source
- Børre Nyhoff, Alv I. Aarskog, Sverre Holm, Geometric Construction of Pythagorean and Just Musical Scales and Commas. 2023. doi:10.1007/s00283-022-10260-4
- John C. Baez, The Mathematics of Tuning Systems. 2026. Source