Chinese literature dating from as early as 2800 BC tells the legend of The "Lo Shu Magic Square" or "scroll of the river Lo".
Roughly three thousand years ago in ancient China, a great flood happened. The people, sensing that the river god ("Lo") was upset, tried to offer sacrifices to calm his anger. Each time they made an offering, a turtle would appear from the river.
It had a curious figure/pattern on its shell; there were circular dots of numbers that were arranged in a three by three nine-grid pattern such that the sum of the numbers in each row, column and diagonal was the same: 15. This number was also equal to the number of days in each of the 24 cycles of the Chinese solar year. This pattern, in a certain way, was used by the people to control the river.
After studying these markings the people realized the correct amount of sacrifices to make - 15 - and consequently, the river god was placated.This pattern is called a "magic square", in that each column and the two diagonals add up to the same number. The legend of the Lo Shu Turtle is told in The Book of Rites, one of the five classical texts of ancient China.