GoalYou have to print the sum of divisors of all the numbers from 1 to n.
It’s superfast when you know the trick but you have to find it.
For example if n=4, lets define d(n) the set of the divisors of n:
And their sum is 1+1+2+1+3+1+2+4=15.
Look carefully at the divisors to find the trick.
A single number n
A higher resolution is required to access the IDE