A Smith number n is a composite whose digital sum S(n) equals Sp(n), the digital sum of all the prime factors of n, counting multiplicity. For example,728 is a Smith number because the factorization 728 = 23 × 7 × 13 gives us
Sp(728) = 2 + 2 + 2 + 7 + 1 + 3 = 17, matching S(728) = 7 + 2 + 8 = 17.