Problem 432: Totient sum

FCC link

Let S(n,m) = ∑φ(n × i) for 1 ≤ i ≤ m. (φ is Euler's totient function)

You are given that S(510510,106 )= 45480596821125120.

Find S(510510,1011). Give the last 9 digits of your answer.

Test

{{test}}

Console output