\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}}}

\DeclareMathOperator{\lcm}{lcm}

\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}

\begin{center}
\vskip 1cm{\LARGE\bf 
Arithmetic Functions that Remain Constant\\
\vskip .1in
on Runs of Consecutive Integers
}
\vskip 1cm
\large
Noah Lebowitz-Lockard and Joseph Vandehey\\
Department of Mathematics \\
University of Texas at Tyler\\
Tyler, TX 75799 \\
USA \\
\url{nlebowitzlockard@uttyler.edu} \\
\url{jvandehey@uttyler.edu}
\end{center}

\vskip .2 in

\begin{abstract} We bound from above the length of the longest sequence of consecutive numbers less than or equal to $x$ with the same number of divisors. We also bound the length of the longest sequence of consecutive numbers less than or equal to $x$ for which the number of divisors is decreasing. Finally, we consider variants of this problem such as the corresponding sequences for the sum-of-proper-divisors function and the Carmichael function. In particular, we show that it is impossible for the sum-of-proper-divisors function to be equal on six consecutive integers.
\end{abstract}

\section{Introduction}

Let $d(n)$ be the number of divisors of $n$. In 1952, Erd{\H o}s and Mirsky \cite{EM} defined the function $F(x)$ as the largest number $k$ for which there exists some $n \leq x - k$ such that $d(n + 1) = d(n + 2) = \cdots = d(n + k)$. Unfortunately, they did not obtain any non-trivial bounds.

Over the years, multiple people have investigated whether $d(n) = d(n + k)$ for infinitely many values of $n$ for a given $k$. Spiro \cite{Spi} proved this statement for $k = 5040$. Heath-Brown \cite{HB} then solved the $k = 1$ case. Finally, Pinner \cite{Pi} showed that $d(n) = d(n + k)$ has infinitely many solutions for all $k$. (For further discussion of this problem, see Guy \cite[\S B18]{Gu}. For bounds on the number of solutions to the equation $d(n) = d(n + 1)$ with $n \leq x$, see Erd{\H o}s, Pomerance, and S{\' a}rk{\" o}zy \cite{EPoS1} and Hildebrand \cite{Hi}.)

Schinzel's hypothesis H implies that $d(n + 1) = d(n + 2) = \cdots = d(n + k)$ has infinitely many solutions for all $k$. However, there is no unconditional proof of this result. Last year, Letsko found a solution to this equation with $k = 20$, which implies that $F(x) \geq 20$ for all sufficiently large $x$. (For examples of runs of integers with the same number of divisors, see \seqnum{A006558}.)

Sp{\u a}taru \cite{S} recently made the first substantial improvement on Erd{\H o}s and Mirsky's original question. (From here on, $\log_k$ is the $k$th iterate of the logarithm.)

\begin{theorem}\label{thm:F asymptotic} As $x \to \infty$, we have
\[F(x) = \exp(O(\sqrt[3]{\log x \log_2 x})).\]
\end{theorem}

In this note, we derive an alternate proof of Theorem $1$, which we independently obtained before Sp{\u a}taru \cite{S} appeared in print. Later on, we derive a substantially stronger conditional bound.

We also consider a related function. Let $G(x)$ be the largest $k$ for which the inequality $d(n + 1) \geq d(n + 2) \geq \cdots \geq d(n + k)$ holds for some $n \leq x - k$. (The bounds we obtain also hold for increasing, decreasing, and non-decreasing sequences.) We modify Sp{\u a}taru's proof to bound $G(x)$ as well.

\begin{theorem}\label{thm:G asymptotic} We have
\[G(x) = \exp(O(\sqrt{\log x \log_2 x})).\]
\end{theorem}

We can generalize these functions. For a given arithmetic function $f$, let $F_f (x)$ (resp., $G_f (x)$) be the largest $k$ for which $f(n + 1), f(n + 2), \ldots, f(n + k)$ is constant (resp., decreasing). Note that $F_f (x) \leq G_f (x)$ for all $f, x$. Pollack, Pomerance, and Trevi{\~ n}o \cite{PPT} showed that $F_\varphi (x) \sim \log_3 x/\log_6 x$, where $\varphi$ is the totient function. (For recent research on the equation $\varphi(n) = \varphi(n + 1)$, see Bayless and Kinlaw \cite{BayK} or Kinlaw, Kobayashi, and Pomerance \cite{KKobPo}. Though Erd{\H o}s \cite{E} conjectured that $\varphi(n + 1) = \varphi(n + 2) = \cdots = \varphi(n + k)$ has infinitely many solutions for all $k$, the only known solution to $\varphi(n + 1) = \varphi(n + 2) = \varphi(n + 3)$ is $n = 5185$ \cite{LGi}. For the non-consecutive case, see Tao \cite{Ta}.)

Let $\omega (n)$ (resp., $\Omega(n)$) be the number of distinct (resp., not necessarily distinct) prime factors of $n$. Erd{\H o}s, Pomerance, and S{\' a}rk{\" o}zy \cite[Thm.\ $5$]{EPoS2} proved that
\[F_\omega (x) \leq \exp((1/\sqrt{2} + o(1)) \sqrt{\log x \log_2 x})\]
and
\[F_\Omega (x) \leq \exp((\sqrt{\log 2} + o(1)) \sqrt{\log x})\]
using a variation of the arguments that we use here. They also bounded the largest $k$ for which there exists a number $n \leq x - k$ such that $\omega(n + 1), , \ldots, \omega(n + k)$ (resp., $\Omega(n + 1), \ldots, \Omega(n + k)$) are all distinct. 

Erd{\H o}s \cite{E} also conjectured that $F_\sigma (x) \to \infty$ as $x \to \infty$ as well, where $\sigma$ is the sum-of-divisors function. A slight modification to Pollack et al.'s argument implies that $F_\sigma (x) \ll \log_3 x/\log_6 x$. Weingartner \cite{W} proved that $\sigma(n) = \sigma(n + k)$ has infinitely many solutions for all even $k$, conditional on Schinzel's hypothesis H. He also showed that if $k \leq 10^{10^7}$ is even, then $\sigma(n) = \sigma(n + k)$ has infinitely many solutions unconditionally. (For further discussion of the equation $\sigma(n) = \sigma(n + 1)$, see Guy \cite[\S B13]{Gu}.) By modifying our proof of Theorem $1$, we derive an alternate proof of the following result.

\begin{theorem}\label{thm: F sigma asymptotic} We have
\[F_\sigma (x) = \exp(O(\sqrt{\log x \log_2 x})).\]
\end{theorem}

Let $s$ be the sum-of-proper-divisors function. Surprisingly, we can prove a much stronger upper bound on $F_s (x)$.
 
 \begin{theorem}\label{thm: Fs} For all $x$, we have $F_s (x) \leq 5$. In other words, the equation $s(n + 1) = s(n + 2) = \cdots = s(n + 6)$ has no solutions.
 \end{theorem}
 
Though we are unaware of any papers on the equation $s(n) = s(n + 1)$, there is a MathOverflow post \cite{Fr} on this problem. Frank asked whether $n = 2$ is the only solution to $s(n) = s(n + 1)$. Poonen then responded that there are no other solutions up to $10^{16}$. (Note that $s(n) = s(n + 1)$ is equivalent to the statement $\sigma(n) + \sigma(1) = \sigma(n + 1)$. Guy \cite[\S B15]{Gu} discusses the more general equation $\sigma(m) + \sigma(n) = \sigma(m + n)$.)

Finally, we prove the following upper bound for the Carmichael $\lambda$ function. We define $\lambda(n)$ as the smallest integer $m$ such that $a^m \equiv 1$ (mod $n$) for all $a$ coprime to $n$.

\begin{theorem}\label{thm: F lambda} We have $F_\lambda (x) \ll (\log x \log_2 x)^2$.
\end{theorem}

\section{The divisor function}\label{divisor section}

In this section, we prove our main result. From here on, we let $v_p (m)$ be the order of $p$ in $m$, i.e., the largest $a$ for which $p^a | m$. For a given $x$, let $k = F(x)$ and $K = \log k/\log 2$. By assumption, there exists some $n \leq x - k$ such that $d(n + 1) = d(n + 2) = \cdots = d(n + k)$. Let $D = d(n + i)$ for all $i \leq k$. Sp{\u a}taru \cite{S} proved the following result.

\begin{lemma} The number $D$ is a multiple of every prime $\leq K$.
\end{lemma}

Using the prime factorization of $D$, we can bound $F(x)$ from above.

\begin{proof}[Proof of Theorem \ref{thm:F asymptotic}] Recall that we wish to show that as $x \to \infty$, we have
\[F(x) = \exp(O(\sqrt[3]{\log x \log_2 x})).\]
We may assume that $k > \exp(C \sqrt[3]{\log x \log_2 x})$ for some positive constant $C$.

Fix $\epsilon < 1 - (\log 2/\log 3)$ and let $\mathcal{S}$ be the set of primes in $((1 - \epsilon)K, K]$. Let $q_1$, $q_2$, and $q_3$ be three distinct elements of $\mathcal{S}$. For all $i$, we have $q_1 q_2 q_3 | d(n + i)$ by Lemma $6$. Because $d(p_1^{a_1} \cdots p_r^{a_r}) = (a_1 + 1) \cdots (a_r + 1)$, there are three possibilities:
\begin{enumerate}
\item{We have $v_p (n + i) = aq_1 q_2 q_3 - 1$ for some prime $p$ and positive $a$,}
\item{We have $v_{p_1} (n + i) = a_1 q_1 q_2 - 1$ and $v_{p_2} (n + i) = a_2 q_3 - 1$ for some prime $p_1, p_2$ and positive $a_1, a_2$,}
\item{We have $v_{p_j} (n + i) = a_j q_j - 1$ for all $j \leq 3$, where each $p_j$ is prime and each $a_j$ is positive.}
\end{enumerate}

Suppose $n + i$ satisfies Condition $(1)$ for some $q_1, q_2, q_3 \in \mathcal{S}$. Then, we can bound $p$ from above. In this case, we have
\begin{align*}
x & \geq p^{aq_1 q_2 q_3 - 1} \\
& \geq 2^{q_1 q_2 q_3 - 1} \\
& \geq 2^{(1 - \epsilon)^3 K^3 - 1} \\
& \geq 2^{((1 - \epsilon)C/\log 2)^3 \log x \log_2 x - 1} \\
& \geq x^{(1 + o(1)) ((1 - \epsilon)C)^3/(\log 2)^2 \log_2 x}.
\end{align*}
However, this is impossible for $x$ sufficiently large. Therefore, $n + i$ does not satisfy $(1)$ for $q_1, q_2, q_3 \in \mathcal{S}$.

Let $r = \# \mathcal{S}$. Fix $i \leq k$. Because $n + i$ does not satisfy $(1)$, it is possible to partition $\mathcal{S}$ into two disjoint subsets $\mathcal{S}_1$ and $\mathcal{S}_2$ with the following properties. Let $\mathcal{S}_1 = \{q_1, q_2, \ldots, q_{\# \mathcal{S}_1}\}$ and $\mathcal{S}_2 = \{q_{\# \mathcal{S}_1 + 1}, \ldots, q_r\}$. We may write
\[\prod_{j = 1}^{\lfloor \# \mathcal{S}_1/2 \rfloor} p_j^{a_j q_{2j - 1} q_{2j} - 1} \prod_{j = \# \mathcal{S}_1 + 1}^r p_j^{a_j q_j - 1} | n + i,\]
where each $p_j$ is prime and each $a_j$ is a positive integer. Note that each exponent is $\geq \lfloor (1 - \epsilon)K\rfloor - 1$ and that there are at least $r/2$ distinct prime factors in the product above. Hence, $n + i \geq (p_{i, 1} p_{i, 2} \cdots p_{i, \lfloor r/2 \rfloor})^{\lfloor (1 - \epsilon) K \rfloor - 1}$ for some primes $p_{i, 1}, p_{i, 2}, \ldots, p_{i, \lfloor r/2 \rfloor}$.

 From here on, we assume that $n + i$ and $n + j$ are both odd. We can show that $p_{i, a} \neq p_{j, b}$ for all $a$ and $b$. For every odd prime $p$, we have
\[p^{\lfloor (1 - \epsilon)K \rfloor - 1} \geq 3^{(((1 - \epsilon)/\log 2) \log k) - 2} = (1/9) k^{(1 - \epsilon)(\log 3)/\log 2}.\]
However, this quantity is greater than $k$ when $k$ is sufficiently large. So, $p^{\lfloor (1 - \epsilon)K \rfloor - 1}$ cannot divide both $n + i$ and $n + j$ for distinct $i$ and $j$.

If we multiply all of these $n + i$ together, we obtain a multiple of
\[\Biggl(\prod_{\substack{i : n + i \text{ is odd} \\ m \leq r/2}} p_{i, m}\Biggr)^{\lfloor (1 - \epsilon)K \rfloor - 1}.\]
Let $p_m$ be the $m$th prime and let
\[\theta(x) = \sum_{p \leq x} \log p.\]
De la Vall{\' e}e Poussin \cite[p.\ $54$]{VP} showed that $|\pi(x) - \text{Li} (x)|$ and $|\theta(x) - x|$ are both $O(x\exp(-c\sqrt{\log x}))$ for some positive constant $c$. Therefore,
\[x^k > (n + 1)(n + 2) \cdots (n + k) \geq (p_1 p_2 \cdots p_{C_1 rk})^{\lfloor (1 - \epsilon) K \rfloor - 1} = \exp{((C_2 + o(1)) rkK \log(rk))}\]
for some positive constants $C_1, C_2$. So, we have
\[rkK \log(rk) \ll \log(x^k) = k \log x,\]
which implies that
\[rK \log(rk) \ll \log x.\]
Recall that $K \asymp \log k$ and $r \asymp \log k/\log \log k$. Therefore, we have
\[k = \exp(O(\sqrt[3]{\log x \log \log x})). \qedhere\]
\end{proof}

\section{Decreasing sequences}

Rather than considering sequences for which $d(n + i)$ is constant, we can consider sequences for which it is increasing or decreasing. Pollack et al.\ found a precise asymptotic formula for the analogous problem for the totient function.

\begin{theorem}[{\cite[Thm.\ $1.5$]{PPT}}] The largest $k$ for which there exists some $n \leq x - k$ such that $\varphi(n + 1) \geq \varphi(n + 2) \geq \cdots \geq \varphi(n + k)$ is asymptotic to $\log_3 x/\log_6 x$.
\end{theorem}

We modify their argument to obtain an upper bound for the divisor function. To do so, we make use of the following result of Sp{\u a}taru.

\begin{lemma}[{\cite[Lemma $4.2$]{S}}] Let $n$ be an integer with smallest prime factor $p$. Then,
\[\frac{\log n}{\log p} \geq \sum_q (q - 1) v_q (d(n)).\]
\end{lemma}

Rather than using this lemma directly, we rewrite the righthand side using the following result.

\begin{corollary} For all $m$, we have
\[\sum_q (q - 1) v_q (m) \geq \frac{\log m}{\log 2}.\]
\end{corollary}

\begin{proof} By definition, $m$ is the product of $q^{v_q (m)}$ over all $q$. Therefore, we have
\[\log m = \sum_q (\log q) v_q (m),\]
which implies that
\[\frac{1}{\log m} \sum_q (q - 1) v_q (m) = \biggl(\sum_q (q - 1) v_q (m)\biggr)\biggl(\sum_q (\log q) v_q (m)\biggr)^{-1}.\]
Let
\[M = \min_{q | m} \Bigl(\frac{q - 1}{\log q}\Bigr).\]
Then, we have
\[\sum_q (q - 1) v_q (m) \geq \sum_q M(\log q) v_q (m) = M \sum_q (\log q) v_q (m),\]
giving us
\[\frac{1}{\log m} \sum_q (q - 1) v_q (m) \geq M \geq \frac{1}{\log 2}. \qedhere\]
\end{proof}

Recall that $G(x)$ is the largest $k$ for which there exists some $n \leq x - k$ such that $d(n + 1) \geq d(n + 2) \geq \cdots \geq d(n + k)$.

\begin{proof}[Proof of Theorem \ref{thm:G asymptotic}] A classic theorem \cite[Thm.\ $317$]{HW} states that there exists some $m \leq k/2$ such that
\[d(m) = 2^{(1 + o(1)) \log (k/2)/\log_2 (k/2)} = 2^{(1 + o(1)) \log k/\log_2 k}.\]
Let $n + k = am + b$ with $0 < b < m$. Note that $k - b > k/2$ because $m \leq k/2$. Consider the subsequence $n + 1, n + 2, \ldots, n + (k - b)$. By assumption, $m | n + (k - b)$. So $d(m) \leq d(n + k - b)$, which implies that $d(m) \leq d(n + i)$ for all $i \leq k - b$. So,
\[d(n + i) \geq \exp\biggl((\log 2 + o(1)) \frac{\log k}{\log_2 k}\biggr)\]
for all $i \leq k - b$.

Sp{\u a}taru \cite[\S 4]{S} also observed that in a sequence of $k - b$ consecutive numbers, at least one of those numbers consists entirely of prime factors $p$ satisfying $\log p \gg \log (k - b) \gg \log k$. Select $i \leq k - b$ so that $n + i$ satisfies this property. The previous lemma and corollary imply that
\[\frac{\log x}{\log k} \geq \frac{\log(n + i)}{\log k} \gg \sum_q (q - 1) v_q (d(n + i)) \gg \log d(n + i) \gg \frac{\log k}{\log_2 k}.\]
 From this inequality, we obtain $(\log k)^2/\log_2 k \ll \log x$, giving us our desired bound.
\end{proof}

The function $G(x)$ has a much stronger conditional bound. Suppose the sequence $n + 1, n + 2, \ldots, n + k$ contains two primes $n + i, n + j > 3$. Then, $d(n + i) = d(n + j) = 2$, but $d(n + k) > 2$ for every $k \in (i, j)$ with $n + k$ composite. Therefore, $G(x)$ is at most as large as the largest gap between two consecutive primes $\leq x$. Cram{\' e}r's conjecture states that this gap is $O((\log x)^2)$. Assuming this conjecture, $G(x) = O((\log x)^2)$ as well. (Unfortunately, the best unconditional upper bound on the gap between two consecutive primes $\leq x$ is $x^{0.525 + o(1)}$ \cite{BHP}. The best lower bound is $\gg \log x \log_2 x \log_4 x/\log_3 x$ \cite{FGKo+}.)

\section{Sums of divisors}

Let $F_\sigma (x)$ be the largest $k$ for which there exists some $n \leq x - k$ such that $\sigma(n + 1) = \sigma(n + 2) = \cdots = \sigma(n + k)$. By modifying the techniques of Section \ref{divisor section}, we bound $F_\sigma(x)$ from above. Let $T = \sigma(n + 1) = \cdots = \sigma(n + k)$. Once again, we let $K = \log k/\log 2$.

\begin{lemma} We have
\[T \geq \prod_{p \leq K} (2^p - 1).\]
\end{lemma}

\begin{proof} Let $p \leq K$. Because $2^p \leq k$, there exists some $i \leq k$ such that $n + i \equiv 2^{p - 1}$ (mod $2^p$). For this particular $i$, we have $\sigma(2^{p - 1}) = 2^p - 1 | \sigma(n + i)$. Therefore, $2^p - 1 | T$ as well. In particular, $2^p - 1 | T$ for all $p \leq K$. However, if $p$ and $q$ are distinct primes, then $2^p - 1$ and $2^q - 1$ are relatively prime. Therefore, $T$ is a multiple of
\[\prod_{p \leq K} (2^p - 1). \qedhere\]
\end{proof}

\begin{proof}[Proof of Theorem \ref{thm: F sigma asymptotic}] By the previous lemma, there exists a constant $C$ such that
\[T \geq \prod_{p \leq K} C^p = \exp\Biggl((\log C) \sum_{p \leq K} p \Biggr) = \exp\biggl((1 + o(1)) \frac{\log C}{2} \frac{K^2}{\log K}\biggr).\]
However, Mertens' theorem implies that $T = \sigma(n + i) \ll x \log \log x$. Hence,
\[\frac{K^2}{\log K} \ll \log T \ll \log x,\]
which implies that
\[\log k \ll K \ll \sqrt{\log x \log_2 x}. \qedhere\]
\end{proof}

If we replace $\sigma$ with the sum-of-proper-divisors function $s(n)$, we get a completely different result. To prove this result, we use the following fact about $\sigma$.

\begin{lemma} The quantity $\sigma(n)$ is odd if and only if $n = m^2$ or $n = 2m^2$ for some $m$.
\end{lemma}

\begin{proof} Suppose $\sigma(n)$ is odd. By definition,
\[\sigma(n) = \prod_p (1 + p + p^2 + \cdots + p^{v_p (n)}).\]]
If $p$ and $v_p (n)$ are both odd, then $1 + p + p^2 + \cdots + p^{v_p (n)}$ is even because it is the sum of an even number of odd terms. Because $\sigma(n)$ is odd, $v_p (n)$ must be even for all odd $p$. So, $n = m^2$ or $2m^2$, depending on the parity of $v_2 (n)$.

We now prove the converse. If $v_p (n)$ is even for all odd $p$, then
\[\prod_{p > 2} (1 + p + \cdots + p^{v_p (n)})\]
is odd. In addition, $1 + 2 + \cdots + 2^{v_2 (n)}$ is always odd because every term except $1$ is even.
\end{proof}

\begin{proof}[Proof of Theorem \ref{thm: Fs}] Suppose that $s(n + 1) = s(n + 2) = \cdots = s(n + 6)$ for some integer $n$. Let $S = s(n + i)$ for all $i \leq 6$. Suppose $S$ is even. Choose $i \leq 2$ so that $n + i$ is odd. Because $s(n + i)$ is even, we have that $\sigma(n + i)$ is odd, which implies that $n + i$ is a square. By a similar argument, the number $n + i + 2$ is also a square, which is impossible. Therefore, $S$ is odd.

The sequence $n + 1, n + 2, \ldots, n + 6$ contains three even numbers $m$, $m + 2$, and $m + 4$. Because $s(m)$, $s(m + 2)$, and $s(m + 4)$ are odd, the numbers $\sigma(m)$, $\sigma(m + 2)$, and $\sigma(m + 4)$ must all be odd as well. There are two possibilities. Either two elements of $\{m, m + 2, m + 4\}$ are squares or two of them are double a square. However, the difference between two positive squares cannot be $2$ or $4$. If two elements of $\{m, m + 2, m + 4\}$ have the form $2r^2$ for some $r$, then two elements of $\{m/2, (m/2) + 1, (m/2) + 2\}$ are squares. But the difference between two positive squares cannot be $1$ or $2$, giving us a contradiction.
\end{proof}

\section{The Carmichael function}

Let $\lambda$ be the Carmichael function. Though $\lambda$ is an arithmetic function, it is neither additive nor multiplicative. Instead, for a given number $n = p_1^{a_1} \cdots p_r^{a_r}$, we have
\[\lambda(n) = \lcm (\lambda(p_1^{a_1}), \ldots, \lambda(p_r^{a_r})).\]
Let $p^a$ be a prime power. Then,
\begin{displaymath}
\lambda(p^a) = \begin{cases}
\varphi(p^a)/2, & \text{if $p = 2$ and $a \geq 3$;}\\
\varphi(p^a), & \text{otherwise.}
\end{cases}
\end{displaymath}
We prove an upper bound on $F_\lambda$ in a matter analogous to our previous functions. 

\begin{proof}[Proof of Theorem \ref{thm: F lambda}] Let $L = \lambda(n + 1) = \cdots = \lambda(n + k)$. We bound $L$ from above. For each prime $p$, there exists an $i \leq k$ such that $p^{\lfloor \log k/\log p \rfloor} | n + i$. For this $i$, we have
\[p^{\lfloor \log k/\log p \rfloor - 1} | \lambda(n + i) = L.\]
Hence, we have
\[L \geq \frac{1}{2} \prod_{p \leq \sqrt{k}} p^{\lfloor \frac{\log k}{\log p} \rfloor - 1} \gg \prod_{p \leq \sqrt{k}} p^{\frac{\log k}{\log p} - 2} = \prod_{p \leq \sqrt{k}} \frac{k}{p^2}.\]

We now bound the numerator and denominator in our product. We have
\[\prod_{p \leq \sqrt{k}} k = k^{\pi(\sqrt{k})} = \exp((\log k) \pi(\sqrt{k})) = \exp\biggl(2\sqrt{k} + (4 + o(1)) \frac{\sqrt{k}}{\log k}\biggr)\]
and
\[\prod_{p \leq \sqrt{k}} p^2 = \exp\Biggl(2\sum_{p \leq \sqrt{k}} \log p\Biggr) \leq \exp\biggl(2\sqrt{k} + o\biggl(\frac{\sqrt{k}}{\log k}\biggr)\biggr).\]
Therefore, we have
\[L \geq \exp\biggl((4 + o(1)) \frac{\sqrt{k}}{\log k}\biggr).\]
However, we have $L \leq x$ because $\lambda(n + i) \leq n + i$ for all $i$. So, $\sqrt{k}/\log k \ll \log x$, which implies that $k \ll (\log x \log_2 x)^2$.
\end{proof}

\begin{thebibliography}{99}
\bibitem{BHP} R. C. Baker, G. Harman, and J. Pintz, The difference between consecutive primes, II, {\it Proc. Lond. Math. Soc.} {\bf 83} (2001), 532--562.
\bibitem{BayK} J. Bayless and P. Kinlaw, Consecutive coincidences of Euler's function, {\it Int. J. Number Theory} {\bf 12} (2016), 1011--1026.
\bibitem{E} P. Erd{\H o}s, Some remarks on Euler's $\phi$ function and some related problems, {\it Bull. Amer. Math. Soc.} {\bf 51} (1945), 540--544.
\bibitem{EM} P. Erd{\H o}s and L. Mirsky, The distribution of values of the divisor function $d(n)$, {\it Proc. Lond. Math. Soc.} {\bf 1} (1952), 257--271.
\bibitem{EPoS1} P. Erd{\H o}s, C. Pomerance, and A. S{\' a}rk{\" o}zy, On locally repeated values of certain arithmetic functions, III, {\it Proc. Amer. Math. Soc.} {\bf 101} (1987), 1--7.
\bibitem{EPoS2} P. Erd{\H o}s, C. Pomerance, and A. S{\' a}rk{\" o}zy, On locally repeated values of certain arithmetic functions, IV, {\it Ramanujan J.} {\bf 1} (1997), 227--241.
\bibitem{FGKo+} K. Ford, B. Green, S. Konyagin, J. Maynard, and T. Tao, Long gaps between primes, {\it J. Amer. Math. Soc.} {\bf 31} (2018), 65--105.
\bibitem{Fr} A. Frank, Are there pairs of consecutive integers with the same sum of factors?, \url{https://mathoverflow.net/q/14459}.
\bibitem{Gu} R. K. Guy, \emph{Unsolved Problems in Number Theory}, 2nd ed., Springer-Verlag, 1994.
\bibitem{HW} G. H. Hardy and E. M. Wright, \emph{An Introduction to the Theory of Numbers}, 6th ed., Oxford University Press, 2008.
\bibitem{HB} D. R. Heath-Brown, The divisor function at consecutive integers, {\it Mathematika} {\bf 31} (1984), 141--149.
\bibitem{Hi} A. Hildebrand, The divisor function at consecutive integers, {\it Pacific J. Math.} {\bf 129} (1987), 307--319.
\bibitem{KKobPo} P. Kinlaw, M. Kobayashi, and C. Pomerance, On the equation $\varphi(n) = \varphi(n + 1)$, {\it Acta Arith.} {\bf 196} (2020), 69--92.
\bibitem{LGi} M. Lal and P. Gillard, On the equation $\phi(n) = \phi(n + k)$, {\it Math. Comp.} {\bf 26} (1972), 579--583.
\bibitem{Pi} C. G. Pinner, Repeated values of the divisor function, {\it Q. J. Math.} {\bf 48} (1997), 499--502.
\bibitem{PPT} P. Pollack, C. Pomerance, and E. Trevi{\~ n}o, Sets of monotonicity for Euler's totient function, {\it Ramanujan J.} {\bf 30} (2013), 379--398.
\bibitem{S} V.-T. Sp{\u a}taru, Runs of consecutive integers having the same number of divisors, {\it PUMP J. Undergrad. Res.} {\bf 6} (2023), 96--101.
\bibitem{Spi} C. A. Spiro, The Frequency with Which an Integral-Valued, Prime-Independent, Multiplicative or Additive Function of $n$ Divides a Polynomial Function of $n$, University of Illinois at Urbana-Champaign, PhD Dissertation (1981).
\bibitem{Ta} T. Tao, Monotone non-decreasing sequences of the Euler totient function, arxiv preprint arXiv:2309.02325 [math.NT], 2023. Available at \url{https://arxiv.org/abs/2309.02325}.
\bibitem{VP} C.-J. de la Vall{\' e}e Poussin, Sur la fonction $\zeta(s)$ de Riemann et le nombre des nombre premiers inferieurs {\' a} une limite donn{\' e}e, {\it Mem. Couronn{\' e}s de l'Acad. Roy. Sci. Bruxelles} {\bf 59} (1899), 1--74.
\bibitem{W} A. Weingartner, On the solutions of $\sigma(n) = \sigma(n + k)$, {\it J. Integer Sequences} {\bf 14} (2011), 
\href{https://cs.uwaterloo.ca/journals/JIS/VOL14/Weingartner/wein3.html}{Article 11.5.5}.
\end{thebibliography}

\bigskip
\hrule
\bigskip

\noindent 2020 {\it Mathematics Subject Classification}: Primary 11A25, Secondary 11N64.

\noindent \emph{Keywords:} arithmetic function, divisor function, sum-of-proper-divisors function.
\bigskip
\hrule

\bigskip

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

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received February 24 2023; 
revised versions received April 13 2023; September 12 2023.
Published in {\it Journal of Integer Sequences}, October 3 2023.

\bigskip
\hrule
\bigskip

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


\end{document}

                                                                                

