Given a number, there is an algorithm described here to find it's sum and number of factors. For example, let us take the number $1225$ :
It's factors are $1, 5, 7, 25, 35, 49, 175, 245, 1225 $ and the sum of factors are $1767$.
A simple algorithm that is described to find the sum of the factors is using prime factorization.
$1225 = 5^2 \cdot 7^2$, therefore the sum of factors is $ (1+5+25)(1+7+49) = 1767$
But this logic does not work for the number $2450$. Please check if it's working for $2450$
Edit : Sorry it works for $2450$. I made some mistake in calculation.