What does Pythagorean Comma, Zhu Zaiyu and Beat Roughness conclude, in numbers, about “Jing Fang's Sixty Pipes and Qian Lezhi's Three Hundred and Sixty: Why Continued Fractions Favour 12, 41 and 53”?
Answer: Chapter 2 uses continued fractions to show that records of closure fall only at 5, 12, 41, 53 and 306 steps, that Jing Fang's seyu misses by only 3.6150 cents, and that by the three-gap theorem a tuning only ever has two or three step sizes.
Scope of the numbers: Its listeners, samples and copy are illustrative, and all calculations are generated by its programs; the book is not medical advice, claims no effect of any frequency, scale or instrument on body or mind, and is not purchasing advice. Marked boxes separate published evidence, runnable Python calculations (22 programs), classical sources and the author's hypotheses.
Data table
The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 12, 3.6150, 306, 41, 53
| fifths distance to an octave (cents) | |
| 1 | 498.0450 flat |
| 2 | 203.9100 sharp |
| 5 | 90.2250 flat |
| 12 | 23.4600 sharp |
| 41 | 19.8450 flat |
| 53 | 3.6150 sharp |
| 306 | 1.7697 flat |
| record holders | 1, 2, 5, 12, 41, 53, 306 |
| 59 fifths (the 60th pipe) | 584.6549 cents flat |
| 359 fifths (the 360th pipe) | 1.8453 cents sharp |
| 3^53 | 19,383,245,667,680,019,896,796,723 |
| 2^84 | 19,342,813,113,834,066,795,298,816 |
| ratio | 1.002090314041, 3.6150 cents |
Show the full program
# Chapter 2. p21: how close does the chain come back to huangzhong?
# Model: keep generating by thirds past twelve, as Jing Fang (60 pipes)
# and Qian Lezhi (360 pipes) did. After n pure fifths 3/2, octave-
# reduced, the new pipe sits some cents away from the nearest octave
# of huangzhong. We list every n up to 360 that sets a new record of
# closeness, then the exact ratio for n = 53 (3^53 / 2^84).
import math
from fractions import Fraction
def gap(n):
c = 1200 * math.log2(3 ** n) % 1200
return (c, "sharp") if c <= 600 else (1200 - c, "flat")
def main():
best = 1e9
recs = []
print("fifths distance to an octave (cents)")
for n in range(1, 361):
d, side = gap(n)
if d < best - 1e-9:
best = d
recs.append(n)
print("{:>6} {:>12.4f} {}".format(n, d, side))
print("record holders: " + ", ".join(str(r) for r in recs))
for n in (59, 359):
d, side = gap(n)
print("{} fifths (the {}th pipe): {:.4f} cents {}".format(
n, n + 1, d, side))
r = Fraction(3 ** 53, 2 ** 84)
print("3^53 = {:,}".format(3 ** 53))
print("2^84 = {:,}".format(2 ** 84))
print("ratio = {:.12f}, {:.4f} cents".format(
float(r), 1200 * math.log2(r)))
main()Single source and citation
Fan, Y. (2026). The Unclosed Circle of Pythagorean Tuning, Zhu Zaiyu's Root Approximation of Equal Temperament and the Beat Roughness of Just-Intonation Overtones (Version 1.0.0), Chapter 2: Jing Fang's Sixty Pipes and Qian Lezhi's Three Hundred and Sixty: Why Continued Fractions Favour 12, 41 and 53. 5D Library. DOI pending
DOI pending · monograph page goes live after publication · 5DL-B-159 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026159,
author = {Fan, Yafu},
title = {The Unclosed Circle of Pythagorean Tuning, Zhu Zaiyu's Root Approximation of Equal Temperament and the Beat Roughness of Just-Intonation Overtones},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}Other chapter answers in this book
- Chapter 1 · Twelve Steps of Adding and Cutting a Third: the Exact Arithmetic of the Pythagorean Comma
- Chapter 3 · Zhu Zaiyu's Close Ratio: Digit-by-Digit Roots, a Twenty-Five-Digit Recomputation and the Marginal Value of Precision
- Chapter 4 · Three Ledgers for the Major Third: Just 5/4, Pythagorean 81/64 and Equal Temperament
- Chapter 5 · The Roughness Curve: the Plomp and Levelt Data and the Sethares Dissonance Model
- Chapter 6 · Beats and High-Register Roughness: the Same Mistuning Beats Low and Grates High
- Chapter 7 · The Sources Examined: the Diyuan Chapter of the Guanzi, Zhu Zaiyu's Lvlv jingyi and the Blacksmith Legend in Boethius
- Chapter 8 · Practice and Falsification: Fitting Marketing Copy with a Detector for Pseudo-Precise Tuning Claims