What is the sum of all divisors of 126?

What is the sum of all divisors of 126?

First, the prime factor is decomposed
126=2*3^2*7
Therefore, the sum of all factors can be obtained by the following formula:
(1+2)*(1+3+9)*(1+7)=312