Factors come in pairs
A positive integer d is a factor of n when n ÷ d is a whole number. Every divisor d pairs with n ÷ d, so testing divisors up to √n finds all positive factors. A perfect square has one pair with equal terms, which is counted only once in the divisor list.
Example: the factors of 36
The factor pairs are 1 × 36, 2 × 18, 3 × 12, 4 × 9, and 6 × 6. The nine positive factors are 1, 2, 3, 4, 6, 9, 12, 18 and 36.
Because 36 = 2² × 3², its divisor count is (2 + 1)(2 + 1) = 9. Their sum is 91; excluding 36 leaves a proper-divisor sum of 55. Since 55 > 36, 36 is abundant.
Prime, perfect, abundant or deficient
A prime has exactly two positive divisors, 1 and itself. The number 1 is neither prime nor composite. A number is perfect when the sum of its proper positive divisors equals itself; abundant when that sum is greater; deficient when it is smaller.
Use a positive integer no larger than 10¹². The factor list includes every divisor; the factor-pair table shows its first 40 pairs if the list is longer. Negative factor pairs are outside this page’s positive-divisor convention.