0%

Problem 489


Problem 489


Common factors between two sequences

Let G(a, b) be the smallest non-negative integer n for which gcd(n3 + b, (n + a)3 + b) is maximized.
For example, G(1, 1) = 5 because gcd(n3 + 1, (n + 1)3 + 1) reaches its maximum value of 7 for n = 5, and is smaller for 0 ≤ n < 5.
Let H(m, n) = Σ G(a, b) for 1 ≤ a ≤ m, 1 ≤ b ≤ n.
You are given H(5, 5) = 128878 and H(10, 10) = 32936544.

Find H(18, 1900).


两个序列的公因数

记使得gcd(n3 + b, (n + a)3 + b)取最大值的最小非负整数n为G(a, b)。
例如,G(1, 1) = 5,因为gcd(n3 + 1, (n + 1)3 + 1)在n = 5时取得其最大值7,而且对于0 ≤ n < 5这个公约数更小。
记H(m, n) = Σ G(a, b)对于所有1 ≤ a ≤ m, 1 ≤ b ≤ n。
已知H(5, 5) = 128878和H(10, 10) = 32936544。

求H(18, 1900)。