Computation Workshop Solution Checker

Divisor Sums

For any positive integer \(n\), let \(D(n)\) be the sum of all positive integer divisors of \(n\) (including \(1\) and \(n\) itself). Let \(P(n)\) be the sum of \(D(i)\) for all \(i = 1,2,3, \ldots ,n\). So for example \(P(3) = D(1)+D(2)+D(3) = 1+3+4 = 8\).

Part A What is \(P(123)\)?
Part B What is \(P(1234567)\)?