King Wen sequence

The King Wen sequence is an arrangement of the sixty-four divination figures in the I Ching (often translated as the Book of Changes). They are called hexagrams in English because each figure is composed of six 爻 yáo—broken or unbroken lines, that represent yin or yang respectively.

The King Wen sequence is also known as the "received" or "classical" sequence because it is the oldest surviving arrangement of the hexagrams. Its true age and authorship are unknown. Traditionally, it is said that King Wen of Zhou arranged the hexagrams in this sequence while imprisoned by King Zhou of Shang in the 12th century BC. A different arrangement, the "binary sequence" named in honor of the mythic culture hero Fu Xi, originated in the Song Dynasty. It is believed to be the work of scholar Shao Yong (1011–1077 AD). As mirrored by the 先天 Earlier Heaven and 後天 Later Heaven arrangements of the eight trigrams, or ba gua, it was customary to attribute authorship to these legendary figures. Of the two hexagram arrangements, the King Wen sequence is, however, of much greater antiquity than the Fu Xi sequence.

Structure of the sequence
The 64 hexagrams are grouped into 32 pairs. For 28 of the pairs, the second hexagram is created by turning the first upside down (i.e. 180° rotation). The exception to this rule is for the 8 symmetrical hexagrams that are the same after rotation (1 & 2, 27 & 28, 29 & 30, 61 & 62). Partners for these are given by inverting each line: solid becomes broken and broken becomes solid. These are indicated with icons in the table below.

Given the mathematical constraints of these simple rules, the number of lines that change within pair partners will always be even (either 2, 4, or 6). Whereas the number of lines that change between pairs depends on how the pairs are arranged, and the King Wen sequence has notable characteristics in this regard. Of the 64 transitions, exactly 48 of them are even changes (32 within-pairs plus 16 between-pairs) and 16 are odd changes (all between-pairs). This is a precise 3 to 1 ratio of even to odd transitions. Of the odd transitions, 14 are changes of three lines and 2 are changes of one line. Changes of five are absent. Each transition within a pair appears to be the correlating opposite of the other transition within the pair.

Dual hexagrams
The I Ching book was traditionally split up in two parts with the first part covering the first 30 hexagrams of the King Wen sequence and the second part with the remaining 34. The reason for this was not mentioned in the classic commentaries but was explained in later Yuan dynasty commentaries: 8 hexagrams are the same when turned upside down and the other 56 present a different hexagram if inverted. This allows the hexagrams to be displayed succinctly in two equal columns or rows of 18 unique hexagrams each; half of the 56 invertible hexagrams plus the 8 non-invertible.

Explanation
Over the centuries there were many attempts to explain this sequence. Some basic elements are obvious: each symbol is paired with an "upside-down" neighbor, except for 1, 27, 29, and 61 which are "vertically" symmetrical and paired with "inversed" neighbors.

There have been recent attempts to apply mathematical combinatorics in explaining the logic behind the King Wen sequence, for example Richard S. Cook's proposal.

Other hexagram sequences

 * Binary sequence, also known as Fu Xi sequence or Shao Yong sequence
 * Mawangdui sequence
 * Eight Palaces sequence (attributed to Jing Fang).