Skip to content

Magic Configuration Gusuryak

Lee Yunjin edited this page Nov 12, 2026 · 25 revisions

In 최석정's 구수략, 마법진 — magic configurations, a modified form of the 마방진 — appear, which are introduced in this article. Square forms are covered in 마방진/구수략.

Here, keeping the expression of the original text, when a partial-sum rule is present we call it N-ja-gakdeuk (N子各得), stating the partial-sum condition explicitly.

As stated in the Gusuryak, n ≡ 1 (mod 5) is labelled Water, and the remainders 2, 3, 4, 0 are labelled Fire, Wood, Metal and Earth in that order.

Sources: National Library of Korea, Song Sang-yong collection, call no. 410.911-14-1, and the annotated translation by Jung Hae-nam and Heo Min, Gusuryak (Gyowoosa, 2006, ISBN 89-8172-595-0).

Jisu-guimundo

The Jisu-guimundo (地數龜文圖, "earthly-number tortoise-pattern diagram") places the numbers 1, 2, 3, … on the vertices of a honeycomb so that the six vertices of every hexagon have the same sum. The Gusuryak gives a Jisu-guimundo with nine hexagons and thirty vertices.

Jisu-guimundo, nine hexagons

The figure shows one arrangement on this nine-hexagon, thirty-vertex structure in which every hexagon sums to 93. When the hexagon sums are added up, some vertices are counted once, some twice and some three times, so different arrangements can give different hexagon sums.[^construction]

Source text and basic numbers

The Gusuryak text describes a tortoise-shell Jisu-guimundo of nine hexagons (九宮), with the invariant that every hexagon sums to 93 and a scheme for subdividing the space.

Source Translation Mathematical meaning
六子各得九十三數 Each six numbers obtain 93. the six vertices of each hexagon sum to S = 93
九宮共得八百三十七數 The nine palaces together obtain 837. 9 × 93 = 837
中眷三宮, 三宮爲主則 The three middle palaces form the central axis. the three central hexagons govern the whole
左右十二子 分爲二宮 The twelve numbers on the left and right are divided into two palaces. grouping of the twelve vertices on the two sides
四正爲四宮, 中間六子合爲一宮 The four cardinal directions form four palaces, and the six middle numbers form one palace. four outer palaces plus the central vertices
凡九宮化爲十二宮 In all, the nine palaces become twelve palaces. the nine hexagons regrouped into twelve units

Numbers made (作) and places used (用)

  • Numbers made (三十子作): 1 to 30, each once; T = 1 + 2 + … + 30 = 465.
  • Places used (五十四子用): nine hexagons of six places, 54 in all.
  • Shared places: 54 − 30 = 24. Of the thirty vertices, 14 belong to one hexagon, 8 to two and 8 to three.

With S = 93, the total T and the weighted overlap D of the shared vertices satisfy

9 × S = T + D,   9 × 93 = 465 + D,   D = 372

Congruences and spatial symmetry

The phrase 九宮化爲十二宮 can be read as a regrouping of the space by residue systems built on 2 and 3, combined with 5 (the five phases).

  • mod 2 (parity and left–right symmetry): since 93 is odd, each hexagon contains an odd number (1, 3 or 5) of odd numbers; the most balanced case is three odd and three even. 左右十二子 分爲二宮 gives the rule for dividing the parity of the twelve side vertices evenly.
  • mod 3 and mod 9: the three central regions (中眷三宮) correspond to the residue classes mod 3, and the 3 × 3 extension appears as the layout of the nine hexagons.
  • mod 4 and mod 12: the four directions (四正爲四宮) combine with the mod-3 axis to give 3 × 4 = 12 sub-units.
  • Chinese remainder theorem: combining the coprime systems mod 3 (axes), mod 4 (directions) and mod 5 (phases) fixes a position uniquely with period lcm(3, 4, 5) = 60.

The full analysis is in the repository: Jisu-guimundo source interpretation.

[^construction]: A simple construction: colour the top vertex blue and adjacent vertices alternately yellow, and write 1 at the top. Fill the blue vertices going down to the lower left by steps of 1 (2, 3, 4); start the next line at 5, the lower right of the hexagon containing 1, and fill 6–8; fill 9–12 and 13–15 in the same way. For the yellow vertices, write 16 at the bottom and go up ↗ with 17–19; start again at 20, upper left of 16, with 21–23, and fill 24–27 and 28–30 in the same way. Blue vertices then increase by 1 towards the lower left and by 4 towards the lower right from hexagon to hexagon, and yellow vertices decrease by the same amounts, so every hexagon has the same sum. That sum differs from the Gusuryak's 93. The method also works for a square array of hexagons, and starting at the top yellow vertex or filling alternately upwards and downwards gives further arrangements.

Jisu-yong-yukdo

Jisu-yong-yukdo

As shown in the figure above, a magic configuration in which five hexagons are arranged to share vertices and the sums of the six numbers forming each hexagon are all equal is called Jisu-yong-yukdo (地數用六圖). It is also called Yukja-gakdeuk (六子各得), and it forms a pair with Cheonsu-yong-odo.

The numbers 1 through 20 are each used exactly once. The six-number sum of each of the five hexagons is 63, which is six times the mean 10.5 of 1–20. The eight vertices {3, 8, 10, 11, 12, 13, 14, 15} shared by adjacent hexagons create the overlap positions, and the check for 二十子作 三十子用 (twenty numbers made, thirty numbers used) agrees as follows.

5 × 63 = 210 + 105

Hexagon Six numbers Sum
Upper-left 5, 18, 16, 3, 8, 13 63
Upper-right 1, 13, 8, 14, 20, 7 63
Center 3, 8, 14, 15, 11, 12 63
Lower-left 12, 11, 10, 2, 19, 9 63
Lower-right 15, 4, 17, 6, 10, 11 63

Divided by the Five Phases (wuxing), the sums are Water (수) 34, Fire (화) 38, Wood (목) 42, Metal (금) 46, and Earth (토) 50, forming an arithmetic progression with common difference 4. Jisu-guimundo is an extension of this Jisu-yong-yukdo to nine hexagons.

Jungui-yong-yukdo

Jungui-yong-yukdo

As shown in the figure above, a magic configuration in which four groups are arranged along the four sides of a square, adjacent groups share two numbers with each other, and the sums of the six numbers forming each group are all equal is called Jungui-yong-yukdo (重儀用六圖).

The numbers 1 through 16 are each used exactly once. The six-number sum is 51, which is three times the complement sum 17 (3 × 17 = 51). The upper group decomposes directly into three complement pairs summing to 17, like (1,16), (6,11), (7,10), and the lower group likewise into (2,15), (5,12), (8,9). The sum of the eight numbers shared by adjacent groups is 68, exactly equal to the sum 68 of the eight unshared numbers, so the following check holds.

4 × 51 = 136 + 68

Group Six numbers Sum
Top 7, 16, 1, 6, 11, 10 51
Left 7, 13, 11, 3, 9, 8 51
Bottom 8, 2, 9, 12, 15, 5 51
Right 6, 10, 4, 12, 14, 5 51

The shared pairs are top∩left {7,11}, top∩right {6,10}, left∩bottom {8,9}, right∩bottom {5,12}, and the core balance of this magic configuration is that the sum of the eight shared numbers {5, 6, 7, 8, 9, 10, 11, 12} and the sum of the eight unshared numbers {1, 2, 3, 4, 13, 14, 15, 16} both split evenly at 68 = 136/2.

Nakseo Sagudo

Nakseo Sagudo

As shown in the figure above, a magic configuration in which nine squares in a cross shape are arranged and the sums of the four numbers at the vertices of each square are all equal is called Nakseo Sagudo (洛書四九圖).

The construction principle is as follows. First, in the figure above there are 20 numbers in total, so if the sum of the two numbers at the vertices joined by a bold line is made 21, then for the remaining seven squares — excluding the two squares with yellow background — the sum of the four vertex numbers is naturally derived to be 42. Also, for the middle part of the vertical direction, 1/2/3/4/5/6 are placed in alternation, and likewise their complements relative to 21, namely 19/20/17/18/15/16, are placed in alternation; then the sum of the two numbers in the top horizontal row becomes 20, the next horizontal row 22, and the next 20, so that 20/22 alternate. Therefore, for the two yellow squares as well, the sum of the four vertex numbers becomes 42, and Sagudo is completed naturally.

Nakseo Ogudo

Nakseo Ogudo

As shown in the figure above, a magic configuration in which each of nine palaces arranged in a 3×3 layout has a cross shape, that is, consists of one center and four points above, below, left, and right, and the sums of the five numbers forming each palace are all equal is called Nakseo Ogudo (洛書五九圖). The original text's 五子各得 八十五數, 九宮共得 七百六十五數 refers exactly to this rule.

The numbers 1 through 33 are each used exactly once. The sum of each of the nine palaces is 85, which is five times the mean 17 of 1–33. Since adjacent palaces share edges, the structure has 9 × 5 = 45 positions (四十五子用), while the numbers actually written are 33 (三十三子作), and the multiplicity check is 9 × 85 = 561 + 204.

Palace Five numbers Sum
Upper-left 4, 20, 16, 23, 22 85
Upper-center 9, 16, 14, 28, 18 85
Upper-right 2, 14, 33, 21, 15 85
Middle-left 3, 31, 19, 22, 10 85
Center 5, 19, 26, 18, 17 85
Middle-right 7, 26, 25, 15, 12 85
Lower-left 8, 29, 11, 10, 27 85
Lower-center 1, 11, 24, 17, 32 85
Lower-right 6, 24, 30, 12, 13 85

Divided by the Five Phases, Water 112, Fire 119, and Wood 126 each appear seven times, while Metal 99 and Earth 105 each appear six times; because of the remainder structure 33 = 5 × 6 + 3, Water, Fire, and Wood each appear once more. Nevertheless, the partial sums of the nine palaces are all uniform at 85.

Nakseo Chilgudo

Nakseo Chilgudo

As shown in the figure above, a magic configuration in which each of nine palaces consists of one center and six surrounding numbers, and the sums of the seven numbers forming each palace are all equal, is called Nakseo Chilgudo (洛書七九圖). Its annotation is 七子各得二百二十四數, and the original constraints are: "the sum of the seven numbers of each palace is 224, and the numbers 1 through 63 are each written exactly once."

The numbers 1 through 63 are each used exactly once. The sum of every palace is 224, which is seven times the mean 32 of 1–63. Since 9 × 7 = 63, 作 (made) and 用 (used) coincide, so the diagram is an exact partition without overlap.

Palace Center Six surrounding numbers Sum
Upper-left 4 31, 43, 22, 60, 27, 37 224
Upper-center 9 15, 45, 36, 55, 10, 54 224
Upper-right 2 28, 29, 39, 62, 17, 47 224
Middle-left 3 30, 40, 26, 61, 16, 48 224
Center 5 32, 41, 23, 59, 14, 50 224
Middle-right 7 34, 38, 24, 57, 20, 44 224
Lower-left 8 35, 49, 12, 56, 11, 53 224
Lower-center 1 52, 25, 19, 63, 18, 46 224
Lower-right 6 33, 42, 21, 58, 13, 51 224

Nakseo Palgudo

Nakseo Palgudo

As shown in the figure above, a magic configuration in which the nine well (井) positions are left empty on a 7×7 grid and numbers are arranged in the eight surrounding cells of each is called Nakseo Palgudo (洛書八九圖). In the name O-pal-jeong-jeon-do (五八井田圖), 五八 = 40 is the total count of numbers written, and the eight cells each well obtains correspond to the 八 of 八子各得.

The numbers 1 through 40 are each used exactly once. By the annotation, the eight-cell sum of each of the nine wells is 164, which is eight times the mean 20.5 of 1–40. Due to overlap, the structure has 9 × 8 = 72 positions (七十二子用) while the actual numbers are 40 (四十子作), and the per-cell duplication degrees are: 16 cells belong to 1 well, 20 cells to 2 wells, and 4 cells to 4 wells.

The diagram as printed does not satisfy its annotation: only five of the nine wells sum to 164, and the others give 160, 163, 165 and 168. The Jung–Heo (2006) annotated translation also emends it; the table below is an emendation found independently with a solver, which changes six cells (two 3-cycles) so that all nine wells sum to 164.

Well (row, col) Eight numbers Sum
(1,1) 5, 11, 30, 36, 17, 1, 40, 24 164
(1,2) 30, 25, 9, 17, 29, 24, 18, 12 164
(1,3) 9, 32, 13, 29, 28, 12, 37, 4 164
(2,1) 1, 40, 24, 27, 23, 8, 26, 15 164
(2,2) 24, 18, 12, 23, 19, 15, 22, 31 164
(2,3) 12, 37, 4, 19, 16, 31, 10, 35 164
(3,1) 8, 26, 15, 33, 38, 7, 34, 3 164
(3,2) 15, 22, 31, 38, 20, 3, 14, 21 164
(3,3) 31, 10, 35, 20, 2, 21, 39, 6 164

The same eight-numbers-each rule pairs with the Hado-palodo, in which the palaces are divided exactly into five palaces (each palace sum likewise 164). Nakseo Palgudo can be seen as that rule spread with overlaps across nine wells.

Beomsu-yong-odo

Beomsu-yong-odo

As shown in the figure above, a magic configuration in which the horizontal and vertical axes share one center in a cross shape and the sums of the five numbers forming the axes are all equal is called Beomsu-yong-odo (範數用五圖). It is the case of two rays (n=2) in the radial magic-configuration family of Jungsang-yong-gudo.

The numbers 1 through 9 are each used exactly once. The sum of each of the two axes is 25; filling the pairs of numbers facing each other across the center 5 with complement pairs summing to 10 — (1,9), (2,8), (3,7), (4,6) — naturally derives 10 + 10 + 5 = 25. The multiplicity check is 2 × 25 = 45 + 5, reflecting that the center 5 is shared by both axes.

Axis Five numbers Sum
Horizontal axis 3, 7, 5, 4, 6 25
Vertical axis 2, 8, 5, 1, 9 25

It is also characteristic that the sums of the two numbers forming each of the four arms (rays) are all 10, and that each axis contains each of the Five Phases exactly once.

Jangchaek-yong-chil-do

Jangchaek-yong-chil-do

As shown in the figure above, a magic configuration in which three axes extend from one center at 60-degree intervals and the sums of the seven numbers forming the axes are all equal is called Jangchaek-yong-chil-do (章策用七圖). It is the case of three rays (n=3) in the radial family.

The numbers 1 through 19 are each used exactly once. The sum of each of the three axes is 68, and matching the sums of each pair of facing half-axis numbers all to 61 derives 61 + 7 = 68. Since the center 7 is shared by all three axes, the check is 3 × 68 = 190 + 2 × 7, and the sums of the six positions at equal distance from the center, grouped ring by ring, are all 61 = (190 − 7)/3.

Axis Seven numbers Sum
Vertical axis 5, 18, 9, 7, 12, 2, 15 68
Diagonal axis 4, 10, 19, 7, 1, 14, 13 68
Diagonal axis 8, 6, 17, 7, 3, 11, 16 68

Jungsang-yong-gudo

Jungsang-yong-gudo

This is about magic configurations in which numbers are arranged in a circular-plus-radial pattern. There are 2n+1 numbers on the rays and 2n numbers on each circumference, and the sum of the 2n+1 numbers on each ray equals the sum of the 2n numbers on each concentric circle plus the center number. In the Gusuryak, the case n=2 is named Beomsu-yong-odo, n=3 Jangchaek-yong-chil-do, and n=4 Jungsang-yong-gudo.

Again, we introduce the simplest way to derive the magic configuration. First, basically, radial magic configurations consist of an odd number of values, and the median of 1–33, namely 17, is placed at the very center. Then, arranging numbers at point-symmetric positions relative to the center so that they are complements with respect to 1+33=34 derives the configuration simply, because the numbers on a circle and the numbers on a ray are both expressed as sums of four complement pairs with respect to 34. Deriving concretely, 1 is placed at the top as in the figure above. Next, the position point-symmetric to 1 must be filled with 33 (the place marked yellow like 1), so after filling 2, 3, 4, the 5 must be filled not on the outermost circle but on the circle just inside it. Likewise, 9 and 13 are also each filled one circle inside compared to 5 and 9. Finally, after filling the circle numbers up to 16, the median 17 is placed at the center, and from 18 onward the numbers are filled in the reverse of the way 1–16 were filled.

The original magic configuration in the Gusuryak is as follows.

Jungsang-yong-gudo original

Nakseo Gugudo

Nakseo Gugudo 91 complement-pair reconstruction

As shown in the figure above, Nakseo Gugudo is a magic configuration using the numbers 1–81: the regular Nakseo (Lo Shu) magic square (3×3 array) with eight numbers surrounding each of its nine entries. Adding the eight surrounding numbers to the center number gives the same total, 369, in every case.

The simplest derivation is to arrange the numbers 10–81 in pairs summing to 91, as in the figure above. However, if one simply places four complement pairs summing to 91 around the numbers of the Nakseo magic square, the sums of the eight elements forming each octagon are equal, but they differ because of the central numbers 1–9. Therefore, as in the figure below, one pair is slightly modified so that the pair sums appear once each from 4 less than 91 (87) to 4 more than 91 (95). Then the two numbers summing to 87 are placed in the octagon around 9, those summing to 88 in the octagon around 8, and so on, and the two numbers summing to 95 in the octagon around 1, completing the magic configuration.

Nakseo Gugudo source reading

Source reading

Nakseo Gugudo source reading

The palaces are laid out as the Luoshu itself, 四·九·二 / 三·五·七 / 八·一·六. Reading each palace as center number, then ring clockwise from the upper-left cell, gives an arrangement different from the 91 complement-pair reconstruction above.

In this reading, the 91 complement-pair rule mostly disappears, and instead a mod-9 transversal rule holds exactly in every palace. The eight ring numbers of each palace carry the eight mod-9 residue classes exactly once each, except that the residue class of its own center is missing. Hence each whole cluster (center + ring) is a complete transversal carrying the mod-9 residues 0–8 exactly once each, and since the residue sum 36 ≡ 0 (mod 9), every cluster sum is a multiple of 9, making 369 = 9 × 41 natural.

Palace (center) Ring of 8 Ring sum Total Missing mod-9 residue
四 (4) 15, 80, 61, 23, 28, 72, 39, 47 365 369 4
九 (9) 49, 57, 17, 73, 41, 25, 65, 33 360 369 0
二 (2) 54, 43, 67, 10, 59, 21, 78, 35 367 369 2
三 (3) 11, 76, 60, 36, 19, 68, 52, 44 366 369 3
五 (5) 29, 24, 62, 37, 70, 81, 48, 13 364 369 5
七 (7) 74, 26, 55, 31, 42, 50, 66, 18 362 369 7
八 (8) 16, 51, 56, 27, 64, 32, 40, 75 361 369 8
一 (1) 69, 34, 77, 12, 53, 58, 45, 20 368 369 1
六 (6) 38, 79, 14, 63, 22, 46, 30, 71 363 369 6

The nine numbers belonging to residue class r (mod 9), {r, r+9, …, r+72}, are spread one per palace across the nine palaces, and in the palace whose center is r only r itself (the center) remains. The annotated sum 369 holds together with this mod-9 distribution rule.

The annotated translation of Jung and Heo (Gyowoosa, 2006, p. 210) notes that this figure is found neither in the Yang Hui suanfa nor in the Suanfa tongzong. It describes the figure as a division of 1–81 into nine groups of nine with equal sums 369, in which 1–9 belong to different groups and are placed as in the Luoshu, and the other eight numbers of each group surround its centre in an octagon.

Huchaek-yong-gudo

Huchaek-yong-gudo

As shown in the figure above, this refers to a magic configuration in which 13 octagons and 12 squares are arranged, the sums of the eight numbers forming the octagons are all equal, and the sums of the four numbers forming the squares are all equal. There are 72 elements in total from 1 to 72; the sum of the eight numbers forming an octagon is 292, and the sum of the four numbers forming a square is 146.

First, in this magic configuration, if the two elements forming the diagonal sides (↗, ↘) of the octagons are made to sum to 73, the sum of the eight numbers forming an octagon is naturally derived as 73 × 4 = 292. Then, as in the magic configuration above, the numbers 1–36 are arranged in the turquoise-colored sections, and numbers are filled in increasing order by 1 from the top, based on the turquoise-colored section, so that the sum of the two elements on the left side of the leftmost square becomes 74. Next, using the same strategy on the right part of the octagons, filling numbers from top to bottom in increasing order by 1 based on the turquoise-colored section naturally makes the sum of the two elements on the right side of the left square 72, satisfying the square four-number sum condition 146. Furthermore, if the three left octagons are filled with the numbers 1–12 and 61–72, the three middle octagons can be filled in the same manner with the numbers 13–24 and 49–60, and the three right octagons likewise with the numbers 25–48. This method can be generalized and extended to the case where the regular octagon/regular square arrangement forms an (8,8,4) truncated-square tessellation, and to the case where the regular octagons are arranged in a rectangular grid.

Junggwae-yong-paldo (Paljin-do)

Junggwae-yong-paldo

This magic configuration, embodying the principle of Zhuge Liang's Eight Formations, groups the natural numbers 1 through 64 into sets of eight to form eight formations in total. Its basic design places four complement pairs summing to 65 in one formation so that each formation totals 260. Examining the arrangement, six of the eight formations fill their totals cleanly with four self-contained complement pairs summing to 65 each without any external interference, but the two formations at the upper-left and upper-right adopt a local adjustment in which halves of some complement pairs are exchanged with each other. That is, the complements of a specific four numbers placed in the upper-left formation move to the upper-right formation and their counterpart numbers come over in return; since the sum of these exchanged four numbers is still exactly 130, both corner formations satisfy the standard formation sum of 260 precisely, together with the complete two complement pairs summing to 130.

Gichaek-yong-paldo

Gichaek-yong-paldo

As shown in the figure above, a magic configuration in which four regular octagons are arranged around a central square sharing one edge (two vertices) with adjacent octagons, and the sums of the eight numbers forming the octagons are all equal, is called Gichaek-yong-paldo (奇策用八圖).

The numbers 1 through 24 are each used exactly once. The eight-number sum of each of the four octagons is 100, and since the sum of the eight numbers {5, 6, 7, 8, 17, 18, 19, 20} shared by adjacent octagons is exactly 100, the check 4 × 100 = 300 + 100 holds. Furthermore, the core balance of this magic configuration is that, within each octagon, the sum of the four shared numbers and the sum of the four unshared numbers split evenly, both at 50.

Octagon Eight numbers Sum
Top 4, 9, 14, 23, 5, 8, 19, 18 100
Left 8, 5, 15, 22, 3, 10, 20, 17 100
Right 1, 12, 18, 19, 6, 7, 13, 24 100
Bottom 7, 6, 17, 20, 2, 11, 16, 21 100

The shared edges are top∩left {5,8}, top∩right {18,19}, left∩bottom {17,20}, right∩bottom {6,7}.

Cross-shaped graphs

The Gusuryak uses the sentence structure "N子各得M數" when describing partial sums. Although some printed editions omit the names of the magic configurations, the names are given here based on the Gyou-sa edition.

The Gusuryak labels the mod-5 residue classes as follows.

n mod 5 ≡ 1 (Water, 수)

n mod 5 ≡ 2 (Fire, 화)

n mod 5 ≡ 3 (Wood, 목)

n mod 5 ≡ 4 (Metal, 금)

n mod 5 ≡ 0 (Earth, 토)

The magic configurations of this family are classified by residue group.

Hado-saodo

Hado-saodo

Group Slots Sum
Water 1, 6, 11, 16 34
Fire 2, 7, 12, 17 38
Wood 3, 8, 13, 18 42
Metal 4, 9, 14, 19 46
Earth 5, 10, 15, 20 50

This magic configuration became the prototype of the ones below.

The sums accumulated until moving to the next group in the order Water → Fire → Wood → Metal → Earth form an arithmetic progression.

Also, the Water group and the Earth group are point-symmetric, the Fire group and the Metal group are point-symmetric, and the Wood group is gathered in the left palace.

The Water group is mod 1, the Earth group is mod 0, the Fire group is mod 2, and the Metal group is mod 4.

Written in order as [1, 2, 3, 4, 0], 0 and 1 are symmetric, 2 and 4 are symmetric, and 3 is the center number.

Adding the sums of the Water group and the Earth group and dividing by 2 gives the sum of the Wood group.

Adding the sums of the Fire group and the Metal group and dividing by 2 gives the sum of the Wood group.

Source text

一六水 二七火 三八木 四九金 五十土 此圖水土相涵 金火相守 兩木相摩 傳曰 木與木相摩則然 金與火相守則流

Source Translation
一六水 二七火 三八木 四九金 五十土 1 and 6 are Water, 2 and 7 Fire, 3 and 8 Wood, 4 and 9 Metal, 5 and 10 Earth.
此圖水土相涵 In this diagram Water and Earth are steeped in each other.
金火相守 Metal and Fire keep to each other (stay together).
兩木相摩 The two Woods rub against each other.
傳曰 木與木相摩則然 It is handed down: when wood rubs against wood, it catches fire;
金與火相守則流 when metal stays with fire, it (melts and) flows.

The two lines after 傳曰 quote Zhuangzi, "External Things" (外物): "木與木相摩則然,金與火相守則流". 然 is neither a misprint nor a loose phonetic loan. It is the original character for "to burn" (Shuowen Jiezi: "然,燒也"). 燃 is a later form that added another 火 after 然 came to mean mostly "so, thus". "則然" therefore reads "then it catches fire".

Reinterpretation: the three types of complement pair

All five palaces (2×2 blocks) of the Hado-saodo sum to 42, and each splits exactly into two complement pairs with sum 21.

Palace Four numbers Complement pairs (sum 21) Phase content Source phrase
Top 19, 2, 7, 14 (2,19), (7,14) Fire 2, Metal 2 金火相守
Right 4, 17, 12, 9 (4,17), (9,12) Fire 2, Metal 2 金火相守
Centre 5, 16, 11, 10 (5,16), (10,11) Water 2, Earth 2 水土相涵
Bottom 15, 1, 6, 20 (1,20), (6,15) Water 2, Earth 2 水土相涵
Left 13, 8, 18, 3 (3,18), (8,13) Wood 4 兩木相摩

Because 21 ≡ 1 (mod 5), the involution n ↦ 21 − n acts on the phase labels as r ↦ 1 − r (mod 5). It sends Water (1) ↔ Earth (0), Fire (2) ↔ Metal (4) and Wood (3) ↔ Wood (3). This involution has exactly three orbit types, and the phrases 水土相涵 · 金火相守 · 兩木相摩 list all three. Wood is its unique fixed point (self-complementary), so its partner is again Wood. That is why "two Woods" form a pair and all four Wood numbers sit together in the left palace. The palace sum 42 follows as 2 × 21, and 34 + 50 = 38 + 46 = 2 × 42 above is the same involution seen at the level of whole groups.

The Zhuangzi lines after 傳曰 are read as a literary gloss that attaches images from nature to these three pairings.

Testing the Wood × Wood multiplicative reading

One reading takes 相摩 as multiplication, so that the product of Wood numbers would produce the Fire group. We tested it the same way on every diagram in this article.

  • Mod 5, Wood · Wood = 3 · 3 = 9 ≡ 4, which is Metal. Of the 134 Wood·Wood pairs that lie inside a palace across 17 diagrams, none has a Fire product. This is an algebraic fact and holds for any layout.
  • Reducing products mod N or mod C (the complement sum) and checking against the diagram's Fire numbers gives 8/134 and 38/134, against a base-rate expectation of about 27.0. After Bonferroni correction p ≈ 0.04, which is borderline, but the phase of the product shifts with the quotient, so there is no structural reason.
  • The Wood (left) palace of the Saodo holds no Fire element, so "catches fire" is not reflected in the layout either.

Reading 則然 as the result of a product therefore does not hold. As a side structure, the pair product n·(21−n) mod 5 is Earth for a Water–Earth pair, Wood for a Fire–Metal pair and Metal for a Wood–Wood pair, so under multiplication 相守 and 相摩 trade elements. Fire arises only as Wood³ ≡ 2 or Wood · Metal ≡ 2.

Wood is self-complementary only when the complement sum satisfies C ≡ 1 (mod 5), and only then do the three types Water–Earth, Fire–Metal and Wood–Wood appear. The Nakseo-sagudo (all 9 palaces split into these three types), Nakseo-palgudo, Hado-chilodo, Hado-palodo, Hado-guodo and Nakseo-yukgodo belong to this family. In the Hado-palodo in particular, each palace's phase content repeats the Saodo's, with the same type in the same position. In other families Wood's partner changes: Fire when C ≡ 0 (Beomsu-yong-odo, Jangchaek-yong-childo, Junggwae-yong-paldo, Gichaek-yong-paldo), Metal when C ≡ 2, Earth when C ≡ 3 and Water when C ≡ 4.

Reading Verdict
相摩 = product mod 5, Wood·Wood → Fire Rejected (always Metal, 134/134)
相摩 = product reduced mod N or mod C Borderline, no structural reason
相涵·相守·相摩 = the three orbit types of the complement involution n ↦ C−n Accepted
則然·則流 = Five-Phase images quoted from Zhuangzi Accepted

For details see Source-text reinterpretation and Wood-product audit.

Generalized sequence

The five groups, centered on the Wood group, yield the following symmetric relationships when the sums of the groups are compared.

Group Sum difference from Wood group Slots Sum
Water -8 1, 6, 11, 16 34
Fire -4 2, 7, 12, 17 38
Wood 0 3, 8, 13, 18 42
Metal 4 4, 9, 14, 19 46
Earth 8 5, 10, 15, 20 50

Hado-chilodo

Hado-chilodo

Five hexagonal clusters are laid out in a cross; each has a centre and six vertices. The annotation is 七子各得一百二十六數: each group of seven obtains 126. The numbers 1–35 are each used once, so 5 × 126 = 630 = 1 + 2 + … + 35.

Vertices are listed clockwise from a starting vertex. The top and bottom hexagons have a vertex at the top, which is the starting vertex; the left, centre and right hexagons have an edge at the top, and the starting vertex is its left end.

Direction Center Vertices Sum
Top 2 7, 24, 34, 11, 19, 29 126
Left 3 18, 33, 23, 13, 28, 8 126
Center 5 31, 20, 12, 26, 10, 22 126
Right 4 15, 27, 9, 25, 32, 14 126
Bottom 1 16, 21, 30, 6, 17, 35 126

Since 36 ≡ 1 (mod 5), n ↦ 36 − n exchanges Water and Earth and Fire and Metal, and keeps Wood. The left cluster is the whole Wood class (3, 8, 13, 18, 23, 28, 33): (3, 33), (8, 28), (13, 23) are complement pairs and 18 is the fixed point. Each other cluster holds two complement pairs summing to 36 and three numbers summing to 54.

Direction Complement pairs (sum 36) Pair type Remaining three Sum
Top (2, 34), (7, 29) Fire–Metal 24, 11, 19 54
Right (4, 32), (27, 9) Fire–Metal 15, 25, 14 54
Center (5, 31), (26, 10) Water–Earth 20, 12, 22 54
Bottom (1, 35), (30, 6) Water–Earth 16, 21, 17 54

Top and right are 金火相守, centre and bottom 水土相涵, and left 兩木相摩: the pair types sit where they sit in the Hado-saodo. The phase class sums are Water 112, Fire 119, Wood 126, Metal 133, Earth 140 (step 7), and the Wood sum equals the cluster sum.

Hado-palodo

Hado-palodo

The total sum of all numbers is 820, and the sum of the 8 numbers belonging to each palace is equal at 164.

Connecting the nodes geometrically adjacent within each palace yields a single independent 8-cycle graph. The whole magic configuration is a composite graph of five 8-cycle grids arranged in a cross shape.

Palace Node cycle order Sum
Upper palace 19 → 34 → 7 → 39 → 12 → 24 → 2 → 27 → 19 164
Left palace 18 → 33 → 8 → 38 → 13 → 23 → 3 → 28 → 18 164
Center palace 16 → 30 → 5 → 21 → 15 → 36 → 10 → 31 → 16 164
Right palace 4 → 22 → 14 → 37 → 9 → 32 → 17 → 29 → 4 164
Lower palace 1 → 25 → 11 → 40 → 6 → 35 → 20 → 26 → 1 164

Transitivity of the center palace

The 12 outer connection lines linking palace to palace all pass through the center palace. In particular, the four corner nodes of the center palace (30, 21, 31, 36) connect simultaneously to two adjacent outer palaces in addition to their internal neighbors, have degree 4, and have the highest betweenness centrality.

Wuxing partition and equal-sum property

Classifying the numbers 1 through 40 by their remainder modulo 5, the total sum of each wuxing class forms an arithmetic progression increasing by 8.

Wuxing Residue class (n mod 5) Elements Sum
Water 1 1, 6, 11, 16, 21, 26, 31, 36 148
Fire 2 2, 7, 12, 17, 22, 27, 32, 37 156
Wood 3 3, 8, 13, 18, 23, 28, 33, 38 164
Metal 4 4, 9, 14, 19, 24, 29, 34, 39 172
Earth 0 5, 10, 15, 20, 25, 30, 35, 40 180

The wuxing placement of each palace was adjusted to derive the balance value 164.

  • Left palace: monopolizes the eight Wood-group elements to satisfy the sum 164.
  • Upper and right palaces: mix four Metal (172) and Fire (156) elements each to satisfy the mean value 164.
  • Center and lower palaces: mix four Earth (180) and Water (148) elements each to satisfy the mean value 164.

Partial sums by position

Dividing the 8 positions of each palace into 4 corners and 4 edge midpoints reveals an internal arithmetic balance. The edge-midpoint sums increase by 2, the corner sums decrease correspondingly, and the final total 164 is maintained.

Palace Corner sum Edge-midpoint sum Total
Upper palace 124 40 164
Left palace 122 42 164
Center palace 118 46 164
Right palace 120 44 164
Lower palace 126 38 164

Generalized sequence

The palace sum rule follows an arithmetic progression model determined by the central parameter M0. The central design of the sequence, M0 = 3, corresponds to this magic configuration, and the Wood group total serves as the reference point.

M0 Sum per palace
1 148
2 156
3 164
4 172
5 180

Hado-guodo

Hado-guodo

The total sum of all numbers is 1035, and the sum of the 9 numbers belonging to each palace is equal at 207.

Unlike the Hado-palodo, which leaves the center empty, it has a 3×3 grid graph structure with the center cell filled. Each palace consists of 9 nodes and 12 edges, and the minimum cycle length is 4. The whole magic configuration is a single connected graph in which the outer palaces join around the center palace.

Palace Elements Sum
Upper palace 12, 44, 9, 19, 21, 29, 37, 2, 34 207
Left palace 13, 43, 8, 18, 25, 26, 38, 3, 33 207
Center palace 15, 41, 6, 16, 23, 30, 40, 5, 31 207
Right palace 14, 42, 7, 17, 24, 28, 39, 4, 32 207
Lower palace 11, 45, 10, 20, 22, 27, 36, 1, 35 207

Topological centrality

In the connectivity relations between palaces, the center node 23 of the center palace serves as the key gateway with the highest betweenness centrality. The shortest paths between outer palaces mostly pass through this center point.

Wuxing partition and total-sum balance

This is the wuxing distribution table classifying the numbers 1 through 45 by their remainder n mod 5. The total of each group forms an arithmetic progression increasing by 9.

Wuxing Residue class Elements Sum
Water 1 1, 6, 11, 16, 21, 26, 31, 36, 41 189
Fire 2 2, 7, 12, 17, 22, 27, 32, 37, 42 198
Wood 3 3, 8, 13, 18, 23, 28, 33, 38, 43 207
Metal 4 4, 9, 14, 19, 24, 29, 34, 39, 44 216
Earth 0 5, 10, 15, 20, 25, 30, 35, 40, 45 225

Unlike the Hado-palodo, there is no palace monopolizing a particular wuxing element; instead, each palace cross-arranges a different wuxing combination so that all palace sums are unified at 207, the Wood group total.

Partial sums by position and unique invariants

Dividing the 9 positions of each palace into 4 corners, 4 edge midpoints, and 1 center yields the fixed invariants and regularities unique to Guja-gakdeuk. The sum of the 4 corner numbers is exactly 92 in every palace.

Palace Corner sum Edge-midpoint sum Center Total
Upper palace 92 94 21 207
Left palace 92 90 25 207
Center palace 92 92 23 207
Right palace 92 91 24 207
Lower palace 92 93 22 207

Center placement: the center values of the five palaces consist of consecutive integers from 21 to 25. Each corresponds in turn to the wuxing Water (21), Fire (22), Wood (23), Metal (24), and Earth (25), and corresponding to the central parameter M0 = 3 Wood, 23 is located at the center of the center palace.

Mutual complement rule: the edge-midpoint sums form an integer sequence increasing by 1 from 90 to 94, corresponding inversely to the center values in magnitude. The sum of the edge-midpoint sum and the center is always fixed at 115, which combines with the corner-sum invariant 92 to maintain the final total 207.

Generalized sequence

The palace sum rule follows an arithmetic progression model determined by the central parameter M0. Each time M0 increases by 1, the palace sum increases by 9, and the central design of the sequence, M0 = 3, corresponds to this magic configuration.

M0 Sum per palace
1 189
2 198
3 207
4 216
5 225

Cheonsu-yong-odo

Cheonsu-yong-odo

This is called the Yang Hui diagram, and the sums by class are as follows.

Label Elements Sum Count
Water 1, 6, 11, 16, 21 55 5
Fire 2, 7, 12, 17 38 4
Wood 8, 13, 18, 23 62 4
Metal 4, 9, 14, 19, 24 70 5
Earth 5, 15, 20 40 3

Of the numbers 1 through 25, all except 3, 10, 22, and 25 are used.

Because of the missing numbers, the arithmetic progression relation does not hold even when all elements of the five classes are added together, but the diagram is left-right symmetric about the center of the magic configuration.

Cheonsu-yong-odo (revised)

Cheonsu-yong-odo revised Cheonsu-yong-odo petal point symmetry

Among the diagrams Choi Seok-jeong revised is the following Cheonsu-yong-odo, which has a rose-like point symmetry.

This is a Cheonsu-yong-odo using all numbers from 1 to 21, carried in Ha-nak-byunsu of the Jung (correct) volume of the Gusuryak.

Choi Seok-jeong attached the following note:

楊輝圖取數幕越 不可爲法 故今改定如此 去中宮十五 外合得二百一十六 應乾之策 每宮各得五十四爲六九之數 ○二十一子作二十五子用同前

"In Yang Hui's diagram the numbers taken overstep (幕越) the proper sequence, so it cannot serve as a rule. I have therefore revised it as shown here. Leaving aside the 15 of the central palace, the outer counters total 216, which answers to the stalks of qian (乾之策); each palace obtains 54, the number six times nine. As before, twenty-one counters are made and twenty-five places used."

This explains the partial sums excluding the center palace, the main characteristic of this diagram.

Let us show the sums of all palaces at this time.

Label Elements Sum
Top 5, 12, 2, 17, 18 54
Bottom 1, 6, 16, 10, 21 54
Left 3, 13, 11, 7, 20 54
Right 4, 19, 14, 9, 8 54
Center 15, 2, 6, 20, 9 52

As in the explanatory text, all sums except the center palace are equal at 54.

Label Elements Sum Count
Water 1, 6, 11, 16, 21 55 5
Fire 2, 7, 12, 17 38 4
Wood 3, 8, 13, 18 42 4
Metal 4, 9, 14, 19 46 4
Earth 5, 10, 15, 20 50 4

Nakseo Yukgodo

Nakseo Yukgodo

Nakseo Yukgodo abacus reconstruction

The reconstruction of the above magic configuration may admit other interpretations; a readable transcription of the original is attached.

Nakseo Yukgodo is a magic configuration arranging the natural numbers 1 through 270 on a regular hexagonal grid with ten cells along each side. The complete grid has 271 cells including the center, but since it adopts the structure of leaving one void (heoyil, 虛一) with the middle cell empty, the cells actually holding numbers are 270.

The total number of cells of a hexagonal grid of radius 9 is as follows.

1 + 6(1 + 2 + ··· + 9) = 271

Excluding the one center cell leaves the following 270 cells.

271 - 1 = 270

In the 구수략, this number is also explained as six times the sum of 1 through 9, namely 45.

45 × 6 = 270

The outermost ring of the grid consists of 54 cells, and a straight line through the center joining two facing vertices contains 19 positions including the empty center cell.

Interpretation via visualizing the number sequence

The Gyou-sa translation of the Gusuryak takes the upper handwritten annotation "Naekjeok-beop" (來積法) and the main text as a solution to a simple bundle-of-arrows (original counting-rods) problem, counting cells and viewing it as visualizing the arithmetic progression increasing in the pattern 1+6+12+18+..., namely the Cho-yuk-che-ga of the Gusuryak. In this interpretation, the sequence properties of Nakseo Yukgodo are as follows.

Since the k-th ring at distance k from the center consists of 6k cells, the ring cell counts form an arithmetic progression 6, 12, 18, …, 54 with common difference 6. The cumulative cell count up to the k-th ring is as follows.

1 + 6(1 + 2 + ··· + k) = 1 + 3k(k + 1)

At k = 9 this value equals 1 + 270 = 271, the total cell count, and this corresponds to six times 1 + 2 + ··· + 9 = 45, namely the 逓加洛書數六倍 ("successively adding the Lo Shu numbers, sixfold") spoken of in the 구수략.

The abacus calculation of Naekjeok-beop reads as this number sequence laid out like a chain. First, 6 is added to the outer circumference 54 to obtain 60 (置外周添六淂六十 乃六觚數也). Dividing this by 6 gives 10, doubling it and subtracting 1 gives 19, the Jung-go-su (中觚數) (倍之得二十減一為十九為中觚數也). Afterwards 252 is obtained in the addition process (折半淂二百五十二), and finally adding the 19 set aside to it reaches 271 (加…寄左十九淂二百七十一).

The upper figure is a reconstruction satisfying the check conditions of the diagram.

Alternative interpretation: antipodal complement relations

However, viewing the original passages of Naekjeok-beop as not necessarily a solution explicitly meaning an arithmetic progression, we present a reconstruction, as in the lower figure, recovered by back-tracing the abacus calculation traces and the sequence remaining in the original. The two arrangements satisfy the same geometric conditions, but the concrete placement order of the numbers differs from each other.

In the reconstructed arrangement, the sum of the two numbers placed in each antipodal pair is 271.

v(x, y) + v(-x, -y) = 271

Thus numbers summing to 271, like 1 and 270, 2 and 269, 3 and 268, are placed at point-symmetric positions about the center. This condition also keeps various partial sums of the hexagonal grid constant.

Sums of the hexagonal rings

The k-th ring at distance k from the center consists of 6k cells. These cells divide into 3k antipodal pairs, so the sum of the numbers placed in the k-th ring is as follows.

271 × 3k = 813k

Therefore the sum of each ring increases by 813 as it moves away from the center.

Ring Cells Antipodal pairs Sum
1st 6 3 813
2nd 12 6 1626
3rd 18 9 2439
⋮ ⋮ ⋮ ⋮
9th 54 27 7317

Sums of the central axes

A hexagon has three directions of axes joining facing vertices and passing through the center. On each axis, numbers are placed on the 18 cells excluding the empty center cell, and these form 9 antipodal pairs.

Therefore the sums of the numbers on the three central axes are all as follows.

271 × 9 = 2439

Sum of the vertices

The six vertices of the outermost hexagon form three antipodal pairs about the center. Therefore the sum of the numbers placed at the six vertices is always as follows.

271 × 3 = 813

These ring sums, axis sums, and vertex sums hold from the antipodal complement relation alone, regardless of the concrete placement order of the individual numbers.

Partial sums of the outer boundary and regions

The arrangement in the original is composed not only with the antipodal complement relation but also with additional balance on the outer boundary sides and inner regions.

Each side of the outermost hexagon holds 10 numbers, and the sums of the six sides are each 1355.

1355 = 271 × 5

That is, the column of numbers on each side achieves a sum corresponding to five complement pairs in total. However, each number within one side does not necessarily form its complement pair within the same side; in the actual arrangement, the sums of the six sides are equalized through exchanges with adjacent sides.

The sums of the six sector regions divided from the center outward alternate between 6097 and 6098 by region. The sum of all numbers is as follows.

1 + 2 + ··· + 270 = 36585

Since this cannot be divided into exactly equal integer sums over six regions, setting three regions to 6097 and the remaining three regions to 6098 matches the total.

6097 × 3 + 6098 × 3 = 36585

In the six ray regions extending in the vertex directions, two kinds of sums alternate for the same reason. Depending on the cell count and overlapping scheme of each region, the sums divide into 1219 and 1220.

This difference of 1 is not an imbalance of the arrangement but an inevitable integer error arising when distributing an odd total sum into six symmetric regions.

Reconstructing the arrangement using the original abacus calculation

In the abacus calculation traces remaining in the original, the following sequence with 271 as modulus and increasing by 6 is confirmed.

v(t) = 6t mod 271

Here t is an integer from 1 to 270, and no case yields remainder 0. Since 271 is prime and coprime to 6, this formula generates each of the numbers 1 through 270 exactly once without repetition.

t Calculation v(t)
1 6 × 1 mod 271 6
2 6 × 2 mod 271 12
3 6 × 3 mod 271 18
⋮ ⋮ ⋮
45 6 × 45 mod 271 270
46 6 × 46 mod 271 5
47 6 × 47 mod 271 11
⋮ ⋮ ⋮
270 6 × 270 mod 271 265

This sequence proceeds as follows.

6, 12, 18, …, 264, 270, 5, 11, 17, …

The values corresponding to the two terms t and 271 - t of the sequence are complements of each other.

v(271 - t) = 271 - v(t)

Therefore, placing the two terms at coordinates facing each other about the center automatically establishes the antipodal pair sum 271 and supports the complement-pair interpretation.

Coordinate placement and the nature of the reconstruction

The sequence formula alone does not completely determine the final arrangement of Nakseo Yukgodo, because different arrangements can be made depending on the order in which the hexagonal grid is traversed and which coordinates each number is mapped to, even when using the same sequence.

In the reconstruction process, the following two elements were tracked together, comparing the abacus calculation order of the original with the numbers remaining in the diagram.

  • The order of the numbers generated according to 6t mod 271
  • The path of movement on the hexagonal grid corresponding to each generated number

The lower reconstruction diagram is the arrangement obtained by combining these two sources. Therefore this figure is not a newly made arrangement merely satisfying the antipodal-pair condition, but a result of reconstructing the placement order of that time based on the calculation traces remaining in the original.

However, modern coordinate formulas or complete algorithms are not directly written in the original. The concrete traversal path and the positions of some numbers were reconstructed by synthesizing the abacus calculation traces, the partial-sum conditions, and the symmetry conditions.

Mathematical characteristics

Unlike ordinary square magic squares, Nakseo Yukgodo is not a structure that makes the sums of all rows and columns equal. Instead it controls several kinds of partial sums simultaneously using the symmetry of the hexagonal grid.

  • The natural numbers 1 through 270 are each used once.
  • One center cell is left empty.
  • The sum of two numbers facing each other about the center is 271.
  • The sum of the k-th hexagonal ring is 813k.
  • The sums of the three central axes are each 2439.
  • The sum of the six vertices is 813.
  • The sums of the six outer sides are each 1355.
  • The sums of the six symmetric regions alternate between two values dividing the total sum as evenly as possible.

Therefore Nakseo Yukgodo can be seen not as a diagram having only one magic constant, but as a composite magic configuration in which different equal-sum conditions overlap at the point symmetry, the hexagonal rings, the central axes, the outer sides, and the sector regions.

Original text

來積法

置外周

置外周添六淂六十 乃六觚數也 六歸之淂敉折半加一合總六 而一得一十乃每一包敉也

倍之得二十減一為十九為中觚數也 寄左以攻位十八加八一十淂二十八荡棠另 置外周五十四以一除之得九荡法目之得二百五十二倍之得五百四 折半淂二百五十二 加八寄左十九淂二百七十一合從九目淂二百五十二 不倍之加八寄左十九苁合從 去中觚為而假樣也 以樣田言之十八下廣?九也廣相?假積倍之得?共中觚數

The parts marked ? are damaged so that the letterforms cannot be identified.

See also

Clone this wiki locally