Formula for summing the squares of factors

100 Views Asked by At

Is there a formula for determining the sum of the squares of the factors of an integer. (Perhaps using prime factors??)

e.g. the sum of squares of factors for the number 6 would be

1 + 4 + 9 + 36 = 50

regards, Kevin

1

There are 1 best solutions below

0
On

This is a multiplicative function: if we denote it by $f$ then $$f(p_1^{e_1}p_2^{e_2}\cdots p_n^{e_n})= f(p_1^{e_1})f(p_2^{e_2})\cdots f(p_n^{e_n})$$ when the $p_j$ are distinct primes. For a prime power we have $$f(p^e)=1+p^2+p^4+\cdots+p^{2e}=\frac{p^{2e+2}-1}{p^2-1}.$$ In your example, $$f(6)=f(2)f(3)=\frac{4^2-1}{4-1}\frac{9^2-1}{9-1} =5\times 10=50.$$