Smith Number Calculator
Check if a number is a Smith number by comparing the sum of its digits to the sum of digits of its prime factorization.
Enter any positive integer greater than 1 (up to 15 digits) to check if it is a Smith number
A Smith number is a composite number where the sum of its digits equals the sum of the digits of its prime factorization, with repeated prime factors counted multiple times.
Definition:
n is a Smith number if n is composite and
digitSum(n) = sum of digitSum(p) for each prime factor p (with multiplicity)
Algorithm:
- Check if the number is prime (if so, it cannot be a Smith number)
- Calculate the sum of all digits of the number
- Find the prime factorization of the number
- Calculate the sum of digits of each prime factor, multiplied by its exponent
- Compare the two sums - if equal, it is a Smith number
Example 1: Is 22 a Smith number?
- 22 = 2 × 11 (prime factorization)
- Digit sum of 22: 2 + 2 = 4
- Digit sum of prime factors: 2 + (1 + 1) = 4
- 4 = 4, so yes, 22 is a Smith number
Example 2: Is 27 a Smith number?
- 27 = 33 = 3 × 3 × 3 (prime factorization)
- Digit sum of 27: 2 + 7 = 9
- Digit sum of prime factors: 3 + 3 + 3 = 9
- 9 = 9, so yes, 27 is a Smith number
Example 3: Is 15 a Smith number?
- 15 = 3 × 5 (prime factorization)
- Digit sum of 15: 1 + 5 = 6
- Digit sum of prime factors: 3 + 5 = 8
- 6 ≠ 8, so no, 15 is not a Smith number
Interesting Properties:
- The smallest Smith number is 4 (4 = 2 × 2, digit sums: 4 and 2+2=4)
- Prime numbers are excluded by definition
- There are infinitely many Smith numbers, though they become less frequent as numbers grow
- 666 is a Smith number (666 = 2 × 3 × 3 × 37, digit sums: 18 and 2+3+3+3+7=18)
Applications: Smith numbers are primarily studied in recreational mathematics and number theory. They demonstrate interesting relationships between a number's decimal representation and its multiplicative structure.
What is a Smith number?
A Smith number is a composite (non-prime) number where the sum of its digits equals the sum of the digits of its prime factorization (with repeated factors counted). For example, 22 is a Smith number because 22 = 2 × 11, and the digit sum of 22 (2+2=4) equals the digit sum of its prime factors (2+1+1=4).
Why are prime numbers not Smith numbers?
By definition, Smith numbers must be composite (non-prime). For a prime number p, the digit sum of p would always equal itself (since its only prime factor is p), making the comparison trivial. The interesting property of Smith numbers comes from the relationship between a composite number and its prime factors.
Who discovered Smith numbers?
Smith numbers were named after Harold Smith, whose brother-in-law Albert Wilansky, a mathematician at Lehigh University, noticed in 1982 that Harold's phone number (493-7775) had this property. The number 4937775 = 3 × 5 × 5 × 65837, and both the number and its prime factorization have a digit sum of 42.
What are some examples of Smith numbers?
The first several Smith numbers are: 4, 22, 27, 58, 85, 94, 121, 166, 202, 265, 274, 319, 346, 355, 378, 382, 391, 438, 454, 476, 517, 526, 535, 562, 576, 588, 627, 634, 636, 645, 648, 654, 663, 666, 690, 706, 728, 729, 762, 778, 825, 852, 861, 895, 913, 915, 922, 958, and 985.
Are there infinitely many Smith numbers?
Yes, it has been proven that there are infinitely many Smith numbers. In fact, Wayne McDaniel proved in 1987 that there are infinitely many Smith numbers in arithmetic progressions. The density of Smith numbers among all integers decreases as numbers get larger, but they never run out.