P565
projecteuler.net

Divisibility of Sum of Divisors

ℹ️Published on Sunday, 19th June 2016, 10:00 am; Solved by 700;
Difficulty rating: 35%

Let σ(n) be the sum of the divisors of n.
E.g. the divisors of 4 are 1, 2 and 4, so σ(4)=7.

The numbers n not exceeding 20 such that 7 divides σ(n) are: 4, 12, 13 and 20, the sum of these numbers being 49.

Let S(n,d) be the sum of the numbers i not exceeding n such that d divides σ(i).
So S(20,7)=49.

You are given: S(106,2017)=150850429 and S(109,2017)=249652238344557.

Find S(1011,2017).



Soluzione

Last modified: May 16, 2025. Website built with Franklin.jl and the lovely Julia programming language.