5D Library › Mayan Tzolkin Modular Gears, Oracle-Cross Involutions and Sixty-Four-Gate Network Percolation · 中文
Chapter 1. The Tzolkin as Two Coprime Gears
Two coprime gears
The tzolkin consists of two counts running together: 13 numbers (called “tones” here, following common usage) and 20 day signs (Imix, Ik, Akbal through Ajaw). Each day both counts advance by one. Day () has tone and day sign .
Because 13 and 20 are coprime, the Chinese remainder theorem guarantees that is an isomorphism from to ; the inverse map has a closed form:
where 40 leaves 1 modulo 13 and 0 modulo 20, and 221 leaves 0 modulo 13 and 1 modulo 20.
Calculation
# Chapter 1. p01: The 260-day count as Z13 x Z20 - and why the Chinese
# sexagenary cycle has only 60 pairs.
# Day d (0..259) of the tzolkin carries tone t = d mod 13 + 1 and day sign
# s = d mod 20 + 1 (1 = Imix ... 20 = Ajaw). Because gcd(13, 20) = 1 the
# Chinese remainder theorem makes (t, s) a bijection, with inverse
# d = (40 (t - 1) + 221 (s - 1)) mod 260,
# since 40 = 1 mod 13, 40 = 0 mod 20, 221 = 0 mod 13, 221 = 1 mod 20.
# Stems (10) and branches (12) have gcd 2: only pairs of equal parity occur.
from math import gcd
SIGNS = ("Imix", "Ik", "Akbal", "Kan", "Chikchan", "Kimi", "Manik",
"Lamat", "Muluk", "Ok", "Chuwen", "Eb", "Ben", "Ix", "Men",
"Kib", "Kaban", "Etznab", "Kawak", "Ajaw")
def pairs(m, n):
return {(d % m, d % n) for d in range(m * n)}
if __name__ == "__main__":
for m, n, name in ((13, 20, "tzolkin 13 x 20"), (10, 12,
"ganzhi 10 x 12")):
p = pairs(m, n)
print(" {}: gcd {}, cycle {}, pairs reached {} of {}".format(
name, gcd(m, n), m * n // gcd(m, n), len(p), m * n))
print(" CRT coefficients: 40 mod 13 = {}, 40 mod 20 = {}".format(
40 % 13, 40 % 20))
print(" 221 mod 13 = {}, 221 mod 20 = {}".format(
221 % 13, 221 % 20))
ok = all((40 * (d % 13) + 221 * (d % 20)) % 260 == d for d in range(260))
print(" inverse formula recovers every day: {}".format(ok))
print(" first days: " + ", ".join(
"{} {}".format(d % 13 + 1, SIGNS[d % 20]) for d in range(0, 5)))
print(" day 13 and 20: {} {}, {} {}".format(
13 % 13 + 1, SIGNS[13 % 20], 20 % 13 + 1, SIGNS[20 % 20]))
same = [d for d in range(260) if d % 13 + 1 == 1 and d % 20 == 0]
print(" 1 Imix recurs only at day {} (mod 260)".format(same))
# tzolkin 13 x 20: gcd 1, cycle 260, pairs reached 260 of 260
# ganzhi 10 x 12: gcd 2, cycle 60, pairs reached 60 of 120
# CRT coefficients: 40 mod 13 = 1, 40 mod 20 = 0
# 221 mod 13 = 0, 221 mod 20 = 1
# inverse formula recovers every day: True
# first days: 1 Imix, 2 Ik, 3 Akbal, 4 Kan, 5 Chikchan
# day 13 and 20: 1 Ix, 8 Imix
# 1 Imix recurs only at day [0] (mod 260)The Chinese stems and branches form the same kind of gear, but 10 stems and 12 branches have greatest common divisor 2: the indices of stem and branch always share parity, so only 60 of the 120 combinations occur (Volume 66, Chapter 1). The tzolkin has no such constraint and all 260 combinations occur. One visible consequence: the tzolkin returns to tone 1 on day 13 (1 Ix), returns to the sign Imix on day 20 with tone 8 (8 Imix), and “1 Imix” recurs only after the full 260 days.
The haab and the Calendar Round
The haab has 18 months of 20 days and 5 days of wayeb, 365 days in all. A day has both a position in the tzolkin and a position in the haab; the two together repeat after
the “Calendar Round”. Anchored on the GMT correlation (Julian day 584283 is 4 Ajaw 8 Kumku, the end of the 13th baktun) (Aveni 2001), the program counts 18980 distinct combinations in one Calendar Round, only 0.20 of the conceivable ones.
Calculation
# Chapter 1. p02: The Calendar Round and the four year bearers.
# The haab has 18 months of 20 days and 5 days of wayeb: 365 = 18 x 20 + 5.
# A day is a pair (tzolkin day, haab day); the pair recurs after
# lcm(260, 365) days. Anchor (GMT correlation, JDN 584283): 4 Ajaw 8 Kumku,
# the end of the 13th baktun. Since 365 = 5 (mod 20), the day sign
# advances 5 places a year, so the sign on a fixed haab day takes only
# 4 values: the year bearers. Which 4 depends on the haab day chosen as
# "new year" (0 Pop or 1 Pop): two seating conventions.
from math import gcd
SIGNS = ("Imix", "Ik", "Akbal", "Kan", "Chikchan", "Kimi", "Manik",
"Lamat", "Muluk", "Ok", "Chuwen", "Eb", "Ben", "Ix", "Men",
"Kib", "Kaban", "Etznab", "Kawak", "Ajaw")
ANCHOR = 584283
T0 = (4 - 1) * 40 + (20 - 1) * 221 # 4 Ajaw as a day 0..259
H0 = 17 * 20 + 8 # 8 Kumku, month 18, as 0..364
def day(jdn):
return (T0 % 260 + jdn - ANCHOR) % 260, (H0 + jdn - ANCHOR) % 365
if __name__ == "__main__":
L = 260 * 365 // gcd(260, 365)
print(" lcm(260, 365) = {} days = {} haab = {} tzolkin".format(
L, L // 365, L // 260))
seen = {day(ANCHOR + k) for k in range(L)}
print(" distinct (tzolkin, haab) pairs in one round: {} of {}"
" ({:.2f})".format(len(seen), 260 * 365, len(seen) / (260 * 365)))
for seat, h in (("0 Pop", 0), ("1 Pop", 1)):
bearers = sorted({day(j)[0] % 20 for j in range(ANCHOR, ANCHOR + L)
if day(j)[1] == h})
print(" bearers on {}: {}".format(
seat, ", ".join(SIGNS[b] for b in bearers)))
print(" sign numbers {} - one class mod 5: {}".format(
[b + 1 for b in bearers], sorted({(b + 1) % 5 for b in bearers})))
for h in range(20):
signs = {day(j)[0] % 20 for j in range(ANCHOR, ANCHOR + L)
if day(j)[1] % 20 == h and day(j)[1] < 360}
assert len(signs) == 4
print(" every day-of-month position meets exactly 4 signs: True")
print(" 13 x 4 = {} years of distinct bearer-and-tone pairs".format(
13 * 4))
# lcm(260, 365) = 18980 days = 52 haab = 73 tzolkin
# distinct (tzolkin, haab) pairs in one round: 18980 of 94900 (0.20)
# bearers on 0 Pop: Ik, Manik, Eb, Kaban
# sign numbers [2, 7, 12, 17] - one class mod 5: [2]
# bearers on 1 Pop: Akbal, Lamat, Ben, Etznab
# sign numbers [3, 8, 13, 18] - one class mod 5: [3]
# every day-of-month position meets exactly 4 signs: True
# 13 x 4 = 52 years of distinct bearer-and-tone pairsWhy there are only four year bearers
365 leaves 5 modulo 20, so after one year the day sign has advanced 5 places. The day signs that fall on a given haab day therefore always have the same index modulo 5, and only four day signs are possible. With 0 Pop as the haab new year the program gives the bearers Ik, Manik, Eb and Kaban (sign numbers 2, 7, 12 and 17); with 1 Pop as new year they are Akbal, Lamat, Ben and Etznab (3, 8, 13 and 18). Both “seating” conventions appear in the literature, but whichever is chosen the bearers form exactly one residue class modulo 5. More generally, each day-of-month position of the haab meets only four day signs.
Four bearers combined with 13 tones give distinct year names, exactly one Calendar Round.
Evidence
Conclusion: that there are only four year bearers is an arithmetic fact, not a choice. It depends only on . Which four signs carry the years depends on the convention for which day is new year.
Summary
The tzolkin is , with a closed-form inverse from the Chinese remainder theorem; the sexagenary cycle uses only half its combinations because . The Calendar Round is 18980 days; the year bearers can only be the four day signs of one residue class modulo 5, Ik, Manik, Eb and Kaban when 0 Pop is new year.
References
Fan, Y. (2026). Mayan Tzolkin Modular Gears, Oracle-Cross Involutions and Sixty-Four-Gate Network Percolation: Coprime Cycle Synchronization, Antipode-Analog Permutations and Nine-Center Connected Components [玛雅卓尔金双模齿轮、神谕十字对合变换与六十四闸门网络渗流] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090193 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).