题目229:4种平方表示
Four Representations using SquaresConsider the number 3600. It is very special, because
3600 = 482 + 362
3600 = 202 + 2×402
3600 = 302 + 3×302
3600 = 452 + 7×152
Similarly, we find that 88201 = 992 + 2802 = 2872 + 2×542 = 2832 + 3×522 = 1972 + 7×842.
In 1747, Euler proved which numbers are representable as a sum of two squares. We are interested in the numbers n which admit representations of all of the following four types:
n = a12 + b12
n = a22 + 2 b22
n = a32 + 3 b32
n = a72 + 7 b72,
where the ak and bk are positive integers.
There are 75373 such numbers that do not exceed 107.
How many such numbers are there that do not exceed 2×109?
题目:
考虑数字 3600,它非常特别,因为
3600 = 482 + 362
3600 = 202 + 2×402
3600 = 302 + 3×302
3600 = 452 + 7×152
类似的,我们发现 88201 = 992 + 2802 = 2872 + 2×542 = 2832 + 3×522 = 1972 + 7×842。
在 1747 年,欧拉证明哪些数能被表示为两个数的平方和。我们对能表示成下面 4 种形式的数字 n 感兴趣:
n = a12 + b12
n = a22 + 2 b22
n = a32 + 3 b32
n = a72 + 7 b72
其中 ak 和 bk 为正整数。
不超过 107 有 75373 个这样的数字。
不超过 2×109 有多少个这样的数字呢?
把20000*sqrt(5)以下的完全平方数全都求出来,然后建立4个集合,存储4种平方和数, 求交集
然后效率就可以火葬场了
页:
[1]