欢迎光临散文网 会员登陆 & 注册

[Series] Magic Squares

2021-07-07 20:56 作者:AoiSTZ23  | 我要投稿

By: Tao Steven Zheng (郑涛)

【Problem】

A magic square is the arrangement of consecutive integers 1%2C2%2C3%2C%E2%80%A6%2Cn%5E2 such that sums of the numbers in each row, column, and the two main diagonals are the same number. This sum is called the “magic constant”. In the "Xugu Zhaiqi Suanfa" 《续古摘奇算法》, the Chinese mathematician Yang Hui (杨辉, c. 1238 – 1298 AD) gave solutions to magic squares 3%C3%973%20 from to 10%C3%9710.

Determine the “magic constant” of the 10%C3%9710 magic square.

 

【Solution】

Let M_n represent the “magic constant” of a n%C3%97n%20 magic square. The “magic constant” is determined as follows: add all the numbers in the magic square together; then divide by the number of rows (or columns).

M_n%3D%5Cfrac%7B1%2B2%2B3%2B%E2%8B%AF%2Bn%5E2%7D%7Bn%7D

or

M_n%3D%5Cfrac%7B1%7D%7Bn%7D%20%5Csum_%7Bk%3D1%7D%5E%7Bn%5E2%7Dk

The formula for calculating the sum of consecutive positive integers is

%5Csum_%7Bk%3D1%7D%5E%7Bp%7Dk%3D%5Cfrac%7Bp(p%2B1)%7D%7B2%7D

Let p%3Dn%5E2, then

%5Csum_%7Bk%3D1%7D%5E%7Bn%5E2%7D%3D%5Cfrac%7Bn%5E2(n%5E2%2B1)%7D%7B2%7D

Therefore,

M_n%3D%5Cfrac%7Bn%5E2(n%5E2%2B1)%7D%7B2n%7D

Thus, the “magic constant” for a n%C3%97n magic square is

M_n%3D%5Cfrac%7Bn(n%5E2%2B1)%7D%7B2%7D

The "magic constant" of a 10%5Ctimes%2010 magic square is

M_%7B10%7D%3D%5Cfrac%7B10(10%5E2%2B1)%7D%7B2%7D%3D505

Magic squares




[Series] Magic Squares的评论 (共 条)

分享到微博请遵守国家法律