The Alignment Deficit Lattice and Musical Tuning
Cite this paper
A. S. Petty, The Alignment Deficit Lattice and Musical Tuning, DOI: 10.5281/zenodo.20404944.
Abstract
For a prime with and an integer whose prime factors all divide , the repetend alignment approaches with deficit The exact deficit ratio between two such integers is Writing , for fixed and scaling through -supported integers, the ratio converges to .
The integers supported on a fixed set of primes form a free abelian monoid, and the deficit map is an injective, order-reversing numerical coordinate on this monoid. When coincides with the generators of a musical tuning system, the deficit ratios recover the intervals of that system asymptotically.
Representing just intervals by prime-exponent vectors is standard [3, 7]. To the author’s knowledge, the specific alignment-deficit coordinate described here has not been previously noted.
Introduction and the Alignment Formula
The arithmetic of repeating decimals encodes structure that depends on the prime factorization of the base. In the base- expansion of a rational number, factors shared with govern the terminating part, while the periodic part is governed by multiplication by modulo the remaining denominator. For primes with , the resulting one-digit repetends create a natural notion of alignment. This is the fraction of numerators whose base- expansion shares its repeating pattern with .
This paper establishes an exact formula for the alignment of fractions when is supported on the prime factors of , and studies the resulting deficit from the limiting alignment . The deficit has an exact ratio formula at every finite , and the ratio of deficits at two points , converges to as both scale to infinity. This makes the deficit a numerical coordinate on the monoid of -supported integers whose ratios recover the multiplicative structure of the monoid.
When the prime support of the base coincides with the generators of a musical tuning system, this convergence recovers the intervals of that system. The lattice underlying Pythagorean tuning arises from any base with prime support ; adjoining the -axis gives the five-limit lattice, as in base . The Pythagorean comma and the just major scale are recovered as limits of exact deficit ratios, with relative errors below even at the smallest scale.
We proceed as follows. The remainder of this section establishes the alignment formula and its setting. Section 2 develops the deficit map and its ratio properties. Sections 3 and 4 apply the theory to base 12 (Pythagorean tuning) and base 30 (five-limit just intonation), recovering the Pythagorean comma and the just major scale from the arithmetic of repeating decimals.
Definition 1. An integer is -supported if every prime factor of belongs to . Equivalently, divides some power of .
Remark 2. In standard number theory, “-smooth” means all prime factors are . Our condition is different. We require all prime factors to divide , not merely to be bounded by . We use “-supported” to avoid confusion.
Definition 3. Use the standard base- expansion, with terminating expansions written with an eventual tail of zeros rather than an infinite tail of digits . For an integer and a base , the repetend alignment is the fraction of for which the expansion of either terminates (counted as aligned by convention) or is identical, digit for digit, to the expansion of at every sufficiently large common position.
Theorem 4 (Repetend alignment theorem). Let be a prime with (equivalently, ), and let be -supported. Then
Proof. Write , where . For each , one step of base- long division gives Thus the quotient digit is and the remainder is again . Since , this is a valid base- digit, and hence Distinct nonzero residues therefore give distinct one-digit repetends.
Choose so that , and put . Shifting the base- point by places gives Also . Both and divide powers of , so and is invertible modulo . The fractional part of is . By the preceding long-division calculation, the eventual digit of is determined by , while that of is determined by . The two nonterminating tails agree digit for digit exactly when or, since is invertible, when .
We can now count the numerators .
Exactly numerators, namely , are nonzero multiples of . For these, reduces to a fraction whose denominator is -supported, so its base- expansion terminates. Conversely, if , the reduced denominator retains the factor and the expansion does not terminate.
Exactly numerators, namely , satisfy . They are nonterminating and, by the preceding residue calculation, share the repeating block of .
The remaining fractions fall into residue classes modulo , each with a one-digit repetend different from that of , so none of them are aligned.
The terminating and matching-repetend classes are disjoint. Hence fractions are aligned out of , which gives the stated formula. ◻
Example. In base , take and , so . Among , the numerator gives the terminating fraction . The two numerators satisfy , so their repetends match that of . Thus numerators are aligned, in agreement with
The -supported integers form the free abelian monoid on . Writing , the exponent map identifies this monoid with , the nonnegative orthant in the prime-exponent lattice . Its group completion represents -supported rational intervals [3, 7]. Allowing integer exponents, parametrizes Pythagorean intervals, while parametrizes five-limit just intonation [3, 4].
This note observes that the alignment deficit provides a specific numerical coordinate on this monoid, arising from the digit function of long division, whose ratios recover the tuning intervals asymptotically.
The Deficit Map
Definition 5. Fix a base , write , and let be a prime divisor of . For a -supported integer , the alignment deficit is When the base is fixed, as it is in each application below, we abbreviate to .
Remark 6. By direct computation, .
Theorem 7 (Deficit ratio theorem). For -supported integers , The constant cancels. For fixed -supported , as tends to infinity through -supported positive integers,
Proof. The ratio is by direct computation. For the asymptotic, as . ◻
Corollary 8 (Generator scaling). Fix a prime . As tends to infinity through -supported positive integers,
The deficit map is injective and order-reversing on the -supported integers (larger gives smaller deficit). It provides a numerical coordinate whose ratios asymptotically reproduce the multiplicative structure of the monoid.
Base 12 and the Pythagorean Comma
For base , we have . The condition gives .
Pythagorean tuning is generated by the octave () and the perfect fifth () [2]. Its intervals are ratios of -supported integers in the group completion . The domain of the alignment-deficit coordinate is therefore the nonnegative cone in the same prime-exponent lattice.
Proposition 9 (Pythagorean comma). As tends to infinity through -supported positive integers, The limit is the Pythagorean comma. At , the ratio is , matching the comma to six significant figures.
Proof. Apply Theorem 7 with and . This gives . At , the exact value is . ◻
Remark 10 (Base dependence). The prime-exponent domain and the limiting interval ratios depend only on . The finite deficit values and their approximation errors also depend on the chosen alignment prime . Any base with , such as , , or , has the Pythagorean prime-exponent domain. For base , the prime is absent, so the domain contains octaves and major thirds () but not fifths (). The Pythagorean comma requires both and and cannot appear.
Base 30 and the Just Major Scale
For base , we have and . The -supported monoid shares its generators with five-limit just intonation [3, 4].
The just major scale uses the interval ratios , , , , , , , , a classical set [2, 5].
Proposition 11 (Diatonic lattice). Let . The eight -supported integers have ratios to equal to the just major scale intervals. As the -supported scaling factor tends to infinity, for each in the list. At the relative errors are below .
Proof. Each integer is -supported, as shown by its factorization. , , , , , , , . The ratios to are These are the classical just major scale intervals. By Theorem 7 with and , At , the relative error at the scale point is exactly This expression increases with on the listed range. Its maximum occurs at and equals . ◻
Remark 12. The choice is the least common denominator of the just major scale ratios. The resulting integers are -supported because the scale ratios involve only the primes , , . Any base with prime support containing produces a -supported lattice that contains the same five-limit sublattice (a base with prime support gives a larger lattice).
The -supported integers in also include , giving the ratio (just chromatic semitone). The diatonic scale is a subset of the full lattice within this octave, not the complete set.
The successive step ratios between diatonic notes are , , , , , , and . This is the classical whole-tone/semitone pattern [3].
Remark 13 (A seven-limit extension). Seven-limit just intonation uses the prime set and includes the harmonic seventh and the septimal whole tone [3]. For , and , so Theorem 7 applies with . As tends to infinity through -supported positive integers,
Remark 14. At , a common five-limit just chromatic scale [2] (with ratios , , , , , , , , , , , , ) produces thirteen -supported integers. The deficit ratios have relative errors below . Indeed, the same calculation as above gives the maximum at , where the relative error is .
Remarks
Relation to normal numbers
Borel’s notion of normality and repetend alignment both concern digit blocks in a fixed base, but they quantify different objects. A real number is normal to base if every -digit block has limiting frequency in its canonical infinite digit expansion [1]. The canonical base- expansion of a rational number is eventually periodic and therefore non-normal. Indeed, if its periodic tail has period , then for any with , at most of the possible -blocks can have positive limiting frequency.
By contrast, counts, across the finite family , the expansions that terminate or share the specified periodic tail of . Thus measures the difference between this finite-family proportion and , not a distance from normality.
Novelty and scope
The prime-exponent representation of just intonation is standard [3, 7], and the relation between smooth numbers and musical intervals has been discussed in the literature [6, 7]. To the author’s knowledge, the specific alignment-deficit coordinate described here has not been previously noted. The musical content and the limiting ratios depend on the prime support of the base; the finite coordinate values also depend on the alignment prime. Many functions on the -supported monoid share this asymptotic behavior. The contribution here is that the arithmetic of repeating decimals produces such a function naturally, with an elementary derivation and an exact (not merely asymptotic) ratio formula at every finite .
References
[1]É. Borel, Les probabilités dénombrables et leurs applications arithmétiques, Rend. Circ. Mat. Palermo 27 (1909), 247–271. doi:10.1007/BF03019651.
[2]J. M. Barbour, Tuning and Temperament: A Historical Survey, Michigan State College Press, 1951. Reprinted by Dover, 2004.
[3]D. J. Benson, Music: A Mathematical Offering, Cambridge University Press, 2007.
[4]H. von Helmholtz, On the Sensations of Tone as a Physiological Basis for the Theory of Music, 2nd English ed., translated by A. J. Ellis, Longmans, Green, 1885; reprinted by Dover, 1954.
[5]R. C. Archibald, Mathematicians and music, Amer. Math. Monthly 31 (1924), 1–25.
[6]F. D. Jevtić, Smooth numbers in music and architecture, in V. Todorčević (ed.), A Hidden Harmony: Mathematics and Music Through the Ages, Zbornik radova / Matematički institut SANU, 29(21) (2024), 69–74. doi:10.18485/mi_sanu_zr.2024.29.21.ch4.
[7]E. Kurenniemi, Chords, scales, and divisor lattices (2003), in J. Krysa and J. Parikka (eds.), Writing and Unwriting (Media) Art History: Erkki Kurenniemi in 2048, MIT Press, 2015, 233–254. doi:10.7551/mitpress/10014.003.0026.