首页 > 技术文章 > 将整数表示为平方和的相关链接收集

yhm138 2020-07-31 21:42 原文

https://mathworld.wolfram.com/SumofSquaresFunction.html Sum of Squares Function

https://en.wikipedia.org/wiki/Gauss_circle_problem 维基百科Gauss circle problem

https://www.ams.org/journals/mcom/1962-16-079/S0025-5718-1962-0155788-9/S0025-5718-1962-0155788-9.pdf Calculation of the Number of Lattice Points in the Circle and Sphere

https://reference.wolfram.com/language/ref/SquaresR.html Mathematica SquaresR 用法

(https://oeis.org/A319574) 将k写成n个平方的总和形式的方式数




\(n\)写成两个平方和的方法的数目,等于

\[4(D_+-D_-) \]

其中,\(D_+\)是形如\(4k+1\)\(n\)的因子数目,\(D_-\)是形如\(4k-1\)\(n\)的因子数目

举例,25的因子是\(1,5,25\)\(D_+=3\)\(D_-=0\)\(4(D_+-D_-)=12\)

\(0^2+5^2,3^2+4^2\)进行各项重新排序,变变正负号,得到12种。

\(n\)写成四个平方和的方法的数目\(s(n)\),等于

\[s(n)=8\sum\limits_{d\%4!=0\ ,d|n}d \]

举例,12的因子是\(1,2,3,4,6,12\)

\[s(12)=(1+2+3+6)\times8=96 \]

其中的不同方法数就是由\(1^2+1^2+1^2+3^2\)\(0^2+2^2+2^2+2^2\)以不同的方法对各项重排次序,或把正整数变负整数得到的各个平方和,共96种

推荐阅读