免費論壇 繁體 | 簡體
Sclub交友聊天~加入聊天室當版主
分享
返回列表 发帖
本帖最后由 青青子衿 于 2019-9-9 09:28 编辑

应该是要解出这个二次不定方程。
\( \dfrac{(2a+k-1)\,k}{2} =n \)
下面的代码是去掉平凡解后剩下的情形。
Table[Solve[(k (2 a + k - 1))/2 == nn && k > 1 && a > 0, {a, k},
   Integers], {nn, 1, 22}] // Column
感觉这个解与\(n\)除某数所得结果有关。
9 + 10 + 11 + 12 + 13 + 14 + 15 + 16 = 100
18 + 19 + 20 + 21 + 22 = 100

TOP

本帖最后由 青青子衿 于 2019-9-26 10:58 编辑

回复 4# abababa
这个结论是正确的。
任意整数表为相继整数之和的方法数同它的奇因子个数一样多。(这种计数是将自身也算上的)
参见《History of the Theory of Numbers, Volume II Diophantine Analysis》第139页。

在Oeis上,有奇因子个数序列
A001227
Number of odd divisors of n.
Also number of partitions of n into consecutive positive integers
including the trivial partition of length 1
(e.g., 9 = 2+3+4 or 4+5 or 9 so a(9)=3).
(Useful for cribbage players.)

TOP

返回列表 回复 发帖