Smith Number Checker

Enter a number to test the Smith property and see its prime factorisation.

How it is calculated

A Smith number is a composite whole number whose digit sum equals the sum of the digit sums of its prime factors, each factor counted as often as it divides the number. The tool factorises n by trial division, adds the digits of n to get S(n), adds the digits of every prime factor (with repeats) to get S(factors), and answers Yes only if S(n) = S(factors) and n is not itself prime. A prime always answers No, because its only factor is the number itself; for 13 both sums are 4, yet the answer is still No. The input must be a whole number from 2 to 1,000,000,000; decimals, negatives, 0, 1, numbers above one billion and text such as 1,000 give no result. Digit sums are base 10 only.

Worked example

Test 666. Digit sum of the number: 6 + 6 + 6 = 18. Prime factorisation: 666 = 2 × 3 × 3 × 37. Digit sums of the factors: 2 + 3 + 3 + (3 + 7) = 18. Both sums are 18 and 666 is composite, so the tool answers Yes: 666 is a Smith number.

Try this example →

Common mistakes

  • Expecting a prime such as 13 to qualify: its digit sum matches its single factor's, but primes are excluded by definition, so the answer is No.
  • Adding each distinct prime factor only once: 27 = 3 × 3 × 3 needs three 3s (sum 9), and leaving out repeats gives the wrong factor sum.
  • Adding the factors themselves instead of their digits: 2 + 3 + 3 + 37 = 45 is not the figure to compare, 18 is.
  • Entering a decimal, a negative, 1, or a number with separators such as 1,000: the tool accepts only plain whole numbers from 2 up to one billion and shows no result otherwise.
  • Checking the number written in another base rather than plain base-10 digits.

About this calculator

A Smith number is a composite (non-prime) whole number whose digit sum equals the sum of the digits of its prime factors, counted with multiplicity, meaning each repeated prime factor is counted as many times as it appears. For example, 4 = 2 × 2 has digit sum 4, and its two prime factors each contribute a digit sum of 2, for a total of 4, so 4 qualifies; 22 = 2 × 11 has digit sum 4, and its factors 2 and 11 contribute 2 + (1+1) = 4 as well.

The name comes from a 1982 anecdote by mathematician Albert Wilansky, who noticed the property in his brother-in-law Harold Smith's telephone number, 493-7775. Smith numbers are a recreational number theory curiosity rather than a tool with practical applications, popular among puzzle enthusiasts and programming exercises that combine digit manipulation with prime factorisation.

This calculator factorises any whole number from 2 to 1,000,000,000 that you enter, sums the digits of the number and of its prime factors, and tells you immediately whether it is a Smith number (primes never are).

Was this helpful?

You can pick up to 3 reactions.

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators