A Smith
number is a
composite integer with the property that the
sum of its
digits is the same as the sum of the digits of its
prime factors. For example, 16940 is Smith because 16940 = 2 x 2 x 5 x 7 x 11 x 11 and 1 + 6 + 9 + 4 + 0 = 2 + 2 + 5 + 7 + 1 + 1 + 1 + 1. The numbers are named after mathematician
Albert Wilansky's brotherinlaw, whose phone number is a Smith number.
An assortment of Smith facts:

The first ten Smith numbers are 4, 22, 27, 58, 85, 94, 121, 166, 202, and 265.
 There are an infinite number of Smith numbers.
 Many products of repunit primes are Smith. In fact, if r is a repunit prime, then 1540r, 1720r, 25228r, and various other multiples are guaranteed to be Smith numbers.
 Let p be prime, and define D_{n}(p) to be the number of times that the digit n appears in p. Then if D_{1}(p)  D_{8}(p) + 2 x (D_{2}(p)  D_{7}(p))
+ 3 x (D_{3}(p)  D_{6}(p)) + 4 x (D_{4}(p)  D_{5}(p)) = 2, then 2p is Smith. For example, the Smith number 166 (= 2 x 83) is of this form: 83 is prime, and D_{3}(83) = D_{8}(83) = 1 whilst all other digits appear 0 times, reducing the formula above to 3 x D_{3}(83)  D_{8}(83) = 2.