Back to the Problem
For N = ∏ pe, σ(N) = ∏ (pe+1−1)/(p−1) — multiplicative over the factorization.
Complexity: O(√N)