三阶幻方

  • 时间:2020-04-13 15:09:45
  • 分类:数学世界
  • 阅读:195 次

三阶幻方:把1—9 这九个自然数填在九空格里(三行三列的表格),使横、竖和对角线上三个数的和都等于15。

想:1+9=10,2+8=10,3+7=10,4+6=10。这每对数的和再加上5 都等于15,可确定中心格应填5,这四组数应分别填在横、竖和对角线的位置上。

先填四个角,若填两对奇数,那么因三个奇数的和才可能得奇数,四边上的格里已不可再填奇数,不行。若四个角分别填一对偶数,一对奇数,也行不通。因此,判定四个角上必须填两对偶数。对角线上的数填好后,其余格里再填奇数就很容易了。

解:

4 9 2

3 6 7

8 6 6

上面是最简单的幻方,也叫三阶幻方。相传,大禹治水时,洛水中出现了一个“神龟”背上有美妙的图案,史称“洛书”,用现在的数字翻译出来,就是三阶幻方。

南宋数学家杨辉概括其构造方法为:“九子斜排。上下对易,左右相更。四维挺出。”具体方法是:

三阶幻方

推荐阅读:
How to Find the Largest Unique Number in Array (C++)?  How to Find the K-diff Pairs in an Array with Two Pointer or Has  String Algorithm: Reverse the first k characters for every 2k ch  How to Generate Parentheses using Bruteforce or Depth First Sear  Algorithm to Construct Binary Tree from Preorder and Inorder Tra  The 24 Game Algorithm using Depth First Search  How to Count the Path Sum from a Binary Tree using Depth First S  How to Multiply Two Matrices in C++?  How to Compute the Number of Equivalent Domino Pairs?  Stay In The Loop: Google Will Make Sure You Never Miss A Mention 
评论列表
添加评论