## Let $\sigma(n)$ be the sum of the divisors of $n$.

E.g. the divisors of $4$ are $1$, $2$ and $4$, so $\sigma(4)=7$.

The numbers $n$ not exceeding $20$ such that $7$ divides $\sigma(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 $\sigma(i)$.

So $S(20 , 7)=49$.

You are given: $S(10^6,2017)=150850429$ and $S(10^9, 2017)=249652238344557$.

Find $S(10^{11}, 2017)$.

### This is a complex problem involving number theory and programming. Unfortunately, it’s too lengthy and complex to solve manually since the number range is very large. Therefore, it requires a computer program to solve it.

Here are the steps to create your own Python program:

1. Determine the `sigma` function that calculates the sum of the divisors of an integer.

“`python

def sigma(n):

result = 0

i = 1

while i <= n:
if n % i == 0:
result += i
i += 1
return result
```
2. Implement a function for `S(n, d)` that loops over all integers from `1` to `n`, checks if `d` divides `sigma(i)` and adds `i` to the sum if it does.
```python
def S(n, d):
sum = 0
for i in range(1, n+1):
if sigma(i) % d == 0:
sum += i
return sum
```
3. Finally, call this function for `n = 10^11` and `d = 2017`.
```python
print(S(10**11, 2017))
```
This solution isn't efficient as the computation might take a very long time due to the nature of the problem. To solve such big computations with larger numbers for `n`, you would need more advanced methods or algorithms for summing divisors and for finding numbers divisible by `d`, such as sieve methods or algorithms based on number theory.
As this is of a more advanced level and requires a deeper understanding of mathematics and programming, you might want to seek further guidance or use online platforms that provide running these large computations.
Please remember that the program should be run in a system that can handle large computations for a long time.

##### More Answers:

Maximal PerimeterRobot Welders

Maximal Polygons