ProjectEuler 401 Sum of squares of div - 拼圖

Table of Contents

401. Sum of squares of divisors

http://projecteuler.net/problem=401


6 的因數有 1, 2, 3, 6。

這些因數的平方和則為 1 + 4 + 9 + 36 = 50。


使 sigma2(n) 表示為 n 的所有因數的平方和,因此 sigma2(6) = 50。


使 SIGMA2(n) 表示為所有 1 至 n 的 sigma2(n) 的和。

SIGMA2(n) 的前六項為 1, 6, 16, 37, 63 和 113。


請求出 SIGMA2(10^15) 除以 10^9 的餘數。

--

All Comments