\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amscd}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics,amsmath,amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{epsf}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{8.9in}

\newcommand{\seqnum}[1]{\href{http://www.research.att.com/cgi-bin/access.cgi/as/~njas/sequences/eisA.cgi?Anum=#1}{\underline{#1}}}

\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{conjecture}[theorem]{Conjecture}
\newtheorem{defin}[theorem]{Definition}
\newenvironment{definition}{\begin{defin}\normalfont\quad}{\end{defin}}
\newtheorem{examp}[theorem]{Example}
\newenvironment{example}{\begin{examp}\normalfont\quad}{\end{examp}}
\newtheorem{rema}[theorem]{Remark}
\newenvironment{remark}{\begin{rema}\normalfont\quad}{\end{rema}}

\begin{center}
\vskip 1cm{\LARGE\bf 
Smallest Examples of Strings of Consecutive \\
\vskip .1in
Happy Numbers
}
\vskip 1cm
\large
Robert Styer \\
Department of Mathematical Sciences \\
Villanova University\\
Villanova, PA 19085 \\
USA \\
\href{mailto:robert.styer@villanova.edu}{\tt robert.styer@villanova.edu} \\
\end{center}

\vskip .2in

\begin{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, \dots,
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.
\end{abstract}


\section{Introduction}

Many recreational math problems deal with various combinations of digits.  Let $N = \sum_{j=0}^n a_j 10^j$ with $0 \le a_j \le 9$ be the decimal expansion of N.  Define $S(N) = \sum_{j=0}^n a_j^2$, and define $S^k$ to be the $k$-fold iterate of $S$.  Honsberger~\cite{hon} (see also Beardon~\cite{be} and Grundman and Teeple~\cite{gt1}) 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~\cite{guy}.  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~\cite{guy} 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~\cite{es} 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~\cite{tee}.)  See also Grundman and Teeple~\cite{gt2,gt3}, and Pan~\cite{pan}.  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 \lq\lq A technique is a trick used more than once.''  In their paper on happy numbers, El-Sedy and Siksek~\cite{es} end their paper by using a trick to calculate a huge number $l=\sum_{r=1}^{233192} 9 \cdot 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 {\rm \ nines}).6.(144 {\rm \ nines}).5$ means 
$$N = 58 \cdot 10^{157} + 10^{146}(10^{11}-1) + 6 \cdot 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.  

\begin{center}
\begin{tabular}{|r|r|c|}
\hline
$n$ & $digits$ & $N$ \\
\hline
2 & 2 & 31 \\
\hline
3 & 4 & 1880 \\
\hline
4 & 4 & 7839 \\
\hline
5 & 5 & 44488 \\
\hline
6 & 25 & 7899999999999959999999996 \\
\hline
7 & 25 & 7899999999999959999999996 \\
\hline
8 & 159 & 58.(11 {\rm \ nines}).6.(144 {\rm \ nines}).5 \\
\hline
9 & 215 & 26.(137 {\rm \ nines}).7.(74 {\rm \ nines}).5 \\
\hline
10 & 651 & 38.(560 {\rm \ nines}).0.(87 {\rm \ nines}).5 \\
\hline
11 & 1571 & 27.(280 {\rm \ nines}).0.(1287 {\rm \ nines}).4 \\
\hline
12 & 158162 & 388.(158021 {\rm \ nines}).8.(136 {\rm \ nines}).4 \\
\hline
13 & 603699 &288.(218491 {\rm \ nines}).3.(385203 {\rm \ nines}).3 \\
\hline
\end{tabular}
\end{center}
   

\section{Six Consecutive Happy Numbers}

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

\begin{proposition} $N_0 = 7899999999999959999999996$ is the smallest number that begins a sequence of six consecutive happy numbers.    
\end{proposition}

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

\bigskip

\begin{tabular}{c}
7899999999999959999999996 \\
7899999999999959999999997 \\
7899999999999959999999998 \\
7899999999999959999999999 \\
7899999999999960000000000 \\
7899999999999960000000001 \\
\end{tabular}  

\bigskip

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 \cdot 9^2$.   El-Sedy and Siksek~\cite{es} note the following:

\begin{lemma}  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)$.  \end{lemma} % L 1

Let $N \le 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$.    

\begin{lemma}
Let $N \le 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$.  
\end{lemma} %L 2

% \begin{proof}
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~\cite{st}.)   
% \end{proof} 

\begin{lemma}
Let $N \le 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$.  
\end{lemma}  % L 3

%\begin{proof}
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 \le 2025$; our calculations show there are at most four consecutive happy numbers for $N$ with $d_0=1$, 2, 3, 4 or 5.  
%\end{proof} 


\begin{lemma}
Let $N \le 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$.  
\end{lemma}  % L 4

%\begin{proof}
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.  
%\end{proof}

\begin{lemma}
Let $N \le 7899999999999959999999996$ and $N = N_1.d_0$. Suppose $d_0 = 7$. Then there are at most five consecutive happy numbers beginning at $N$.      
\end{lemma}  % L 5

%\begin{proof}
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 \lq\lq after the carry.''  Note that $N+3 = (N_1 + 1).0$. Set $N_1 = N_2.d.9 \dots 9$ where digit $d \le 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 \dots 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 \le 568$ so $k \le 7$.  We now look for values $(k,d)$, with $0 \le k \le 7$ and $0 \le d \le 8$, for which these three are happy:  

\begin{tabular}{l}
$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$. \\
\end{tabular}

\noindent
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 \lq\lq 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 \dots 9.7 = 7899999999999959999999997$ which of course is one more than the minimal case we find in the next lemma.    
%\end{proof}

\begin{lemma}
Let $N \le 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.    
\end{lemma}  % L 6

%begin{proof}
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 \dots 9$ where digit $d \le 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 \le 1839$ so $k \le 22$.  We now look for values $(k,d)$, with $0 \le k \le 22$ and $0 \le d \le 8$, for which these two are happy:  

\begin{tabular}{l}
$S(N+4) = M_1+2d+1-81k+0^2$, \\
$S(N+5) = M_1+2d+1-81k+1^2$. \\
\end{tabular}

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$.   

\bigskip

\begin{center}
\begin{tabular}{|r|c|r|r|r|}
\hline
$k$ & $d$ & $S(N_2)$ & least $N_2$ for $S(N_2)$ & $N$  \\
\hline
1 & 6 & 1722 & 27799999999999999999999 & 27799999999999999999999696 \\
\hline
5 & 6 & 1398 & 2779999999999999999 & 27799999999999999996999996 \\
\hline
9 & 5 & 1085 & 78999999999999 & 7899999999999959999999996 \\
\hline
15 & 6 & 588 & 277999999 & 27799999969999999999999996 \\
\hline
19 & 0 & 300 & 57899 & 57899099999999999999999996 \\
\hline
\end{tabular}
\end{center}

\bigskip

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$.    
%\end{proof} 

\begin{corollary} $N_0 = 7899999999999959999999996$ is the smallest number that begins a sequence of seven consecutive happy numbers.    
\end{corollary}

% \begin{proof}
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.  
% \end{proof}


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~\cite{st} contain the calculations.   The optimal example for 14 consecutive happy numbers seems to be the 34567901197532 digit number $ 7.(2098518518492 {\rm \ nines}).8.(32469382679037 {\rm \ nines}).3$ which is clearly too large to checked by these techniques.  




\section{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 \ne n_2$ then $L(n_1) \ne 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)$.  

\begin{lemma}
The largest $n_0$ for which $L(n_0)$ has no digit of 9 is $n_0 = 448$.    
\end{lemma}  % L 7

%\begin{proof}
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 \le 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)\cdot 10 + d$ for each potential last digit $d$.  If we know $L(k)$ for all $k<n$ then $L(n) = \min_{d= 1, 2, \dots, 9} \{ L(n-d^2) \cdot 10 + d \}$.  Direct calculation shows that every $L(n)$ with $448 < n \le 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.  
%\end{proof}

\begin{lemma}
For $n \ge  486$, let $q = \lfloor{n \over 81}\rfloor - 5$ and $n_0 = n- 81 q$.  Then  
$L(n) = L(n_0)\cdot 10^{q} + (10^{q} -1)$.   
\end{lemma}  % L 8

%\begin{proof}
Proof:
For $n \ge 6*9^2 = 486$, we have $q \ge 1$ and $n_0  < 486$.  By Lemma 7, since $n \ge 486 > 448$, the last digit of $L(n)$ must be a nine, so $L(n) = L(n-9^2) \cdot 10 + 9$.  We proceed by induction on $q$.  If $q=1$, then $L(n) = L(n- 9^2) \cdot 10 + 9 = L(n_0)+(10^1 -1)$.  Assuming the inductive hypothesis, $L(n - 9^2) = L(n_0) \cdot 10^{q-1} + ( 10^{q-1} - 1)$, and so $L(n) = L(n-9^2) \cdot 10 + 9 = L(n_0) \cdot 10^{q-1+1} + (10^{q-1} -1) \cdot 10 +9 = L(n_0) \cdot 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.  
%\end{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} ( \sum_{i=0}^n a_i 10^i) = \sum_{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:  

\begin{lemma}
The largest $n_0$ for which $L_3(n_0)$ has no digit of 9 is $n_0 = 4609$. 
For $n \ge  5832$, let $q = \lfloor{n \over 9^3}\rfloor - 7$ and $n_0 = n- 9^3 q$.  Then  
$L_3(n) = L_3(n_0)\cdot 10^{q} + (10^{q} -1)$.  
\end{lemma}  % L 9 


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)$.  

\bigskip

\begin{center}
\begin{tabular}{|c|r|r|}
\hline
largest allowable digit in $L(n)$ & $n_{max}$ & $L(n_{max})$ \\
\hline
1 & 3 & 111 \\
\hline
2 & 12 &222 \\
\hline
3 & 23  & 1233 \\
\hline
4 & 48 & 444 \\
\hline
5 & 48 & 444 \\
\hline
6 & 112 & 2666 \\
\hline
7 & 151 & 2777 \\
\hline
8 & 448 & 8888888 \\
\hline
\end{tabular}
\end{center}

\bigskip

\begin{center}
\begin{tabular}{|c|r|r|}
\hline
largest allowable digit in $L_3(n)$ & $n_{max}$ & $L_3(n_{max})$ \\
\hline
1 & 7 & 1111111 \\
\hline
2 & 50 & 11222222 \\
\hline
3 & 124 & 223333 \\
\hline
4 & 329 & 1244444 \\
\hline
5 & 572 & 245555 \\
\hline
6 & 932 & 555566 \\
\hline
7 & 2183 & 5777777 \\
\hline
8 & 4609 & 1888888888 \\
\hline
\end{tabular}
\end{center}

\bigskip

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.  


\section{Sequences of Cubic Happy Numbers}

Grundman and Teeple~\cite{gt1} define generalized $e$-power $b$-happy numbers in terms of the generalized digit power function
$$S_{e,b} ( \sum_{i=0}^n a_i b^i) = \sum_{i=0}^n a_i^e,$$
where $0 \le 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:

\bigskip

\begin{center}
\begin{tabular}{|r|r|c|}
\hline
$n$ & digits & N \\
\hline
2 & 4 & 1198 \\
\hline
3 & 6 & 169957 \\
\hline
4 & 16 & 1555599999999916 \\
\hline
5 & 29 & 35588899999799999999999999989 \\
\hline
6 & 101 & 28888.(21 \ {\rm nines}).1.(72 \ {\rm nines}).89 \\
\hline
7 & 234 & 3577.(228 \ {\rm nines}).45 \\
\hline
8 & 242 & 1126.(229 \ {\rm nines}).1.(6 \ {\rm nines}).89 \\
\hline
9 & 276 & 12777.(151 \ {\rm nines}).5.(117 \ {\rm nines}).86 \\
\hline
\end{tabular}
\end{center}

\bigskip

We will illustrate our method in the proof below.   

\begin{proposition} $N_0 = 28888.(21 \ {\rm nines}).1.(72 \ {\rm nines}).89$ is the smallest number that begins a sequence of six $3$-consecutive cubic happy numbers.    
\end{proposition}  %prop 2

%\begin{proof}
Proof:  
Let $S = S_{3,10}$.  Since $N_0$ has 101 digits, we do not need to check any $N$ with $S(N) \ge 101 \cdot 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 \le N_0$ begins a sequence of six $3$-consecutive cubic happy numbers.  Let $N = N_1.d_1.d_0$ where $0 \le d_0, d_1 \le 9$ are the last two digits, and set $M_1 = S(N_1)$ and $M_2 = S(N_1 + 1)$.  Note that $M_1 \le  99 \cdot 9^3 < 73629$ and that $M_2 = S(N_1 +1) < 100 \cdot 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 \le u \le 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 \le 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 \dots 9$ where digit $d_2 \le 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 \dots 0).02$, $N+12 = N_2.(d_2+1).(0 \dots 0).05$ and $N+15 = N_2.(d_2+1).(0 \dots 0).08$ where the $(0 \dots 0)$ is a string of exactly $k$ zeros.  Since $M_1 = S(N_1) = S(N_2)+ d_2^3 + k\cdot 9^3$, we have $S(N+9) = S(N_2)+ (d_2+1)^3 + 2^3 = (M_1 - d_2^3 - k \cdot 9^3 ) +(d_2+1)^3 + 2^3 $; similarly, $S(N+12) = M_1 - d_2^3 - k\cdot 9^3 +(d_2+1)^3 + 5^3$ and $S(N+15) = M_1 - d_2^3 - k\cdot 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 \le d_2 \le 8$ and $0 \le k < (M_1 - d_2^3 +(d_2+1)^3+2^3)/9^3$:

\begin{tabular}{l}
$S(N+9) = M_1 - d_2^3 - k \cdot 9^3 +(d_2+1)^3 + 2^3$, \\
$S(N+12) = M_1 - d_2^3 - k \cdot 9^3 +(d_2+1)^3 + 5^3$, \\
$S(N+15) = M_1 - d_2^3 - k \cdot 9^3 +(d_2+1)^3 + 8^3$. \\
\end{tabular}

\noindent
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 \dots 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 \dots 0).01$ and $N+15 = N_2.(d_2+1).(0 \dots 0).04$ where the $(0 \dots 0)$ is a string of exactly $k$ zeros.  Again we have $M_1 = S(N_1) = S(N_2)+ d_2^3 + k\cdot 9^3$, so $S(N+12) = S(N_2)+ (d_2+1)^3 + 1^3 = M_1 - d_2^3 - k \cdot 9^3  +(d_2+1)^3 + 1^3 $ and similarly $S(N+15) = M_1 - d_2^3 - k\cdot 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 \cdot 10^{96}+ (10^{21}-1)\cdot 10^{75}+1 \cdot 10^{74} + (10^{72}-1)\cdot 10^{2} + 89$.  

Thus, our claimed value of $N$ is indeed the lowest that begins a 3-consecutive sequence of six cubic happy numbers.   
%\end{proof}

\bigskip


\begin{thebibliography}{9}

\bibitem{be}
A.~F. Beardon,
\newblock Sums of squares of digits,
\newblock {\em Math. Gazette} {\bf 82} (1998), 379--388.

\bibitem{es}
E.~El-Sedy and S.~Siksek,
\newblock On happy numbers,
\newblock {\em Rocky Mountain J. Math.}, {\bf 30} (2000),
565--570.

\bibitem{hon} 
R.~Honsberger, 
\newblock {\it Ingenuity in Mathematics}, 
\newblock New Mathematical Library, Vol. 23,
\newblock Mathematical Association of America, 1970. 

\bibitem{gt1}
H.~G. Grundman and E.~A. Teeple,
\newblock Generalized happy numbers,
\newblock {\em Fibonacci Quart.}, {\bf 39} (2001), 462--466.

\bibitem{gt2}
H.~G. Grundman and E.~A. Teeple,
\newblock Sequences of consecutive happy numbers,
\newblock {\em Rocky Mountain J. Math.}, {\bf 37} (2007), 1905--1916.

\bibitem{gt3}
H.~G. Grundman and E.~A. Teeple,
\newblock Sequences of generalized happy numbers with small bases, 
\newblock {\em J. Integer Seq.}, {\bf 10} (2007), 
\href{http://www.cs.uwaterloo.ca/journals/JIS/VOL10/Grundman/grundman5.html}{Article 07.1.8}.

\bibitem{guy}
R.~Guy,
\newblock {\em Unsolved Problems in Number Theory},
\newblock Springer-Verlag,  2nd~ed., 1994.

\bibitem{pan}
Hao Pan,
\newblock On consecutive happy numbers,
\newblock {\em J. Number Theory} {\bf 128} (2008), 1646--1654.

\bibitem{st}
R.~A. Styer,
\newblock Maple programs available at \\
\href{http://www.homepage.villanova.edu/robert.styer/HappyNumbers/happy_numbers.htm}{\tt http://www.homepage.villanova.edu/robert.styer/HappyNumbers/happy\_numbers.htm} .

\bibitem{tee}
E.~A. Teeple,
\newblock{An Introduction to Generalized Happy Numbers}
\newblock unpublished Undergraduate Honors Thesis,
Bryn Mawr College, 30 April 1998.


\end{thebibliography}


\bigskip
\hrule
\bigskip

\noindent 2000 {\it Mathematics Subject Classification}: Primary 11A63.

\noindent \emph{Keywords: } happy number, cubic happy number.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequence 
\seqnum{A055629}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received August 26 2009;
revised version received November 27 2009; May 4 2010; June 4 2010.
Published in {\it Journal of Integer Sequences}, June 8 2010.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{http://www.cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in


\end{document}

                                                                                

