[中譯] ProjectEuler 489 Common factors between two sequences

作者: utomaya (烏托馬雅)   2014-12-11 23:07:25
489. Common factors between two sequences
http://projecteuler.net/problem=489
G(a,b)定義為最小的非負整數使得 gcd(n^3 + b, (n + a)^3 + b) 為最大
例如,G(1,1)=5,因為n等於5時,gcd(n^3 + 1, (n + 1)^3 + 1)達到其最大值七
而在0<=n<5時有較小的gcd值
令 H(m, n) 為1<=a<=m 且 1<=b<=n的情況下,G(a,b)的總和值
給定兩筆測資 H(5, 5) = 128878 且 H(10, 10) = 32936544
試求出H(18, 1900)

Links booklink

Contact Us: admin [ a t ] ucptt.com