文章目錄

原题链接http://projecteuler.net/problem=46

Goldbach’s other conjecture

It was proposed by Christian Goldbach that every odd composite number can be written as the sum of a prime and twice a square.

9 = 7 + 212
15 = 7 + 2
22
21 = 3 + 232
25 = 7 + 2
32
27 = 19 + 222
33 = 31 + 2
12

It turns out that the conjecture was false.

What is the smallest odd composite that cannot be written as the sum of a prime and twice a square?

哥德巴赫的另一个猜想
这个猜想是克里斯蒂安.哥德巴赫提出的,它是这样的:任意一个合数,如果是奇数的话,则可以写成一个素数与一个平方数的两倍的和
9 = 7 + 212
15 = 7 + 2
22
21 = 3 + 232
25 = 7 + 2
32
27 = 19 + 222
33 = 31 + 2
12
结果这个猜想是错的。
求最小的不能写成一个素数与一个平方数的两倍的和的奇合数​

解答:
还是暴力吧。

打赏作者

文章目錄