The King Wen sequence (Chinese: 文王卦序) 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.
A different arrangement, the "binary sequence" named in honor of the mythic culture hero Fu Xi, originated in the Song dynasty.
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).
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.