<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{amscd}
\usepackage{graphicx}

\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}
\usepackage{latexsym}
\usepackage{epsf}
\usepackage{breakurl}

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

\newcommand{\seqnum}[1]{\href{https://oeis.org/#1}{\rm \underline{#1}}}

\begin{document}

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

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{example}[theorem]{Example}
\newtheorem{conjecture}[theorem]{Conjecture}

\theoremstyle{remark}
\newtheorem{remark}[theorem]{Remark}

\newcommand{\R}{\mathbb{R}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\C}{\mathbb{C}}

\begin{center}
\vskip 1cm{\LARGE\bf 
On a Sequence Related to the Factoradic \\
\vskip .1in
Representation of an Integer
}
\vskip 1cm
\large
Maximiliano S\'anchez Garza \\
Facultad de Ciencias F\'isico Matem\'aticas\\
Universidad Aut\'onoma de Nuevo Le\'on\\ 
Av. Universidad \\
Ciudad Universitaria\\ 
San Nicol\'as de los Garza, Nuevo Le\'on 66451 \\
M\'exico\\
\href{mailto:maxsanchez1312@gmail.com}{\tt maxsanchez1312@gmail.com} \\
\ \\
Enrique Trevi\~no \\
Mathematics Department \\
Lake Forest College\\
555 N. Sheridan Road \\
Lake Forest, IL  60045\\
USA\\
\href{mailto:trevino@lakeforest.edu}{\tt trevino@lakeforest.edu}
\end{center}

\vskip .2 in

\begin{abstract}
For a positive integer $r$, define $j_r$ to be the smallest positive
integer $n$ satisfying $n! &gt; n^{r-1}$. In this paper we prove $j_{r+1}
\in \{j_r+1,j_r+2\}$, which leads us to explore the set of positive
integers $r$ for which $j_{r+1} = j_r+2$. We prove this set has the
same density as the prime numbers. The sequence $j_r$ was introduced by
Carlson, Goedhart, and Harris in their work on factoradic happy numbers,
and we prove some properties of $j_r$ that lead to an improvement of
one of their theorems.
\end{abstract}

\section{Introduction}
Let $r$ be a positive integer and define $j_r$ to be the smallest positive integer $n$ satisfying
\begin{equation}
n!&gt;n^{r-1}. \label{ec-4}
\end{equation}
The first 20 values of $j_r$ (\seqnum{A230319} in the {\it
On-Line Encyclopedia of Integer Sequences}~\cite{OEIS}) are
\begin{equation}\label{list}
\{2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 15, 16, 18, 19, 20, 22, 23, 24, 25, 27\}.
\end{equation}
The sequence $j_r$ made an appearance in work by Carlson, Goedhart, and Harris \cite{FactoradicHappy} on \textit{factoradic happy numbers}. Our main goal in this paper is to prove some properties of $j_r$ to be able to improve some of their results.

To get a better background, we need to define \textit{happy numbers} (\seqnum{A007770}) and \textit{factoradic} expansion. Let $n$ be a positive integer and $S_2(n)$ be the sum of the squares of its decimal digits. Consider the sequence of iterates of $S_2$ on $n$, i.e., $n, S_2(n), S_2^2(n), \ldots$. It is well known \cite[pp.\ 74, 83--84]{MR3155264} that eventually all the terms in the sequence are 1 or eventually the sequence becomes periodic with the cycle
$$4\rightarrow 16\rightarrow 37\rightarrow 58\rightarrow 89\rightarrow 145\rightarrow 42\rightarrow 20\rightarrow 4.$$
If the sequence reaches 1, we say $n$ is \textit{happy}. Many generalizations of happy numbers have been studied. For example, one can allow to change the base to $b \ge 2$ instead of 10, and one can replace sum of squares of digits, with the sum of $r$-th powers of the digits for some integer $r\ge 1$. Let $S_{r,b}(n)$ be the sum of $r$-th powers of the digits of $n$ when $n$ is written in base $b$. In depth analysis of the cases  $r\in\{2,3\}$, $ b\in \{2,3,\ldots, 10\}$ has been done by Grundman and Teeple \cite{Grund2001}. The techniques developed by Grundman and Teeple \cite{Grund2001} can easily be used to study other choices of $r$ and $b$. Another generalization is to allow the base $b$ to be a negative number. This has been done by Grundman and Harris \cite{GrundHarris2} for $-2\ge b\ge -10$ and $r=2$. The authors also study in what cases there exist consecutive $b$-happy numbers in an arithmetic progression, generalizing work of El-Sedy and Siksek \cite{Sedy} (who do this for happy numbers) and the work of Grundman and Teeple \cite{Grund2007} (who do this for $b$-happy $r$-power happy numbers). Bland, Cramer, de Castro, Domini, Edgar, Johnson, Klee, Koblitz, and Sundaresan  \cite{KleeHor} addressed a series of questions regarding a generalization of happy numbers to the  fractional base $3/2$, and Trevi\~no and Zhylinski \cite{ETZ} addressed other fractional bases.

Every positive integer $n$ can be written uniquely in the form
$$n = \sum_{i=1}^{k} a_i\cdot i!,$$
for some positive integer $k$ satisfying $1\le a_k \le k$, and $0\le a_i\le i$ for $1\le i \le k-1$. We call this the factoradic expansion of $n$. We use the notation $n = (a_ka_{k-1}\cdots a_{1})_!$ to express a number written in its factoradic expansion. For example, $8 = 110_{!}$ because $8 = 0\cdot 1! + 1\cdot 2! + 1\cdot 3!$. Carlson, Goedhart, and Harris \cite{FactoradicHappy} generalized the concept of happy numbers to factoradic expansions as follows: let $S_{r,!}(n)$ be the sum of the $r$-th powers of the factoradic digits of a number $n$, then a positive number $n$ is an $r$-power factoradic happy number if there exists an integer $k$ such that $S_{r,!}^k(n) = 1$ (the $k$-iteration of $S_{r,!}$ is 1). Their main theorem is that for $r \in \{1, 2, 3, 4\}$, there exist arbitrarily long sequences of consecutive $r$-power factoradic happy numbers.

When studying happy numbers, regardless of the setting, it is important to show that the relevant happy function $S$ ($S = S_{r,b}$ or $S = S_{r,!}$) satisfies $S(n) &lt; n$ for all $n &gt; N$, for some integer $N$. One of the difficulties of the factoradic case is the bound for $N$ is less easy to get that in the other happy number generalizations. Carlson, Goedhart, and Harris \cite[Theorem 10]{FactoradicHappy} proved that for $2\le r \le 30$, they can choose $N = M_r = \sum_{i=1}^{j_r} i\cdot i! = (j_r+1)!-1$. Our main motivation to study $j_r$ is to be able to prove this result for all $r$, i.e., to prove
\begin{theorem}\label{THM main}
Let $r$ be a positive integer. Write $n$ in its factoradic expansion as $n = \sum_{i=1}^k a_i i!$ with $1\le a_k \le k$, and $0\le a_i \le i$ for $i\in \{1,2,\ldots, k-1\}$. Let
$$S_{r,!}(n) = \sum_{i=1}^k a_i^r.$$
Then for $n \ge (j_r+1)!$,
$$S_{r,!}(n) &lt; n.$$
\end{theorem}

In our quest to prove the above theorem, we need to study properties of the sequence $j_r$. In Section \ref{j_r} we prove some properties of $j_r$ that study how the sequence grows. For example, we prove that $j_{r+1}-j_r \in \{1,2\}$. We also prove that the number of positive integers $r\le x$ for which $j_{r+1} - j_r = 2$ is asymptotic to $x/\log{x}$. Inspired by this, we say $r$ is a $j$-\textit{prime} if $j_{r+1} - j_r = 2$. In Section \ref{lemmas}, we prove some lemmas that are necessary for our proof of Theorem \ref{THM main}, in particular we have a nice upper bound for sums of powers. Finally, in Section \ref{proof of main}, we prove Theorem \ref{THM main}.

\section{Studying the sequence \texorpdfstring{$j_r$}{jr}}\label{j_r}
For the purposes of proving Theorem \ref{THM main}, we need an upper bound on $j_r$. The following proposition is the main result from this section we need.

\begin{proposition}\label{prop 1}
Let $\varepsilon&gt;0$ be a real number. Then there exists $M$ such that, for integers $r&gt;M$, we have that $j_r &lt; (1+\varepsilon)r$.
\end{proposition}
\begin{proof} It is enough to prove that there exists an $M$ such that, for $r&gt;M$,
$$\log (\lfloor (1+\varepsilon)r\rfloor !) &gt; (r-1)\log \lfloor (1+\varepsilon)r \rfloor.$$
By expanding $\log$ as a sum we have
$$\log (\lfloor (1+\varepsilon)r\rfloor !) &gt; \int_{1}^{\lfloor (1+\varepsilon)r\rfloor} \log t\,\mathrm{d}t = \lfloor (1+\varepsilon)r\rfloor \log \lfloor (1+\varepsilon)r\rfloor - \lfloor (1+\varepsilon)r\rfloor +1.$$
Now, we want to show that there exists  $M$ such that, for $r&gt;M$,
$$\lfloor (1+\varepsilon)r\rfloor \log \lfloor (1+\varepsilon)r\rfloor - \lfloor (1+\varepsilon)r\rfloor +1 &gt; (r-1)\log \lfloor (1+\varepsilon)r\rfloor,$$
 which is equivalent to $$\log \lfloor (1+\varepsilon)r\rfloor &gt; \frac{\lfloor (1+\varepsilon)r\rfloor -1}{\lfloor (1+\varepsilon)r\rfloor -r +1}.$$
Since $\lfloor (1+\varepsilon)r \rfloor &gt; (1+\varepsilon)r-1$, then $$\log \lfloor (1+\varepsilon)r\rfloor &gt; \log ((1+\varepsilon)r-1),$$ and$$\frac{\lfloor (1+\varepsilon)r\rfloor-1}{\lfloor (1+\varepsilon)r\rfloor-r+1}= 1 + \frac{r-2}{\lfloor (1+\varepsilon)r\rfloor-r+1} &lt; 1 + \frac{r-2}{\varepsilon r}.$$
If we find an $M$ such that, for $r&gt;M$, we have $$\log((1+\varepsilon)r-1) &gt; 1+\frac{r-2}{\varepsilon r},$$
then we are done. 
 Note that
 $$\lim_{r \rightarrow \infty} \log ((1+\varepsilon)r-1) = \infty \quad \text{and} \quad \lim_{r\rightarrow \infty} \left(1 + \frac{r-2}{\varepsilon r}\right) = 1+\frac{1}{\varepsilon}$$
  since $\varepsilon &gt;0$. This clearly implies the existence of the desired $M$.
\end{proof}

\begin{remark}\label{M from j_r}
Given $\varepsilon$ as in Proposition \ref{prop 1}, we can take $M$ to be $$M=\left\lfloor \frac{e^{1+\frac{1}{\varepsilon}}+1}{1+\varepsilon} \right\rfloor.$$ Then, for $r&gt;M$, we have that $r&gt; \frac{e^{1+\frac{1}{\varepsilon}}+1}{1+\varepsilon}.$ Thus,
\begin{align*}
\log{((1+\varepsilon)r-1)} &amp;&gt; 1+\frac{1}{\varepsilon}
&gt; 1+\frac{1}{\varepsilon}- \frac{2}{\varepsilon r}
=1+\frac{r-2}{\varepsilon r},
\end{align*}
where the last inequality holds since $\varepsilon &gt;0$.
\end{remark}

The following theorem provides an asymptotic for $j_r$ that improves the upper bound from Proposition \ref{prop 1} and provides a strong lower bound. We do not need this result to prove our main theorem, but the result might be of independent interest.
\begin{theorem}\label{THM j_r bounds}
For a positive integer $r$, there exists a real number $\theta_r$ such that
$$j_r = r + \frac{r}{\log{r}} + \theta_r\left(\frac{r}{\log{r}}\right),$$
with $\theta_r\rightarrow 0$ as $r\rightarrow\infty$.
\end{theorem}

\begin{proof} We first prove the upper bound.
Let $\varepsilon&gt;0$ be a real number. We show that
$$j_r &lt; r+\frac{(1+\varepsilon)r}{\log{r}}$$
for $r$ sufficiently large.
It suffices to prove that 
\begin{equation}\label{cota sup deseada}
\sum_{i=1}^{r+\left\lfloor \frac{(1+\varepsilon)r}{\log{r}}\right\rfloor }\log{i} &gt; (r-1)\log{\left( r+\left\lfloor \frac{(1+\varepsilon)r}{\log{r}}\right\rfloor \right)}
\end{equation}
for $r$ sufficiently large.
Let $n = r+\left\lfloor \frac{(1+\varepsilon)r}{\log{r}}\right\rfloor$. We can bound the left side of \eqref{cota sup deseada} using the following explicit version of the lower bound in Stirling's formula \cite{stirling}, which is valid for every positive integer $n$:
\begin{equation}\label{stirling formula lb}
\sum_{i=1}^{n} \log{i} &gt; \frac{1}{2}\log{(2\pi)}+\left(n+\frac{1}{2} \right)\log{n}-n+\frac{1}{12n+1}.
\end{equation}
Applying \eqref{stirling formula lb} to \eqref{cota sup deseada}, it suffices to show
$$\log{n} &gt; 1+\frac{r-\frac{3}{2}}{\left\lfloor \frac{(1+\varepsilon)r}{\log{r}}\right\rfloor+\frac{3}{2}}-\frac{\log{(2\pi)}}{2\left( \left\lfloor \frac{(1+\varepsilon)r}{\log{r}}\right\rfloor+\frac{3}{2} \right)}-\frac{1}{(12n+1) \left( \left\lfloor \frac{(1+\varepsilon)r}{\log{r}}\right\rfloor+\frac{3}{2} \right)}.$$
Since $\frac{(1+\varepsilon)r}{\log{r}} \geq \left\lfloor \frac{(1+\varepsilon)r}{\log{r}}\right\rfloor &gt; \frac{(1+\varepsilon)r}{\log{r}}-1$, we need only prove
$$\log{\left( r+ \frac{(1+\varepsilon)r}{\log{r}}-1 \right)} &gt; 1+\left( \frac{1}{1+\varepsilon} \right)\log{r}.$$
But the left side is greater than $\log{r}$ which is larger than $1 + \frac{1}{1+\varepsilon}\log{r}$ for $r$ sufficiently large.

For the lower bound, we prove that 
$$j_r &gt; r+\frac{r}{\log{r}}$$
for $r$ sufficiently large.
It suffices to prove that 
\begin{equation}\label{eq cota sup}
\sum_{i=1}^{r+\left\lfloor \frac{r}{\log{r}}\right\rfloor }\log{i} \leq (r-1)\log{\left( r+\left\lfloor \frac{r}{\log{r}}\right\rfloor \right)}
\end{equation}
for $r$ sufficiently large.

Let $n = r+\left\lfloor \frac{r}{\log{r}}\right\rfloor$. We can bound the left side of \eqref{eq cota sup} using the following explicit version of the upper bound in Stirling's formula \cite{stirling}, which is valid for every positive integer $n$:
\begin{equation}\label{stirling formula ub}
\sum_{i=1}^{n} \log{i}&lt; \frac{1}{2}\log{(2\pi)}+\left(n+\frac{1}{2}\right)\log{n}-n+\frac{1}{12n}.
\end{equation}
Applying \eqref{stirling formula ub} to \eqref{eq cota sup}, we need only show
$$ \log{n} \leq 1+\frac{r-\frac{3}{2}}{\left\lfloor \frac{r}{\log{r}}\right\rfloor+\frac{3}{2}}-\frac{\log{(2\pi)}}{2\left( \left\lfloor \frac{r}{\log{r}}\right\rfloor+\frac{3}{2} \right)}-\frac{1}{12\left( r+\left\lfloor \frac{r}{\log{r}}\right\rfloor \right) \left( \left\lfloor \frac{r}{\log{r}}\right\rfloor+\frac{3}{2} \right)}.$$
Since $\frac{r}{\log{r}} \geq \left\lfloor \frac{r}{\log{r}}\right\rfloor &gt; \frac{r}{\log{r}}-1 $, letting $x = r + \frac{r}{\log{r}}$,
we want to show that 
$$ \log{x} \leq 1+\frac{r-\frac{3}{2}}{\frac{r}{\log{r}}+\frac{3}{2}}-\frac{\log{(2\pi )}}{2\left( \frac{r}{\log{r}}+\frac{1}{2} \right)}-\frac{1}{12\left( x-1 \right) \left( \frac{r}{\log{r}}+\frac{1}{2} \right)}$$
for $r$ sufficiently large;
or, after subtracting by $\log{r}$ on both sides,
$$\log{\left(1+\frac{1}{\log{r}}\right)}\leq 1 - \frac{3(\log^2{r}+\log{r})}{2r+3\log{r}} -\frac{\log{(2\pi )}}{2\left( \frac{r}{\log{r}}+\frac{1}{2} \right)}-\frac{1}{12\left( x-1 \right) \left( \frac{r}{\log{r}}+\frac{1}{2} \right)}.$$
Note that the left side goes to 0 as $r\rightarrow\infty$ while the right side goes to 1 as $r\rightarrow\infty$. Therefore the inequality is true for 
$r$ sufficiently large.
\end{proof}

In the interest of exploring $j_r$ further, let's analyze the relationship between $j_r$ and $j_{r+1}$.

\begin{proposition}\label{prop 3}
For all positive integers $r$ we have that $j_r+1 \leq j_{r+1} \leq j_r+2.$
\end{proposition}

\begin{proof} It is easy to see that $j_{r+1}&gt;j_r$. So, it suffices to prove that $$(j_r+2)!&gt;(j_r+2)^r.$$ Assume, for the sake of contradiction, that $(j_r+2)!\leq (j_r+2)^r.$ Then,
\begin{equation}
\frac{1}{(j_r+2)!}\geq \frac{1}{(j_r+2)^r}. \label{ec-5}
\end{equation}
Multiplying inequalities \eqref{ec-4} and \eqref{ec-5}, $$\frac{j_r!}{(j_r+2)!}&gt;\frac{j_r^{r-1}}{(j_r+2)^r}.$$ It follows that, $$\frac{1}{j_r+1} &gt; \frac{j_r^{r-1}}{(j_r+2)^{r-1}}=\left( \frac{j_r}{j_r+2} \right)^{r-1},$$ which implies
\begin{equation}
\left( 1+\frac{2}{j_r} \right)^{r-1} &gt; j_r+1. \label{ec-6}
\end{equation}
Since $r^{r-1} \ge r(r-1)\cdots (2) = r!,$ we know $j_r \ge r$. Using this in \eqref{ec-6}, $$\left( 1+\frac{2}{r} \right)^{r-1} \geq \left( 1+\frac{2}{j_r} \right)^{r-1} &gt; j_r+1 \geq r+1.$$ Therefore
\begin{equation}
\left( 1+\frac{2}{r} \right)^{r-1} &gt; r+1. \label{ec-7}
\end{equation}
But $\left( 1+\frac{2}{r} \right)^{r-1} \le e^2 &lt; 8$. This contradicts \eqref{ec-7} for $r\geq 7$. We can use \eqref{list} to confirm that \eqref{ec-7} is not satisfied for $1\leq r \leq 6$. Thus \eqref{ec-7} fails for $r\geq 1$. The result follows.
\end{proof}

Therefore, for some positive integers $r$ we have $j_{r+1} = j_r + 1$ and for others we have $j_{r+1} = j_r +2$. Let $S$ be the set of positive integers such that $j_{r+1} = j_r+2$. That is
\begin{equation}\label{j primeS}
S = \{r\in\mathbb{N}\,|\, j_{r+1} = j_r+2\}.
\end{equation}
The first few values in $S$  can be easily determined from \eqref{list} to be 3, 6, 9, 12, 15, 19. This is sequence \seqnum{A336803}. From Theorem \ref{THM j_r bounds} and Proposition \ref{prop 3} we can prove the following theorem which inspired us to name the elements of $S$ as $j$-primes.
\begin{theorem}
For a positive real number $x$, let $S(x) = \{r\le x\,|\, j_{r+1} = j_r+2\}$. Then $$S(x) \sim \frac{x}{\log{x}}.$$
\end{theorem}
\begin{proof} From Proposition \ref{prop 3} we know $j_{r} \in \{j_{r-1}+1,j_{r-1}+2\}$. Therefore
$$j_r = j_1+r-1 + \sum_{\substack{i\in S\\i\le r}} 1 = r + 1 + S(r).$$
From Theorem \ref{THM j_r bounds} we have $j_r -r \sim \frac{r}{\log{r}}.$
Hence $S(r) \sim \frac{r}{\log{r}}.$\end{proof}


\section{Some useful lemmas}\label{lemmas}

We are interested in the sum of the first $n = j_r$ $r$-powers. There is an easy way to get a bound that works for all $n$:
\begin{equation}\label{naive bound}
\sum_{i=1}^n i^r \le \int_1^{n+1} t^r\,\mathrm{d}t = \frac{(n+1)^{r+1}-1}{r+1}.
\end{equation}
For large $n$, \eqref{naive bound} is great, but for $n$ close to $r$, which is more relevant when $n = j_r$, we need a tighter bound. First, we recall some known properties of the Bernoulli numbers (\seqnum{A027641}), where we take $B_1 = \frac{1}{2}$ instead of the usual $B_1 = -\frac{1}{2}$ to simplify \eqref{bernoulli formula}.

\begin{itemize}
    \item For $k&gt;0$, $B_k &lt;0$ if and only if $k\: \equiv \: 0 \: (\mathrm{mod} \: 4)$.
    \item We have \begin{equation}\label{bernoulli def}\sum_{k=0}^{\infty} \frac{B_k}{k!} = \frac{e}{e-1}.\end{equation}
    \item For $k&gt;0$, we have \begin{equation}\label{zeta-ing}B_{2k} = \frac{(-1)^{k+1}2(2k)!}{(2\pi)^{2k}}\zeta(2k).\end{equation}
    \item $B_{2k+1} = 0$ for $k\geq 1$.
		\item \textit{(Bernoulli's formula)} For positive integers $n$ and $r$, we have
\begin{equation}\label{bernoulli formula}
\sum_{i=1}^{n} i^r = \frac{1}{r+1}\sum_{k=0}^{r} {r+1\choose k} B_k n^{r+1-k}.
\end{equation}
\end{itemize}

\begin{lemma}\label{prop 5}
Let $r\geq 2$ be an integer. Then, for an integer $n \ge r+1$, $$\sum_{i=1}^{n} i^r \leq \frac{Cn^{r+1}}{r+1}$$ where $C=\frac{e}{e-1}+\frac{\pi^4}{45\left( 16\pi^4-1 \right)} = 1.583\cdots$.
\end{lemma}
\begin{proof}
For $n\geq r+1$, observe that ${r+1\choose k} \leq \frac{(r+1)^k}{k!} \leq \frac{n^k}{k!}.$ Using that $B_{2k}&lt;0$ for even $k\geq 1$ and $B_k=0$ for odd $k&gt;1$, by Bernoulli's formula \eqref{bernoulli formula} we have
\begin{equation*}
\sum_{i=1}^{n} i^r \leq \frac{1}{r+1} \left( 1+ \sum_{\substack{1\leq k \leq r \\ k \: \not\equiv \: 0 \: (\mathrm{mod} \: 4)}} \frac{n^k}{k!}B_k n^{r+1-k} \right) \leq \frac{n^{r+1}}{r+1} \left( 1+ \sum_{\substack{1\leq k \leq r \\ k \: \not\equiv \: 0 \: (\mathrm{mod} \: 4)}} \frac{B_k}{k!} \right).
\end{equation*}
Now, using \eqref{bernoulli def}, \eqref{zeta-ing}, and using $\zeta(4k) \leq \zeta(4) = \frac{\pi^4}{90}$, we have
\begin{align*}
    1+ \sum_{\substack{1\leq k \leq r \\ k \: \not\equiv \: 0 \: (\mathrm{mod} \: 4)}} \frac{B_k}{k!} \: \leq &amp; \: \sum_{k=0}^{\infty} \frac{B_k}{k!} - \sum_{k=1}^{\infty} \frac{B_{4k}}{(4k)!} \\
    = &amp; \: \frac{e}{e-1} + 2\sum_{k=1}^{\infty} \frac{1}{(2\pi)^{4k}} \zeta(4k) \\
    \leq &amp; \: \frac{e}{e-1} + 2\zeta(4)\frac{1}{(2\pi)^4 \left( 1-\frac{1}{(2\pi)^4} \right)} \\
    = &amp; \: \frac{e}{e-1} + \frac{\pi^4}{45(16\pi^4-1)}.
\end{align*}
Therefore, for $n\geq r+1$, $$\sum_{i=1}^{n} i^r \leq C\frac{n^{r+1}}{r+1},$$ where $C = \frac{e}{e-1}+\frac{\pi^4}{45\left( 16\pi^4-1 \right)}$, as desired.
\end{proof}

What follows is a simple inequality we need to use to prove our main theorem.
\begin{lemma}\label{lemma 3}
Let $0&lt;x&lt;r$ be a real number. Then, for all integers $r\geq 1$, we have that $$\left( 1-\frac{x}{r} \right)^{r} &lt; e^{-x}.$$
\end{lemma}

\begin{proof} Using the Taylor series expansion of $\log(1-x/r)$, we have that
\begin{align*}
r\log\left(1-\frac{x}{r}\right) = -r\left(\frac{x}{r} + \frac{1}{2}\left(\frac{x}{r}\right)^2 + \frac{1}{3}\left(\frac{x}{r}\right)^3+\cdots\right)= -x - \frac{x^2}{2r} - \frac{x^3}{3r^2} - \cdots  &lt; -x.
\end{align*}
\end{proof}


\begin{lemma}\label{prop 6}
Let $0&lt;\varepsilon&lt;2$. Then there exists a positive integer $M$ such that, for all integers $r&gt;M$, we have that $$\left( 1-\frac{1}{j_r} \right)^{r+1} &lt; e^{-1+\varepsilon}.$$
\end{lemma}

\begin{proof} Let $\varepsilon_1&gt;0$ be a real number. First, by Proposition \ref{prop 1}, there exists $M_1$ positive integer such that, for $r&gt;M_1$, we have that $j_r&lt;(1+\varepsilon_1)r$. Then, for $r&gt;M_1$, we have
\begin{equation}
\left( 1-\frac{1}{j_r} \right)^{r+1} &lt; \left( 1-\frac{1}{(1+\varepsilon_1)r} \right)^{r+1}. \label{ec-12}
\end{equation}
Observe that
\begin{equation}
\lim_{r\rightarrow \infty} \left( 1-\frac{1}{(1+\varepsilon_1)r} \right)^{r+1} = e^{-\frac{1}{1+\varepsilon_1}}. \label{ec-13}
\end{equation}
On the other hand, we know that $j_r&gt;r$ because $j_1 &gt; 1$ and $j_{r+1} \ge j_r+1$. It follows that
\begin{equation}
\left( 1-\frac{1}{j_r} \right)^{r+1} &gt; \left( 1-\frac{1}{r} \right)^{r+1}, \label{ec-14}
\end{equation}
and we have that
\begin{equation}
\lim_{r\rightarrow \infty} \left( 1-\frac{1}{r} \right)^{r+1} = e^{-1}. \label{ec-15}
\end{equation}
Since \eqref{ec-12} and \eqref{ec-13} hold for all $\varepsilon_1&gt;0$, from \eqref{ec-12}, \eqref{ec-13}, \eqref{ec-14}, and \eqref{ec-15} we conclude that $$\lim_{r\rightarrow \infty} \left( 1-\frac{1}{j_r} \right)^{r+1} = e^{-1}.$$
Thus, there exists $M$ such that, for $r&gt;M$, we have that $$\left( 1-\frac{1}{j_r} \right)^{r+1} &lt; e^{-1+\varepsilon}$$ as desired.
\end{proof}

\begin{remark}\label{obs2}
From Remark \ref{M from j_r}, we know that $$j_r&lt;\left( \frac{1}{1-\frac{\varepsilon}{2}} \right)r$$ for $r&gt;\left(e^{\frac{2}{\varepsilon}}+1\right)\left(1-\frac{\varepsilon}{2}\right)$. Then, $$\left( 1-\frac{1}{j_r} \right)^{r+1} &lt; \left( 1-\frac{1-\frac{\varepsilon}{2}}{r} \right)^{r+1} &lt; \left( 1-\frac{1-\frac{\varepsilon}{2}}{r} \right)^{r} $$
where $$\left( 1-\frac{1-\frac{\varepsilon}{2}}{r} \right)^{r} &lt; e^{-1+\varepsilon}$$ for all integers $r\geq 1$ (by Lemma \ref{lemma 3} with $x = 1- \varepsilon$). Therefore, we can take $M$ in Lemma \ref{prop 6} as $$M=\left\lfloor\left(e^{\frac{2}{\varepsilon}}+1\right)\left(1-\frac{\varepsilon}{2}\right) \right\rfloor.$$
\end{remark}









\section{Proof of Theorem \ref{THM main}}\label{proof of main}

Carlson, Goedhart, and Harris \cite[Theorem 10]{FactoradicHappy} reduced the proof of Theorem \ref{THM main} to showing the inequality\footnote{They incorrectly omitted the ``$-1$'' term from the inequality.}
\begin{equation}\label{desigualdad principal}
(j_r+1)!-(j_r+1)^{r-1}+j_r!-1-\sum_{i=1}^{j_r-1} i^r &gt;0.
\end{equation}
They proved it via computation \cite[Table 1]{FactoradicHappy} for $2\le r\le 30$. We prove that \eqref{desigualdad principal} works for all positive integers $r$ in the next proposition.

\begin{proposition}\label{theorem 2}
Let $r$ be a positive integer. Then $$(j_r+1)!-(j_r+1)^{r-1}+j_r!-1-\sum_{i=1}^{j_r-1} i^r &gt;0.$$
\end{proposition}
\begin{proof} Let $C=\frac{e}{e-1}+\frac{\pi^4}{45\left( 16\pi^4-1 \right)}$ and let $L_r$ be the left side of \eqref{desigualdad principal}. We want to show $L_r &gt; 0$. We know that $j_r&gt;r$. Also, as observed by Carlson, Goedhart, and Harris \cite{FactoradicHappy}, we have that
$$(j_r+1)^{r-1} = j_r^{r-1}\left(1+\frac{1}{j_r}\right)^{r-1} &lt; j_r^{r-1}\left(1+\frac{1}{r}\right)^r &lt; 3j_r^{r-1}.$$

From this and from Lemma \ref{prop 5}, we have that for $r\geq 2$,
\begin{align*}
L_r&amp;&gt; j_r!(j_r+2)-3j_r^{r-1} -1-\frac{C(j_r-1)^{r+1}}{r+1}\\
&amp;= j_r!(j_r+2)-3j_r^{r-1} -1-j_r^{r-1}\left( \frac{j_r^2}{r+1} \right)\left( C \left( \frac{j_r-1}{j_r} \right)^{r+1}\right) \\
&amp;&gt; j_r^{r-1}\left( r-1 - \left( \frac{j_r^2}{r+1} \right)\left( C \left(1- \frac{1}{j_r} \right)^{r+1}\right) \right)-1.
\end{align*}
Let $0&lt;\varepsilon &lt;1-\log(C)$ be a real number. By Lemma \ref{prop 6}, there exists a positive integer $M_1$ such that, for $r&gt;M_1$, $$\left(1- \frac{1}{j_r} \right)^{r+1} &lt; e^{-1+\varepsilon},$$ which leads to $$ C\left(1- \frac{1}{j_r} \right)^{r+1} &lt; Ce^{-1+\varepsilon}.$$ It follows that, for $r&gt;\max (2, M_1) $,
\begin{align*}
L_r &amp;&gt; j_r^{r-1}\left( r-1 -C e^{-1+\varepsilon} \left( \frac{j_r^2}{r+1} \right)  \right)-1\\
&amp;=Ce^{-1+\varepsilon}j_r^{r-1}\left( \left( \frac{1}{Ce^{-1+\varepsilon}} \right)(r-1)-\frac{j_r^2}{r+1}\right)-1.
\end{align*}
Let $k&gt;1$ be a constant such that $k^2&lt;\frac{1}{Ce^{-1+\varepsilon}}$. By Proposition \ref{prop 1}, there exists a positive integer $M_2$ such that, for $r&gt;M_2$, we have that $$j_r &lt; k(r+1).$$
Then, for $r&gt;\max (2, M_1, M_2)$,
\begin{align*}
L_r &amp;&gt; Ce^{-1+\varepsilon}j_r^{r-1}\left( \left( \frac{1}{Ce^{-1+\varepsilon}}-k^2 \right)r-\frac{1}{Ce^{-1+\varepsilon}}-k^2\right)-1
\end{align*}
which is greater than $-1$ whenever $r&gt;\frac{1+Ck^2e^{-1+\varepsilon}}{1-Ck^2e^{-1+\varepsilon}}$. Since the expression on the left is an integer, we conclude the result for
$r&gt;\max\left( 2, M_1, M_2, \left\lfloor \frac{1+Ck^2e^{-1+\varepsilon}}{1-Ck^2e^{-1+\varepsilon}}\right\rfloor \right)$.

From Remarks \ref{M from j_r} and \ref{obs2} we know that we can choose $M_1, M_2$ to be
\begin{align*}
M_1 &amp;= \left\lfloor \left(e^{\frac{2}{\varepsilon}}+1\right)\left(1-\frac{\varepsilon}{2}\right) \right\rfloor,\\
M_2 &amp;= \left\lfloor \frac{e^{1+\frac{1}{k-1}}+1}{k}-1 \right\rfloor.
\end{align*}
The idea is to minimize the value of $\max\left( 2, M_1, M_2, \left\lfloor \frac{1+Ck^2e^{-1+\varepsilon}}{1-Ck^2e^{-1+\varepsilon}}\right\rfloor \right).$
Choosing $\varepsilon = 0.26$ and $k=1.15$, we have that $$\max\left( 2, M_1, M_2, \left\lfloor \frac{1+Ck^2e^{-1+\varepsilon}}{1-Ck^2e^{-1+\varepsilon}}\right\rfloor \right) = \max(2, 1907, 1857, 2167 ) = 2167.$$ 
This proves the result for $r&gt; 2167$.
The cases $r\le 2167$ can be easily checked with a computer.
\end{proof}

%\providecommand{\href}[2]{#2}
\begin{thebibliography}{10}

\bibitem{KleeHor}
A. Bland, Z. Cramer, P. de~Castro, D. Domini, T. Edgar, D.
  Johnson, S. Klee, J. Koblitz, and R. Sundaresan, Happiness
  is integral but not rational, \emph{Math Horiz.} \textbf{25} (2017), 8--11.

\bibitem{FactoradicHappy}
J. Carlson, E. G. Goedhart, and P. E. Harris, Sequences of
  consecutive factoradic happy numbers, \emph{Rocky Mountain J. Math.} \textbf{50}
  (2020), 1241--1252.

\bibitem{Sedy}
E. El-Sedy and S. Siksek, On happy numbers, \emph{Rocky Mountain J. Math.}
  \textbf{30} (2000), 565--570.

\bibitem{Grund2001}
H. G. Grundman and E. A. Teeple, Generalized happy numbers, \emph{Fibonacci
  Quart.} \textbf{39} (2001), 462--466.

\bibitem{Grund2007}
H. G. Grundman and E. A. Teeple, Sequences of consecutive happy numbers, \emph{Rocky Mountain J. Math.}
  \textbf{37} (2007), 1905--1916.

\bibitem{GrundHarris2}
H. G. Grundman and P. E. Harris, Sequences of consecutive happy
  numbers in negative bases, \emph{Fibonacci Quart.} \textbf{56} (2018), 221--228.

\bibitem{MR3155264}
R. Honsberger, \emph{Ingenuity in Mathematics}, New Mathematical Library,
  Vol.~23, Random House, Inc., 1970.

\bibitem{stirling}
H. Robbins, A remark on {S}tirling's formula, \emph{Amer. Math. Monthly}
  \textbf{62} (1955), 26--29.

\bibitem{OEIS}
N. J. A. Sloane et al., The On-Line Encyclopedia of Integer Sequences, 2021.
Available at \url{https://oeis.org}.

\bibitem{ETZ}
E. Trevi\~{n}o and M. Zhylinski, On generalizing happy numbers
  to fractional-base number systems, \emph{Involve} \textbf{12} (2019), 1143--1151.

\end{thebibliography}


\bigskip
\hrule
\bigskip

\noindent 2010 {\it Mathematics Subject Classification}:
Primary 11B83; Secondary 11N37, 11A67, 11B68.

\noindent \emph{Keywords:} happy factoradic number, asymptotic growth, sum of powers.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A007770},
\seqnum{A027641},
\seqnum{A230319}, and
\seqnum{A336803}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received January 26 2021; 
revised versions received  January 27 2021; July 20 2021.
Published in {\it Journal of Integer Sequences}, August 17 2021.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                


</pre></body></html>