Problem 536
Modulo power identity
Let S(n) be the sum of all positive integers m not exceeding n having the following property:
a m+4 ≡ a (mod m) for all integers a.
The values of m ≤ 100 that satisfy this property are 1, 2, 3, 5 and 21, thus S(100) = 1+2+3+5+21 = 32.
You are given S(106) = 22868117.
Find S(1012).
幂同余恒等式
将所有不超过n且满足下列性质的正整数m的和记为S(n):
对于所有整数a,a m+4 ≡ a (mod m)。
在所有m ≤ 100中满足这一性质的有1,2,3,5和21,因此S(100) = 1+2+3+5+21 = 32。
已知S(106) = 22868117。
求S(1012)。