Smallest Examples of Strings of Consecutive Happy Numbers

Robert Styer Department of Mathematical Sciences Villanova University Villanova, PA 19085 USA

                  robert.styer@villanova.edu

Abstract

A happy number N is defined by the condition S^{n}(N) = 1 for some number n of iterations of the function S, where S(N) is the sum of the squares of the digits of N. Up to 10^{20}, the longest known string of consecutive happy numbers was length five. We find the smallest string of consecutive happy numbers of length 6, 7, 8, …,

13. For instance, the smallest string of six consecutive happy numbers begins with N = 7899999999999959999999996. We also find the smallest sequence of 3-consecutive cubic happy numbers of lengths 4, 5, 6, 7, 8, and 9.

1 Introduction

Many recreational math problems deal with various combinations of digits. Let N = ∑_{j=0}^{n} a_{j}10^{j} with 0 ≤ a_{j} ≤ 9 be the decimal expansion of N. Define S(N) = ∑_{j=0}^{n} a_{j}^{2}, and define S^{k} to be the k-fold iterate of S. Honsberger [3] (see also Beardon [1] and Grundman and Teeple [4]) gives a simple proof that, for every positive integer N, there is a positive integer k such that either S^{k}(N) = 1, a fixed point, or S^{k}(N) = 4, which is part of the 8-cycle {16, 37, 58, 89, 145, 42, 20, 4}.

We say a number is happy if the iterates are eventually equal to the fixed point 1. The first happy number bigger than 1 is 7, and indeed, it seems that about 1 out of 7 numbers is happy [7]. The smallest pair of consecutive numbers is 31 and 32, and the smallest with 3, 4 or 5 consecutive happy numbers were known; for example, 44488, 44489, 44490, 44491, 44492 is the smallest string of five consecutive happy numbers. Guy [7] asked how many consecutive happy numbers one can have, and noted that Jud McCranie calculated that up to 10^{20} the longest consecutive string is only of length five. El-Sedy and Siksek [2] published the first proof that there can be arbitrarily long strings of consecutive happy numbers (although H. Lenstra knew a proof earlier; Teeple generalized his unpublished proof in her undergraduate honors thesis [10].) See also Grundman and Teeple [5, 6], and Pan [8]. Their techniques do not come remotely close to finding the least examples, however, and we propose to find the smallest instance of six or more consecutive happy numbers.

J. A. Littlewood said “A technique is a trick used more than once.” In their paper on happy numbers, El-Sedy and Siksek [2] end their paper by using a trick to calculate a huge number l = ∑_{r=1}^{233192} 9 · 10^{4+r} + 20958 with certain properties that are critical to their proof. We can transform their trick into a technique that could be used to calculate a much smaller value for a number l with their desired properties; the minimal example is l = 4699999990999999999969.

With this technique, we calculate the smallest N beginning a sequence of 6 to 13 consecutive happy numbers. We use a period as the concatenation operator, and list the number of nine digits in parentheses. For example, N = 58.(11 nines).6.(144 nines).5 means

N = 58 · 10^{157} + 10^{146}(10^{11} − 1) + 6 · 10^{145} + 10(10^{144} − 1) + 5

that is, a 159 digit number given by the digits 58 followed by eleven digits 9, then the digit 6, then one hundred forty-four digits 9, and ending with the digit 5. In this table, n is the length of the sequence of consecutive happy numbers, digits is the number of digits in each member of the sequence, and N is the first number of the sequence of n consecutive happy numbers.

n digits  N
2  2  31
3  4  1880
4  4  7839
5  5  44488
6  25  7899999999999959999999996
7  25  7899999999999959999999996
8  159  58.(11 nines).6.(144 nines).5
9  215  26.(137 nines).7.(74 nines).5
10  651  38.(560 nines).0.(87 nines).5
11 1571  27.(280 nines).0.(1287 nines).4
12 158162 388.(158021 nines).8.(136 nines).4
13 603699 288.(218491 nines).3.(385203 nines).3

2 Six Consecutive Happy Numbers

In this section we prove the following proposition for six consecutive happy numbers.

Proposition 1. N_{0} = 7899999999999959999999996 is the smallest number that begins a sequence of six consecutive happy numbers.

It is easy to verify that each of these is a happy number:

7899999999999959999999996 7899999999999959999999997 7899999999999959999999998 7899999999999959999999999 7899999999999960000000000 7899999999999960000000001

Note that these are 25 digit numbers, so if there were a smaller N beginning a sequence of six consecutive happy numbers, it must have S(N) < 2025 = 25 · 9^{2}. El-Sedy and Siksek [2] note the following:

Lemma 2. If N_{1} and N_{2} are natural numbers with N_{2} < 10^{k} then S(N_{1} ∗ 10^{k} + N_{2}) = S(N_{1}) + S(N_{2}).

Let N ≤ 7899999999999959999999996 begin a string of six consecutive happy numbers. Let N = N_{1}.d_{0} where d_{0} is the final digit of N, and N_{1} is formed from the rest of the digits. We organize our proof of the proposition by looking at the various possibilities for d_{0}.

Let M_{1} = S(N_{1}). Then S(N) = M_{1} + S(d_{0}) and, as noted above, we may assume M_{1} < 2025.

Lemma 3. Let N ≤ 7899999999999959999999996 and N = N_{1}.d_{0}. If d_{0} = 0, one can have at most three successive happy numbers, N, N + 1, N + 2.

Proof: Suppose the last digit of N is d_{0} = 0. Note that S(N) = S(N_{1}) = M_{1}, S(N +1) = S(N_{1})+1^{2} = M_{1}+1^{2}, S(N +2) = S(N_{1})+2^{2} = M_{1}+2^{2}, and S(N +3) = S(N_{1})+3^{2} = M_{1}+3^{2}. We simply calculate that M_{1}, M_{1} + 1^{2}, M_{1} + 2^{2} and M_{1} + 3^{2} are not simultaneously happy for any M_{1} < 2025. (For the relevant Maple programs, see [9].)

Lemma 4. Let N ≤ 7899999999999959999999996 and N = N_{1}.d_{0}. Suppose d_{0} = 1, 2, 3, 4 or 5. Then there are at most four consecutive happy numbers beginning at N.

Proof: We check if M_{1}+d_{0}^{2}, M_{1}+(d_{0}+1)^{2}, M_{1}+(d_{0}+2)^{2}, M_{1}+(d_{0}+3)^{2} and M_{1}+(d_{0}+4)^{2} are simultaneously happy for any value of M_{1} ≤ 2025; our calculations show there are at most four consecutive happy numbers for N with d_{0} = 1, 2, 3, 4 or 5.

Lemma 5. Let N ≤ 7899999999999959999999996 and N = N_{1}.d_{0}. Suppose d_{0} = 8 or 9. Then there are at most five consecutive happy numbers beginning at N.

Proof: Suppose N has final digit d_{0} = 8. Then N + 2 would have final digit 0, so by Lemma 2, the sequence can extend to at most N + 4. Similarly, if d_{0} = 9 then N + 1 has final digit 0 and by Lemma 2 the sequence extends to at most N + 3. In neither case can we have six consecutive happy numbers. This proves the lemma.

Lemma 6. Let N ≤ 7899999999999959999999996 and N = N_{1}.d_{0}. Suppose d_{0} = 7. Then there are at most five consecutive happy numbers beginning at N.

Proof: Suppose N ends in the digit d_{0} = 7. Using a Maple program, we checked for three consecutive happy numbers, that is, we checked if M_{1} + 7^{2}, M_{1} + 8^{2}, and M_{1} + 9^{2} are all happy for some M_{1} < 2025. There are three cases: M_{1} = 568, 574 and 1839.

We now show that M_{1} = 568 cannot yield three happy numbers “after the carry.” Note that N + 3 = (N_{1} + 1).0. Set N_{1} = N_{2}.d.9 … 9 where digit d ≤ 8, and by convention N_{2} = 0 if N_{2} is empty, and N_{2} = 0 and d = 0 if both are empty. Let k be the number of digits of 9 ending N_{1}. Then S(N_{1}) = S(N_{2}) + d^{2} + 9^{2}k, so S(N_{2}) = S(N_{1}) − d^{2} − 9^{2}k. Also, N_{1} + 1 = N_{2}.(d + 1).0 … 0 with k zeros at the end, so S(N_{1} + 1) = S(N_{2}) + (d + 1)^{2}. Thus, S(N_{1} + 1) = S(N_{1}) + (d + 1)^{2} − d^{2} − 9^{2}k = S(N_{1}) + (2d + 1) − 9^{2}k. Since M_{1} = S(N_{1}) = S(N_{2}) + d^{2} + 9^{2}k = 568, we have 9^{2}k ≤ 568 so k ≤ 7. We now look for values (k, d), with 0 ≤ k ≤ 7 and 0 ≤ d ≤ 8, for which these three are happy:

S(N + 3) = M_{1} + 2d + 1 − 81k + 0^{2},

S(N + 4) = M_{1} + 2d + 1 − 81k + 1^{2},
S(N + 5) = M_{1} + 2d + 1 − 81k + 2^{2}.

A simple computer search shows that this never happens.

Similarly, when M_{1} = 574 there are no pairs (k, d) giving three consecutive happy numbers “after the carry.” When M_{1} = 1839, however, we have one solution, namely k = 9, d = 5, and S(N_{2}) = 1085. Using the methods described in the next section, we find that the minimal value for N_{2} with S(N_{2}) = 1085 is N_{2} = 78999999999999. Thus, N = N2.d.9 … 9.7 = 7899999999999959999999997 which of course is one more than the minimal case we find in the next lemma.

Lemma 7. Let N ≤ 7899999999999959999999996 and N = N_{1}.d_{0}. Suppose d_{0} = 6. Then there are at most five consecutive happy numbers beginning at N, unless

N = 7899999999999959999999996

which begins a sequence of six consecutive happy numbers.

Proof: Suppose N ends in the digit d_{0} = 6. We check for four consecutive happy numbers, that is, we check whether M_{1}+6^{2}, M_{1}+7^{2}, M_{1}+8^{2} and M_{1}+9^{2} are happy for any M_{1} < 2025. We find one case: M_{1} = 1839.

As before, set N_{1} = N_{2}.d.9 … 9 where digit d ≤ 8, and by convention N_{2} = 0 if N_{2} is empty and N_{2} = 0 and d = 0 if both are empty. Let k be the number of digits of 9 ending N_{1}. Then as before, S(N_{1} +1) = S(N_{1})+(2d+1)−9^{2}k. Since M_{1} = S(N_{1}) = S(N_{2})+d^{2} +9^{2}k = 1839, we have 9^{2}k ≤ 1839 so k ≤ 22. We now look for values (k, d), with 0 ≤ k ≤ 22 and 0 ≤ d ≤ 8, for which these two are happy:

\begin{matrix}S(N + 4) = M_{1} + 2d + 1 − 81k + 0^{2}, \\ S(N + 5) = M_{1} + 2d + 1 − 81k + 1^{2}. \end{matrix}

Our search yields five pairs, (k, d), each corresponding to a string of six consecutive happy numbers. We list these pairs along with the corresponding values of S(N − 2) in the table, below. For each value S(N_{2}), we list the least value of N_{2} possible, computed using the methods of the next section, then list the resulting value of N.

k d S(N_{2})  least N_{2} for S(N_{2})  N
1 6 1722 27799999999999999999999 27799999999999999999999696
5 6 1398  2779999999999999999 27799999999999999996999996
9 5 1085  78999999999999 7899999999999959999999996
15 6  588  277999999 27799999969999999999999996
19 0  300  57899 57899099999999999999999996

We see that the smallest N corresponds to k = 9 and d = 5. Thus, we have proven that the smallest N beginning a sequence of six happy numbers is 7899999999999959999999996.

Corollary 8. N_{0} = 7899999999999959999999996 is the smallest number that begins a sequence of seven consecutive happy numbers.

Proof: It is easy to verify that 7899999999999960000000002 is a happy number. Amazingly, the same value of N that begins the least sequence of six consecutive happy numbers also begins the least sequence of seven consecutive happy numbers.

Similar arguments prove that the values of N given in the table in Section 1 are indeed the smallest beginning sequences of 8, 9, 10, 11, 12, and 13 consecutive happy numbers. Maple worksheets on the author’s homepage [9] contain the calculations. The optimal example for 14 consecutive happy numbers seems to be the 34567901197532 digit number 7.(2098518518492 nines).8.(32469382679037 nines).3 which is clearly too large to checked by these techniques.

3 Minimal N with S(N) = n

Given a positive integer n, we want to determine the least N such that S(N) = n. Define L(n) = min{N|S(N) = n}. Clearly, if n_{1} ≠ n_{2} then L(n_{1}) ≠ L(n_{2}). Also, L(n) has no zero digits and its digits are in nondecreasing order. We now show how to calculate L(n).

Lemma 9. The largest n_{0} for which L(n_{0}) has no digit of 9 is n_{0} = 448.

Proof: We already noted that L(n) has no digit 0. We claim that L(n) cannot contain more than one digit 5, no more than two digits 3, no more than three digits 1 or 2 or 4 or 6 or 7, nor more than seven digits 8. This follows from the observations that S(1111) = S(2), S(2222) = S(4), S(333) = S(115), S(4444) = S(8), S(55) = S(17), S(6666) = S(488), S(7777) = S(2888) and S(88888888) = S(15999999). Thus, if L(n) does not contain the digit 9, it cannot exceed

1112223344456667778888888.

Note that S(1112223344456667778888888) = 809 so if n > 809 then L(n) has at least one digit 9.

We now find all values of L(n) for n ≤ 809. Clearly, L(1) = 1, L(2) = 11, L(3) = 111 and L(4) = 2. If d_{0} is the last digit of L(n) and n > d_{0}^{2}, then L(n − d_{0}^{2}) must be (L(n) − d_{0})/10 (i.e., remove the last digit of L(n)). Of course, we do not know what the last digit is, so we look at L(n − d^{2}) · 10 + d for each potential last digit d. If we know L(k) for all k < n then L(n) = min_{d=1,2,...,9}{L(n − d^{2}) · 10 + d}. Direct calculation shows that every L(n) with 448 < n ≤ 809 has a digit 9, thus, the largest n for which L(n) has no digit 9 is n = 448, for which L(448) = 8888888, ending the proof of this lemma.

Lemma 10. For n ≥ 486, let q = ⌊\frac{n}{81}⌋ − 5 and n_{0} = n − 81q. Then L(n) = L(n_{0}) · 10^{q} + (10^{q} − 1).

Proof: For n ≥ 6 ∗ 9^{2} = 486, we have q ≥ 1 and n_{0} < 486. By Lemma 7, since n ≥ 486 > 448, the last digit of L(n) must be a nine, so L(n) = L(n − 9^{2}) · 10 + 9. We proceed by induction on q. If q = 1, then L(n) = L(n − 9^{2}) · 10 + 9 = L(n_{0}) + (10^{1} − 1). Assuming the inductive hypothesis, L(n − 9^{2}) = L(n_{0}) · 10^{q−1} + (10^{q−1} − 1), and so L(n) = L(n − 9^{2}) · 10 + 9 = L(n_{0}) · 10^{q−1+1} + (10^{q−1} − 1) · 10 + 9 = L(n_{0}) · 10^{q} + (10^{q} − 1). In other words, L(n) is simply q digits of 9 concatenated to the end of L(n_{0}). This ends our proof.

In Section 4, we will need the cubic happy number analogies to Lemmas 7 and 8. Define L_{3}(n) = min{N|S_{3,10}(N) = n} where S_{3,10}(∑_{i=0}^{n} a_{i}10^{i}) = ∑_{i=0}^{n} a_{i}^{3}. We can show that the cubic case analog to the quadratic extremal case N = 1112223344456667778888888 above is

N = 11111112222223333444445555666777777888888888

which has S(N) = 8297. Arguments analogous to those in Lemmas 7 and 8 show the following:

Lemma 11. The largest n_{0} for which L_{3}(n_{0}) has no digit of 9 is n_{0} = 4609. For n ≥ 5832, let q = ⌊\frac{n}{9^{3}} ⌋ − 7 and n_{0} = n − 9^{3}q. Then L_{3}(n) = L_{3}(n_{0}) · 10^{q} + (10^{q} − 1).

As an aside, we provide a table of the largest n for which L(n) does not contain certain digits, and the corresponding table for L_{3}(n).

largest allowable digit in L(n) n_{max} L(n_{max})
1  3  111
2  12  222
3  23  1233
4  48  444
5  48  444
6  112  2666
7  151  2777
8  448 8888888

largest allowable digit in L_{3}(n) n_{max}  L_{3}(n_{max})
1 7 1111111
2  50 11222222
3  124  223333
4  329  1244444
5  572  245555
6  932  555566
7  2183  5777777
8  4609 1888888888

Note that it is possible that n_{2} > n_{1} and L(n_{2}) < L(n_{1}), for instance, L(243) = 999 < L(7) = 1112. This extreme difference of 243 − 7 = 236 does not happen again, but since L(162+9^{2}m) < L(54+9^{2}m) for all nonnegative integers m, L(n_{2}) < L(n_{1}) with n_{2}−n_{1} = 108 does occur infinitely often.

4 Sequences of Cubic Happy Numbers

Grundman and Teeple [4] define generalized e-power b-happy numbers in terms of the generalized digit power function

S_{e,b}(∑_{i=0}^{n} a_{i}b^{i}) = ∑_{i=0}^{n} a_{i}^{e},

where 0 ≤ a_{i} < b. If for some m we have S_{e,b}^{m}(N) = 1 then N is an e-power b-happy number. The classic happy numbers have e = 2 and b = 10, and the well-studied cubic happy numbers have e = 3 and b = 10. Grundman and Teeple note that each e-power b-happy number is congruent to 1 modulo d = gcd(e, b − 1). So Grundman and Teeple define a d-consecutive sequence as an arithmetic sequence with common difference d. They prove one can find arbitrarily long such sequences for many choices of {e, b}, in particular, for the cubic happy numbers where e = 3, b = 10, and d = 3.

Our methods can be extended to find the least 3-consecutive sequence of cubic happy numbers. A naive search shows that the smallest 3-consecutive sequence of two cubic happy numbers is {1198, 1201}, and that the smallest of length three is {169957, 169960, 169963}. Here is a table of our results:

n digits  N
2  4  1198
3  6  169957
4  16  1555599999999916
5  29 35588899999799999999999999989
6 101 28888.(21 nines).1.(72 nines).89
7 234  3577.(228 nines).45
8 242 1126.(229 nines).1.(6 nines).89
9 276 12777.(151 nines).5.(117 nines).86

We will illustrate our method in the proof below.

Proposition 12. N_{0} = 28888.(21 nines).1.(72 nines).89 is the smallest number that begins a sequence of six 3-consecutive cubic happy numbers.

Proof: Let S = S_{3,10}. Since N_{0} has 101 digits, we do not need to check any N with S(N) ≥ 101 · 9^{3} = 73629. Whereas in the classic happy number case above we split off the final digit, in the cubic happy number case it is more convenient to split off the final two digits. Suppose N ≤ N_{0} begins a sequence of six 3-consecutive cubic happy numbers.

Let N = N_{1}.d_{1}.d_{0} where 0 ≤ d_{0}, d_{1} ≤ 9 are the last two digits, and set M_{1} = S(N_{1}) and M_{2} = S(N_{1}+1). Note that M_{1} ≤ 99·9^{3} < 73629 and that M_{2} = S(N_{1}+1) < 100·9^{3} < 73629. For convenience let t = d_{1}.d_{0}.

We first check each set {M + S(u), M + S(u + 3), M + S(u + 6), M + S(u + 9), M + S(u + 12)} with 0 ≤ u ≤ 87 and M < 73629, and verify that no set has all five numbers cubic happy. In fact, our calculations show more; if M < 73629 and u = 0, 1, or 2, then no set {M + S(u), M + S(u + 3), M + S(u + 6), M + S(u + 9)} has four cubic happy numbers.

Suppose N = N_{1}.t begins a 3-consecutive sequence of six cubic happy numbers with t ≤ 87. Then {M_{1} + S(t), M_{1} + S(t + 3), M_{1} + S(t + 6), M_{1} + S(t + 9), M_{1} + S(t + 12)} would need to be a set of five cubic happy numbers, which we just noted cannot happen for M_{1} < 73629.

Suppose N = N_{1}.t begins a 3-consecutive sequence of six cubic happy numbers with t = 97, 98, or 99. Then N + 3 = (N_{1} + 1).0.d_{3} where d_{3} = 0, 1, or 2. Thus, {M_{2} + S(d_{3}), M_{2} + S(d_{3} + 3), M_{2} + S(d_{3} + 6), M_{2} + S(d_{3} + 9), M_{2} + S(d_{3} + 12)} would be a set of five cubic happy numbers, which we noted never happens for M_{2} < 73629.

Similarly, suppose N = N_{1}.t begins a 3-consecutive sequence of six cubic happy numbers with t = 94, 95, or 96. Then N + 6 = (N_{1} + 1).0.d_{6} where d_{6} = 0, 1, or 2. Thus, {M_{2} + S(d_{6}), M_{2} + S(d_{6} + 3), M_{2} + S(d_{6} + 6), M_{2} + S(d_{6} + 9)} would be a set of four cubic happy numbers with d_{6} equal to 0, 1 or 2; as we noted above, this cannot happen for M_{2} < 73629.

Calculations for all M_{1} < 73629 and t = 91 show that {M_{1} + S(t), M_{1} + S(t + 3), M_{1} + S(t + 6)} can never be a set of three cubic happy numbers. Further calculation shows that for all M_{1} < 73629 and t = 88 or 90, {M_{1} + S(t), M_{1} + S(t + 3), M_{1} + S(t + 6), M_{1} + S(t + 9)} is never a set of four cubic happy numbers.

When t = 93, only when M_{1} = 45001 or M_{1} = 54019 does the set {M_{1} + S(t), M_{1} + S(t + 3), M_{1} + S(t + 6)} have three cubic happy numbers.

When t = 89, {M_{1}+S(t), M_{1}+S(t+3), M_{1}+S(t+6), M_{1}+S(t+9)} is a set consisting solely of cubic happy numbers only when M_{1} = 16736, 69854 or 70736. Since S(N_{1}.98) = S(N_{1}.89), we conclude that each member of the set {S(N), S(N + 3), S(N + 6), S(N + 9)} = {M_{1} + S(89), M_{1} + S(92), M_{1} + S(95), M_{1} + S(98)} with N = N_{1}.89 is a cubic happy number if and only if the set {S(N), S(N + 3), S(N + 6)} = {M_{1} + S(92), M_{1} + S(95), M_{1} + S(98)} with N = N_{1}.92 consists solely of cubic happy numbers. Therefore, we do not need to consider N with t = 92.

Summarizing, we only need to consider five cases: (t, M_{1}) = (93, 45001), (93, 54019), (89, 16736), (89, 69854), and (89, 70736).

We begin by considering the two cases with t = 93. As in the proof of Proposition 1, we set N_{1} = N_{2}.d_{2}.9 … 9 where digit d_{2} ≤ 8 and there are exactly k digits of 9 ending N_{1}; by convention, N_{2} = 0 if N_{2} is empty, and N_{2} = 0 and d_{2} = 0 if both are empty. When t = 93, N + 9 = N_{2}.(d_{2} + 1).(0 … 0).02, N + 12 = N_{2}.(d_{2} + 1).(0 … 0).05 and N + 15 = N_{2}.(d_{2} + 1).(0 … 0).08 where the (0 … 0) is a string of exactly k zeros. Since M_{1} = S(N_{1}) = S(N_{2}) + d_{2}^{3} + k · 9^{3}, we have S(N + 9) = S(N_{2}) + (d_{2} + 1)^{3} + 2^{3} = (M_{1} − d_{2}^{3} − k ·9^{3})+(d_{2} +1)^{3} +2^{3}; similarly, S(N +12) = M_{1} −d_{2}^{3} −k ·9^{3} +(d_{2} +1)^{3} +5^{3} and S(N +15) = M_{1} −d_{2}^{3} −k ·9^{3} +(d_{2} +1)^{3} +8^{3}. Therefore we need only check if the following are cubic happy numbers for some pair (d_{2}, k) where 0 ≤ d_{2} ≤ 8 and 0 ≤ k < (M_{1} − d_{2}^{3} + (d_{2} + 1)^{3} + 2^{3})/9^{3}:

S(N + 9) = M_{1} − d_{2}^{3} − k · 9^{3} + (d_{2} + 1)^{3} + 2^{3},
S(N + 12) = M_{1} − d_{2}^{3} − k · 9^{3} + (d_{2} + 1)^{3} + 5^{3},
S(N + 15) = M_{1} − d_{2}^{3} − k · 9^{3} + (d_{2} + 1)^{3} + 8^{3}.

A quick computation shows that this never happens for M_{1} = 45001 or 54019.

Finally, we consider the cases d = 89 and M_{1} = 16736, 69854, or 70736. Letting N = N_{1}.89, we have N + 3 = N_{1}.92, N + 6 = N_{1}.95 and N + 9 = N_{1}.98. We again decompose N_{1} = N_{2}.d_{2}.9 … 9 where d_{2} is a digit not equal to 9, and there are exactly k digits of 9 ending N_{1} (by convention, N_{2} = 0 if N_{2} is empty, and N_{2} = 0 and d_{2} = 0 if both are empty). Then N + 12 = N_{2}.(d_{2} + 1).(0 … 0).01 and N + 15 = N_{2}.(d_{2} + 1).(0 … 0).04 where the (0 … 0) is a string of exactly k zeros. Again we have M_{1} = S(N_{1}) = S(N_{2}) + d_{2}^{3} + k · 9^{3}, so S(N + 12) = S(N_{2}) + (d_{2} + 1)^{3} + 1^{3} = M_{1} − d_{2}^{3} − k · 9^{3} + (d_{2} + 1)^{3} + 1^{3} and similarly S(N + 15) = M_{1} − d_{2}^{3} − k · 9^{3} + (d_{2} + 1)^{3} + 4^{3}.

A short calculation with M_{1} = 16736 finds only one nonnegative integer k < (M_{1} − d_{2}^{3} + (d_{2} + 1)^{3} + 1^{3})/9^{3} for which S(N + 12) is cubic happy (this in fact gives the least example of a 3-consecutive sequence of five cubic happy numbers), but the corresponding S(N + 15) is not a cubic happy number. Calculations with M_{1} = 70736 yield no (k, d_{2}) with both S(N + 12) and S(N + 15) cubic happy. When M_{1} = 69854, both k = 1, d_{2} = 1 and also k = 72, d_{2} = 1 yield a pair of cubic happy numbers {S(N + 12), S(N + 15)}. Using Lemma 9, we can calculate that the smaller N comes from k = 72 and d_{2} = 1, resulting in N = 28888 · 10^{96} + (10^{21} − 1) · 10^{75} + 1 · 10^{74} + (10^{72} − 1) · 10^{2} + 89.

Thus, our claimed value of N is indeed the lowest that begins a 3-consecutive sequence of six cubic happy numbers.

References

[1] A. F. Beardon, Sums of squares of digits, Math. Gazette 82 (1998), 379–388.

[2] E. El-Sedy and S. Siksek, On happy numbers, Rocky Mountain J. Math., 30 (2000), 565–570.

[3] R. Honsberger, Ingenuity in Mathematics, New Mathematical Library, Vol. 23, Mathematical Association of America, 1970.

[4] H. G. Grundman and E. A. Teeple, Generalized happy numbers, Fibonacci Quart., 39 (2001), 462–466.

[5] H. G. Grundman and E. A. Teeple, Sequences of consecutive happy numbers, Rocky Mountain J. Math., 37 (2007), 1905–1916.

[6] H. G. Grundman and E. A. Teeple, Sequences of generalized happy numbers with small bases, J. Integer Seq., 10 (2007), Article 07.1.8.

[7] R. Guy, Unsolved Problems in Number Theory, Springer-Verlag, 2nd ed., 1994.

[8] Hao Pan, On consecutive happy numbers, J. Number Theory 128 (2008), 1646–1654.

[9] R. A. Styer, Maple programs available at

   http://www.homepage.villanova.edu/robert.styer/HappyNumbers/happy numbers.htm

.

[10] E. A. Teeple, An Introduction to Generalized Happy Numbers unpublished Undergraduate Honors Thesis, Bryn Mawr College, 30 April 1998.

2000 Mathematics Subject Classification: Primary 11A63. Keywords: happy number, cubic happy number.

(Concerned with sequence \underline{A055629}.)

Received August 26 2009; revised version received November 27 2009; May 4 2010; June 4 2010. Published in Journal of Integer Sequences, June 8 2010.

Return to Journal of Integer Sequences home page.