# Smith Numbers

## Smith Numbers

One interesting property of some positive integers came into existence because of a phone call.  In 1982, Harold Smith called his brother-in-law, mathematician Albert Wilansky of Lehigh University, with the observation that his phone number was composite and the sum of the digits in the phone number equals the sum of the digits in its prime factors. Wilansky published this observation [6] and it was the birth of Smith numbers.

We introduce two arithmetic functions and then restate the definition of Smith numbers in terms of these two functions. Let S(N) represent the sum of the digits in N. Let Sp(N) represent the sum of the digits in the primes in the factorization of N. For example, Sp(12) = Sp(2*2*3) = 2+2+3 =7.

Definition. A composite integer N is called Smith if  S(N) = Sp(N).
The smallest Smith number is in fact the first composite integer. The integer 4 factors as 2*2 and so S(4)=4 and Sp(4)=4. The first few Smith numbers are 4, 22, 27, 58, 85, 94, 121, 166. There are 49 Smith numbers less than 1000. There is no apparent pattern that would yield a general-purpose formula for generating all Smith numbers.

There are several examples among the first 49 Smiths which are the product of 2 and a prime. There is a nice way to determine if twice the prime P is Smith. Add up all the digits in P that are between 1 and 4. For every 5 in P, subtract 4. For every 6, subtract 3. For every 7, subtract 2 and for every 8, subtract 1. If the final total is 2, then 2*P is a Smith number. For example, let P= 34607. The computation outlined is 3 + 4 - 3 - 2 = 2. Hence 2*34607 is Smith.

Another form of Smith numbers include 3304Rn where Rn is a prime repunit (number made up of n 1's). Smiths of this form were discovered by Oltikar and Wayland [5]. At the time of their article, the largest known prime repunit was R317. Since then, the repunit R1031 was discovered to be prime and so 3304*R1031 is Smith.

In 1984, Pat Costello looked at Smiths of the form P*Q*10M where P was a small prime and Q was a known Mersenne prime [2].      Here is how the M is found in the Smith numbers that look like P*Q*10M:
First, choose your Mersenne prime Q and compute its digit sum.
Choose a small prime P and do the following:
compute ps = digit sum of Q + digit sum of P;
compute the product P*Q;
compute ds = digit sum of P*Q;
if ds<ps, go back and choose a new P;
if ds=ps, then P*Q is Smith;
if ds>ps, then compute (ds-ps) mod 7;
if (ds-ps) mod 7 = 0   then M = (ds-ps)/7 and P*Q*10M is Smith
else go back and choose a new P.
For example,
Let Q = 217-1 = 131071 and choose  P = 5011.
Then ps = 20.
P*Q = 656796781.
Then ds = 55.
Now ds-ps = 35 which is divisible by 7.
So P*Q*105 = 65679678100000  is Smith.
Seventy-five Smith numbers of this form were produced including 191*(2216091-1)*10266 which has 65319 digits.

In 1987, Wayne McDaniel of the University of Missouri at St. Louis generalized the concept of Smith numbers [4]. He introduced k-Smith numbers and proved that there are infinitely many k-Smith numbers by actually producing an infinite sequence of them. Since k=1 reduces to Smith numbers, we know that there are infinitely many Smith numbers and can actually construct a sequence of them.  McDaniel looked at Smith numbers of the form  t*9Rn*10M where t comes from the set
{2, 3, 4, 5, 7, 8, 15}.

The form for the largest known Smith numbers is due to Samual Yates [7]. Yates looked at Smiths of the form
9Rn*QS*10M where Rn is a prime repunit and Q is a palindromic prime of the form 102K +A*10K + 1.  Yates was able to produce a Smith number with 13,614,513 digits.  Using a palindromic prime discovered in 2001 by Dan Heuer, Pat Costello [1] was able to produce the Smith number 9R1031 *(1028572+8*1014286+1)1027*102722434  which has 32,066,910 digits.  Using a palindromic prime discovered by Heuer in 2002, you can show that 9R1031 *(1069882+3*1034941+1)1476*103913210
is a Smith number having 107,060,074 digits.

In working on a Masters thesis, Kathy Lewis was able to produce an  infinite sequence of Smith numbers
(different than that produced by McDaniel) by looking at Smiths of the form 11K*9Rn*10M where Rn is any repunit.  Her work has been published in the Mathematics Magazine [3].

### References

[1] Costello, Patrick. “A New Largest Smith Number,” Fibonacci Quarterly, vol 40(4), 2002, pp. 369-371.
[2] Costello, Patrick . "Smith Numbers," paper presented at the West Coast Number Theory Conference, Asilomar,             California, 1984.
[3] Costello, Patrick and Lewis, Kathy. "Lots of Smiths," Mathematics Magazine, vol 7(3), 2002, pp. 223-226.
[4] McDaniel, Wayne. "The Existence of Infintely Many k-Smith Numbers," Fibonacci Quarterly, vol 25(1), 1987,
pp. 76-80.
[5] Oltikar, Sham and Keith Wayland. "Construction of Smith Number," Mathematics Magazine, vol 56(1), 1983,
pp. 36-37.
[6] Wilansky, Albert. "Smith Numbers," Two-Year College Math Journal, vol 13(1), 1982, p. 21.
[7] Yates, Samuel. "Welcome Back, Dr. Matrix," Journal of Recreational Mathematics, vol 23(1), 1991, pp. 11-12.