| Find every factor |
pair-search from 1 to √n: each a with a ∣ n gives the pair (a, n / a) |
n = 36: test 1–6 → pairs (1,36), (2,18), (3,12), (4,9), (6,6) → 9 factors |
| Count the factors |
factor n = p1a1 · … · pkak; the number of divisors is (a1+1)(a2+1)…(ak+1) |
72 = 2³ · 3² → (3+1)(2+1) = 12 factors |
| Classify n (perfect / abundant / deficient) |
sum the proper divisors and compare to n |
6: 1 + 2 + 3 = 6 → perfect; 12: 1+2+3+4+6 = 16 > 12 → abundant |
| Find common factors with m |
intersect the factor sets; the largest is gcd(m, n) |
12 ∩ 18 in factors → {1, 2, 3, 6}; gcd = 6 |
| Find common multiples with m |
the smallest is lcm(m, n); every common multiple is a multiple of it |
4 and 6: lcm = 12; common multiples are 12, 24, 36, 48, … |