欧拉计划 发表于 2016-8-31 23:47:41

题目152:用多个整数的平方的倒数和来表示1/2

Writing 1/2 as a sum of inverse squares

There are several ways to write the number 1/2 as a sum of inverse squares using distinct integers.

For instance, the numbers {2,3,4,5,7,12,15,20,28,35} can be used:



In fact, only using integers between 2 and 45 inclusive, there are exactly three ways to do it, the remaining two being: {2,3,4,6,7,9,10,20,28,35,36,45} and {2,3,4,6,7,9,12,15,28,30,35,36,45}.

How many ways are there to write the number 1/2 as a sum of inverse squares using distinct integers between 2 and 80 inclusive?

题目:

如果使用不同的整数,我们可以有多组数字,使得这些数的平方的倒数之和等于 1/2。

例如,2,3,4,5,7,12,15,20,28,35 就可以这么用:



实际上,如果只使用 2 到 45(包括 2 和 45)的整数,只存在三组数可以计算得到 1/2,另两组分别是 {2,3,4,6,7,9,10,20,28,35,36,45} ,{2,3,4,6,7,9,12,15,28,30,35,36,45}.

那么请问,使用 2-80 之间(包括 2 和 80)的整数的话,我们可以得到多少组数,可以用如上方法算得 1/2?

加餐 发表于 2020-8-29 14:43:59

用质因子考察,可以筛去一些数字,组合只能在{ 2,3,4,5,6,7,8,9,10,12,13,14,15,18,20,21,24,28,30,35,36,39,40,42,45,52,56,60,63,70,72 }这31个数字里产生

guosl 发表于 2020-11-29 20:58:05

本题最有希望的是迭代加深搜索。
目前搜索到下列组合:
{2,3,4,5,7,12,15,20,28,35}
{2,3,4,5,7,9,28,35,36,45,60}
{2,3,4,5,7,10,20,28,30,35,60}
{2,3,4,5,7,12,13,28,35,39,52}
{2,3,4,5,7,12,15,18,36,60,63,70}
{2,3,4,5,7,12,15,21,28,42,60,70}
{2,3,4,5,7,13,15,20,28,35,39,52}
{2,3,4,5,8,9,14,24,35,56,63,72}
{2,3,4,5,8,9,18,20,24,40,60,72}
{2,3,4,5,8,9,18,21,24,35,56,72}
{2,3,4,5,8,10,12,24,36,40,45,72}
{2,3,4,5,9,10,12,15,30,36,45,60}
{2,3,4,6,7,9,10,20,28,35,36,45}
{2,3,4,6,7,9,12,14,21,36,45,60}
{2,3,4,6,7,10,12,14,20,21,30,60}
{2,3,4,5,7,12,18,21,28,35,36,42,63}
{2,3,4,5,8,9,14,30,35,40,56,63,72}
{2,3,4,5,8,9,18,21,30,35,40,56,72}
{2,3,4,5,8,10,14,20,24,40,56,60,70}
{2,3,4,5,8,10,15,20,24,36,40,45,72}
{2,3,4,6,7,8,12,24,28,30,40,42,56}
{2,3,4,6,7,9,12,15,28,30,35,36,45}
{2,3,4,6,7,9,14,15,20,21,36,45,60}
{2,3,4,6,7,10,12,15,18,20,36,63,70}
{2,3,4,6,7,10,12,15,20,21,28,42,70}
{2,3,4,6,7,12,13,14,15,20,21,39,52}
{2,3,4,6,8,9,10,14,18,24,56,70,72}

guosl 发表于 2020-11-29 22:45:17

考虑数只能在{ 2,3,4,5,6,7,8,9,10,12,13,14,15,18,20,21,24,28,30,35,36,39,40,42,45,52,56,60,63,70,72 }这31个数字里产生,再加上迭代加深搜索。终于得到结果:301
页: [1]
查看完整版本: 题目152:用多个整数的平方的倒数和来表示1/2