博客
关于我
【2014省赛试题】大衍数列
阅读量:328 次
发布时间:2019-03-04

本文共 650 字,大约阅读时间需要 2 分钟。

大衍数列:中国传统文化中的数学智慧

大衍数列是中国古代文献中的一种特殊数列,主要用于解释中国传统文化中的太极衍生原理。这种数列以其独特的生成规律,成为中国古代数学研究中的重要内容。

大衍数列的前几项为:0、2、4、8、12、18、24、32、40、50。数列的生成规律如下:

  • 对于偶数项,数列的值等于序号的平方再除以2;
  • 对于奇数项,数列的值等于序号的平方减1再除以2。

例如:

  • 当序号为2时,2是偶数,数列值为2²/2=2;
  • 当序号为3时,3是奇数,数列值为(3²-1)/2=4/2=2。

以下是大衍数列的前100项生成代码:

public class Test04_大衍数列 {    public static void main(String[] args) {        for (int i=1; i<100; i++) {            if (i%2==0) {                System.out.print(i*i/2 + " ");            } else {                System.out.print((i*i-1)/2 + " ");            }        }    }}

上述代码可以用于生成大衍数列的前100项。通过运行该代码,可以看到数列的具体数值分布。

大衍数列的生成规律具有鲜明的特点,使其成为中国古代数学研究中的重要案例。通过对数列的分析,可以更深入地理解中国传统文化中的数学智慧。

转载地址:http://tceq.baihongyu.com/

你可能感兴趣的文章
npm install 报错 ERR_SOCKET_TIMEOUT 的解决方法
查看>>
npm install 报错 Failed to connect to github.com port 443 的解决方法
查看>>
npm install 报错 fatal: unable to connect to github.com 的解决方法
查看>>
npm install 报错 no such file or directory 的解决方法
查看>>
npm install 权限问题
查看>>
npm install报错,证书验证失败unable to get local issuer certificate
查看>>
npm install无法生成node_modules的解决方法
查看>>
npm install的--save和--save-dev使用说明
查看>>
npm node pm2相关问题
查看>>
npm run build 失败Compiler server unexpectedly exited with code: null and signal: SIGBUS
查看>>
npm run build报Cannot find module错误的解决方法
查看>>
npm run build部署到云服务器中的Nginx(图文配置)
查看>>
npm run dev 和npm dev、npm run start和npm start、npm run serve和npm serve等的区别
查看>>
npm run dev 报错PS ‘vite‘ 不是内部或外部命令,也不是可运行的程序或批处理文件。
查看>>
npm scripts 使用指南
查看>>
npm should be run outside of the node repl, in your normal shell
查看>>
npm start运行了什么
查看>>
npm WARN deprecated core-js@2.6.12 core-js@<3.3 is no longer maintained and not recommended for usa
查看>>
npm 下载依赖慢的解决方案(亲测有效)
查看>>
npm 安装依赖过程中报错:Error: Can‘t find Python executable “python“, you can set the PYTHON env variable
查看>>