What the sum means

The divisor-sum function sigma(n)sigma(n) adds every positive factor of nn.

For example, the factors of 6 are 1, 2, 3, and 6, so sigma(6)=12sigma(6)=12.

Why factor pairs matter

Factors usually come in pairs such as dd and n/dn/d. That is why checking only up to sqrtnsqrt{n} is enough to recover the full list.