ON CONSECUTIVE NIVEN NUMBERS
Curtis Cooper and Robert E. Kennedy
Department of Mathematics, Central Missouri State University, Warrensburg, MO 64093(Submitted June 1991)

INTRODUCTION
In [1] the concept of a Niven number was introduced with the following definition.
Definition: A positive integer is called a Niven number if it is divisible by its digital sum.
Various articles have appeared concerning digital sums and properties of the set of Niven
numbers. In particular, it was shown in [2] that no more than 21 consecutive Niven numbers ispossible. Here, we will show, in fact, that no more than 20 consecutive Niven numbers is possible
and give an infinite number of examples of such sequences.
DIGITAL SUMS AND CARRIESIn what follows, s{n) will denote the digital sum of the positive integer n. The formulan10'
where the square brackets represent the greatest integer function, is well known and easily
derived. Note that the sum has only a finite number of terms since MM = 0 where t > [log n]
For integers m and «, we let c(m + n) denote the sum of the "carries" which occur whencalculating the sum m + n. The following Lemma gives the relationship between $(m + n) andc(m + n).
Lemma: Let m, n be positive integers. Thens(m + n) = s(m) + s(n) - 9c(m + n).
Proof: Sinces(m)-m-9^Ti mt>\

1(7and s{ri) -n- 9]Tt>\

10'

it follows thats(m) + s(ri) -m +n-9^ m
10't>\

10'm+n r>imTo

7 -nltf"

Noting that the expression
m+n
10'is the carry that occurs when the (t-Vfs(m) + s(n)-9c(m +ri)follows.
146mTo7 -nright-most digit of n are added, the equality s(m + n) =[MAYON CONSECUTIVE NIVEN NUMBERS

In passing, the resder might be interested in proving that s{mn) = s{m)s{n)-9c{mn) wherec{mn) is the sum of the carries that occur in calculating the product of m and n by the usual multiplication algorithm. Here, however, we are concerned with sequences of consecutive Nivennumbers.
CONSECUTIVE NIVEN NUMBERS
To discuss consecutive Niven numbers, we will introduce the idea of a decade and a centuryof numbers. A decade is a set of numbers{10w,10« + l,...,10w + 9}
for any nonnegative integer n and a century is a set of numbers{100/i,100w + l,..., lOOw + 99}
for any nonnegative integer n. We first observe that in a given decade, either all the odd numbers
have an even digital sum or all the odd numbers have an odd digital sum. To make the next
observation, let E denote the statement "odd numbers which have an even digital sum" and O
denote the statement "odd numbers which have an odd digital sum." We then note that the ten
decades in a century alternate either O, E, O, E, O, E, O, E, O, E or E, O, E, O, E, O, E, O, E, O.
Finally, we remark that in an E decade, none of the odd numbers can be Niven since their digital
sum is even. Thus, the only way to get more than 11 consecutive Niven numbers is to cross acentury boundary where the decades between centuries would be...,E, 0,E, 0 | 0 , E , 0,E, ... .
Hence, we cannot have more than 21 consecutive Niven numbers and if a list of 21 consecutive
Niven numbers exists, it would have to commence with an even Niven number of the form

ltfn + 9t_fi
where dr denotes the concatenation of r ds in the decimal representation of an integer. For example,895(24)2037 = 89999924240007.
Note that d does not have to be a digit. This notation will facilitate an efficient representation forcertain large integers.
It is not difficult to find sequences of consecutive Niven numbers. For example, the sequence
1, 2, 3, 4, 5, 6, 7, 8, 9, 10 is an example of 10 consecutive Niven numbers. It is, of course, thesmallest such sequence. Other sequences of 10 consecutive Niven numbers can be found, but if asequence of 21 consecutive Niven numbers could be found, we would have an example of every
possible sequence of k consecutive Niven numbers for k = 1, 2, 3, ..., 21. As suggested in theintroduction, however, it will be shown that k cannot be larger than 20, and an infinite number ofexamples with k = 20 will be given. Determining an example with k = 20 involves working withlarge integers, solving systems of linear congruences, choosing integers with "good" digital sums,
a lot of adjusting partial results, and a lot of luck and intuition. Without the use of a computercapable of manipulating large numbers, we could not have found the following sequence in areasonable length of time.

1993]

147

ON CONSECUTIVE NIVEN NUMBERSLet
a =4090669070187777592348077471447408839621564801
2007115516094806249015486761744582584646124234
1540855543641742325745294115007591954820126570
087071005523266064292043054902370439430,'1120
andb =2846362190166818294716429619770154544233311863
4187301827478422658543387589306681088151446703
2759507916140833155837906335537198825206802774
8430283149755020972927459559360592362156911190.

Then a has 1296 digits, b has 1298 digits, s(a) = 720, and s(b) = 10870. Also note that each of
2464645030
2464645031
2464645039
2464634960
2464634961
2464634969
is a factor of a, and2464645030 divides b2464645031 divides b + \2464645039 divides b + 92464634960 divides b + 102464634961 divides b + \l2464634969 divides 4 + 19.
Now let m be any nonnegative integer and consider
X~a3423103^w^-

Then x has 44363342786 + m digits, and is a Niven number with s(x) = 2464645030. Furthermore, by construction, each of x +1, x + 2, x + 3,..., x +19 is also a Niven number, and a sequenceof 20 consecutive Niven numbers has been constructed. Also, since m is an arbitrary nonnegativeinteger, we have demonstrated an infinite number of such sequences. However, that the methods
used in finding such a sequence cannot be used to find 21 consecutive Niven numbers, is revealedby the following discussion.
Suppose that there exists a sequence x, x + l, x + 2,..., x + 19, x + 20 of Niven numbers.
Then x = 9r-10 (mod lCf) where we may assume that the (t + l)st right-most digit of x is not a 9.
Thus,

148

(1)

XEEO

(mods(x))(5)

x = - 4 (mods(x) + 4)

(2)

x = - 1 (mod s(x) +1)(6)

x == - 5 (mod s(x) + 5)

(3)

x = - 2 (mods(x) + 2)

(7)

x = - 6 (mod s(x) + 6)

(4)

x = -3 (mods(x) + 3)

(8)

x = - 7 (mods(x) + 7)
[MAY

ON CONSECUTIVE NIVEN NUMBERS(9)

x = -8 (mods(x) + 8)

(16)

x = -15 (mods(x) +15-9t)(10)

x = -9 (mods(x) + 9)(17)

x = -\6 (mod s(x) + 1 6 - 9t)(11)x ^ - 1 0 (mods(x) + 10-9r)(18)

x==-17 (mods(x) + 17-9?)(12)

x = - l l (mods(x) + l l - 9 f )(19)

JC = - 1 8 (mods(x) + 18-9/)(13)

x = -12 (mods(x) + 12-9/)(20)

x ^ - 1 9 (mods(x) + 19-9r)(14)

x = -13 (mod s{x) + 13-9/)(21)

x = -20 (mod s(x) + 11-9/)(15)x - - 1 4 (mods(x) + U-9t)

It should be pointed out that the form of the moduli in the above list follow by the Lemma. Thatis,s(x + k) = s(x) + s(k) - 9c(x + k)
= s(x) +s(k)-9(t-l).
For example,s(x + 19) = s(x) + l0-9(t-l)= s(x) + l9-9t
and so the congruencex + 19 = 0 (mods(x + 19))
may be written as
x = -19 (mods(x) + 19-9r).
Since
x = -20 (mods(x) + l l - 9 / ) ,andx = - l l (mods(x) + l l - 9 r ) ,we immediately have that
9 = 0 (mods(x) + ll-9t),
and so, s(x) +11 - 9t - 1, 3, or 9. Thus, 9t - s(x) = 2,8, or 10. However, since
XEE9r_jO ( m o d l 0 r ) ,we see that s(x) > 9t - 9, and it follows that 9/ - s(x) = 2 or 8.
Suppose that 9t-s(x)the system= 8. Then, by congruences (11), (12), (14), (16), and (20), we havex = 0 (mod 2)
x = 1 (mod 3)
x = 2 (mod 5)
x = 6 (mod 7)
x = 3 (mod 11)which, by the Chinese Remainder Theorem, has the solution
SEE6922 (mod2310).
But, since x = 9,_10 (mod 10'), it follows that 5 is a factor of x. This cannot be the case if x =6922 (mod 2310). Hence, we must conclude that 9t - s(x) * 8.
1993]

149

ON CONSECUTIVE NIVEN NUMBERS

Now suppose that 9t - s(x) = 2. Then the congruences (1) through (21) may be rewritten as:
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)

(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)

x = 0 (mod9f-2)
x = ~l (mod9r-l)
x = -2 (mod 9r)
x = -3 (mod9f + l)
x = -4 (mod9f + 2)
x = -5 (mod 9t + 3)
x = -6 (mod9r + 4)
x = -l (mod 9t + 5)
x = - 8 (mod 9t + 6)
x = - 9 (mod 9t + 7)
x = 6 (mod 8)

x = 7 (mod 9)
x = S (mod 10)
x = 9 (mod 11)
x = 10 (mod 12)
XEEH (mod13)

x = 12 (mod 14)
x = 13 (mod 15)
x = 14 (mod 16)x s l 5 (mod 17)
x = 7 (mod 9),

respectively.
Recall that if the system
x = r (mod/w)
x = s (modn)
has a solution, then gcd(m, n) is a factor of r—s. See, for example, [3, Th. 5-11]. Thus, by useof the pairings(4) with (13)(6) with (13)(7) with (13)(10) with (13),
we have that
gcd(10,9f + l) = l
gcd(10,9f + 3) = l
gcd(15,9f + 4) = l
gcd(10,9f + 7) = l,respectively. The fact that x is even together with congruence (2), imply that t is even. Butt = 2 (mod 10) implies thatt = 4 (mod 10) implies thatr = 6 (mod 10) implies thatr = 8 (mod 10) implies that

gcd(10,9f + 7 ) * l ,gcd(l 5, 9f + 4 ) * l ,gcd(10,9f + l ) * l ,gcd(10,9f + 3 ) * l ,which contradict the above. So, it follows thatt*2 (mod 10)
t*A (mod 10)t£6 (mod 10)
f # 8 (mod 10).
In addition, the pair of congruences x = 9t_fi (modl0 r ) and x = -7 (mod9r + 5) imply thatgcd(ltf, 9t + 5) divides 9r-17, from which it follows that 5 cannot be a factor of gcd(10', 9^ + 5)
150

[MAYON CONSECUTIVE NIVEN NUMBERS

and so we have that t # 0 (mod 10). Hence, by assuming that 9t - s(x) - 2, the fact that t is evenis contradicted, and we conclude that 9t-s(x)*2.
So, the only two possibilities fo'r9t-s{x)(by assuming that a sequence of 21 consecutive Niven numbers exists) are eliminated. We have,then, the following theorem.
Theorem:

There does not exist a sequence of 21 consecutive Niven numbers.
CONCLUSION

Finally, we must admit that we do not know whether or not the sequence of 20 consecutive
Niven numbers given here, with m = 0, is the smallest such sequence. That is, whether or not theinteger a3423mb is the smallest integer that a sequence of 20 consecutive Niven numbers cancommence. During the construction of this integer, many alternate possibilities presented themselves, and as mentioned, much intuition and luck were involved. We would, therefore, like tochallenge the reader to find the least integer that is the first term in a sequence of 20 consecutive
Niven numbers.
REFERENCES
1.
2.
3.

R. Kennedy, T. Goodman, & C. Best. "Mathematical Discovery and Niven Numbers." The
MATYC Journal 14 (1980):21-25.
R. Kennedy. "Digital Sums, Niven Numbers, and Natural Density."
CruxMathematicorum
8 (1982): 129-33.
H. Griffin. Elementary Theory of Numbers. New York: McGraw-Hill, 1954.

AMS Classification number: 11A63

Author and Title Index
The AUTHOR, TITLE, KEY-WORD, ELEMENTARY PROBLEMS and ADVANCED PROBLEMS
indices for the first 30 volumes of The Fibonacci Quarterly have been completed by Dr. Charles K.
Cook. Publication of the completed indices is on a 3.5-inch high density disk. The price for acopyrighted version of the disk will be $40.00 plus postage for non-subscribers while subscribers to The
Fibonacci Quarterly will only need to pay $20.00 plus postage. For additional information or to ordera disk copy of the indices, write to:
PROFESSOR CHARLES K. COOK
DEPARTMENT OF MATHEMATICSUNIVERSITY OF SOUTH CAROLINA AT SUMTER
1 LOUISE CIRCLE
SUMTER, SC 29150
The indices have been compiled using WORDPERFECT. Should you wish to order a copy of theindices for another wordprocessor or for a non-compatible IBM machine please explain your situation
to Dr. Cook when you place your order and he will try to accommodate you. DO NOT SEND YOURPAYMENT WITH YOUR ORDER. You will be billed for the indices and postage by Dr. Cook when
he sends you the disk. A star is used in the indices to indicate unsolved problems. Furthermore, Dr.
Cook is working on a SUBJECT index and will also be classifying all articles by use of the AMSClassification Scheme. Those who purchase the indices will be given one free update of all indices when
the SUBJECT index and the AMS classification of all articles published in The Fibonacci Quarterly arecompleted.
1993]

151