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

\newcommand{\N}{\mathbb{N}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\mcb}{\ensuremath{ \mathcal B}}


\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 The Fourth Positive Element in the \\
    \vskip .1in
    Greedy $B_h$-Set
    }
    \vskip 1cm
    \large
    Melvyn B. Nathanson\\
    Department of Mathematics\\Lehman College (CUNY)\\Bronx, NY 10468\\
    USA\\
    \href{mailto:melvyn.nathanson@lehman.cuny.edu}{\tt melvyn.nathanson@lehman.cuny.edu} \\
   \ \\ 
    Kevin O'Bryant \\
    Department of Mathematics\\College of Staten Island (CUNY)\\Staten Island, NY 10314\\
    USA \\
    \href{mailto:kevin.obryant@csi.cuny.edu}{\tt kevin.obryant@csi.cuny.edu}\\
\end{center}

\vskip .2 in
\begin{abstract}
    For a positive integer $h$, a {\it $B_h$-set\/} is a set of integers $A$ such that every integer $n$ has at most one representation
    in the form $n = x_1 + \cdots + x_h$, where $x_r \in A$ for all $r = 1,\ldots, h$
    and $x_1 \le \cdots \le x_h $.
    The {\it greedy $B_h$-set\/} is the infinite set of nonnegative integers
    $\{a_0(h), a_1(h), a_2(h), \ldots \}$
    constructed as follows:  $a_0(h) = 0$, and $a_{k+1}(h)$ is least integer greater than $a_k(h)$ for which $\{a_0(h), a_1(h), a_2(h), \ldots, a_k(h),a_{k+1}(h) \}$
    is a $B_h$-set.
    Nathanson gave the formulas $a_1(h) = 1$, $a_2(h) = h+1$, and $a_3(h) = h^2+h+1$, valid for all $h$.
    This paper proves that $a_4(h)$, the fourth positive term of the greedy $B_h$-set, is
    $\left( h^3 + 3h^2 + 3h + 1\right) /2$ if $h$ is odd and
    $\left( h^3 + 2h^2 + 3h + 2\right) /2$ if $h$ is even. In particular, $a_4(h)$ is not a polynomial, but is a quasipolynomial.
\end{abstract}


\section{The greedy algorithm}
Let $h$ be a positive integer.
A finite or infinite set $A$  of nonnegative integers is a 
{\it $B_h$-set\/} if no integer has two different
representations as sums of $h$ elements of $A$.
Equivalently, the set $A$ is a $B_h$-set if the equation
\[
x_1 + \cdots + x_h = y_1+ \cdots \le y_h
\]
with $x_i,y_i \in A$ for all $r=1,\ldots,h$ and
\[
x_1 \leq \cdots \leq  x_h \qquad\text{and}\qquad y_1 \le \cdots y_h
\]
implies that $x_i = y_i$ for all $i  = 1,\ldots, h$.
A $B_2$-set is also called a {\it Sidon set.}

For every positive integer $h$, we  use a greedy algorithm to construct a 
$B_h$-set
$\{a_k(h): k = 0,1,2,\ldots\}$ as follows:  $a_0(h) = 0$ and,
if $\{a_0(h), a_1(h), \ldots, a_k(h)\}$ is a $B_h$-set, then $a_{k+1}(h)$ is
the least positive integer such that  $\{a_0(h), a_1(h), \ldots, a_k(h), a_{k+1}(h)\}$
is a $B_h$-set.
The greedy $B_1$-set is simply the set $\N_0$ of nonnegative integers, that is, $a_k(1) = k$ for all
$k \in \N_0$.  The greedy $B_2$-set is the (shifted) Mian-Chowla sequence
(Mian-Chowla~\cite{mian-chow44}, Guy~\cite[Section E28]{guy04}).
In the OEIS~\cite{OEIS}, the greedy $B_h$-set for $1\le h\le 9$ are sequences (in order, with various offsets and shifts) \seqnum{A001477}, \seqnum{A005282}, \seqnum{A051912}, \seqnum{A365300}, \seqnum{A365301}, \seqnum{A365302}, \seqnum{A365303}, \seqnum{A365304}, \seqnum{A365305}.
The first, second, third, fourth, fifth and sixth positive terms of the greedy $B_h$-set are \seqnum{A000012}, \seqnum{A020725}, \seqnum{A002061} (offset), \seqnum{A369817}, \seqnum{A369818}, \seqnum{A369819}, respectively. These are rows and columns of the table sequences \seqnum{A365515} and (shifted by 1) \seqnum{A347570}.

For all $h \geq 1$ we have
\[
a_0(h) = 0,\quad a_1(h) = 1, \quad\text{and}\quad a_2(h) = h+1.
\]
From computer calculations of initial segments of $B_h$-sets for small $h$, 
the second author
conjectured on September 30 2023 that, for all positive integers $h$, we have
\[
a_3(h) = h^2+h+1.
\]
This formula for $a_3(h)$ was later proved by the first author~\cite{nath2023x}.
In this paper we obtain an explicit quasi-polynomial for $a_4(h)$.

\begin{theorem}                                                       \label{Bhtheorem}
The fourth positive element in the greedy $B_h$-set is
\begin{align*}
    a_4(h)
    &amp; = \begin{cases}
        \frac{1}{2} \left( h^3 + 3h^2 + 3h + 1\right),  &amp; \text{if $h$ is odd;} \\
        \frac{1}{2}\left( h^3 + 2h^2 + 3h + 2\right),   &amp; \text{if $h$ is even.}
    \end{cases}
\end{align*}
\end{theorem}

Using the floor function, we may also write
\[
a_4(h) = \left\lfloor \frac{h+3}{2} \right\rfloor h^2 +  \left\lfloor \frac{3h}{2} \right\rfloor +1.
\]
It is an open problem to compute exact values or even asymptotic estimates
for $a_k(h)$ for $k \geq 5$.
Indeed, it is not even known if $a_k(h) &lt; a_k(h+1)$ for all integers $h \geq 1$
and $k \geq 2$.  We have the upper bound~\cite{nath2023x}
\[
a_k(h) \leq \sum_{i=0}^{k-1} h^i &lt; h^{k-1} + 2h^{k-2}
\]
for all positive integers $h$ and $k$.


\section{Lower bound for $a_4(h)$}
In this section we compute a lower bound for $a_4(h)$.

For $u,v \in \R$,   define the interval of integers $[u,v] = \{ n \in \Z: u \leq n \leq v\}$.

\begin{lemma}                                      \label{Bhlemma1}
For all integers $h \geq 2$ we have
\[
a_4(h) \geq    \begin{cases}
    \frac{1}{2}\left( h^3 + 3h^2 + 3h + 1\right),  &amp; \text{if $h$ is odd;}\\
    \frac{1}{2}\left( h^3 + 2h^2 + 3h + 2\right),  &amp; \text{if $h$ is even.}
\end{cases}
\]
\end{lemma}

\begin{proof}

    Let  $\mcb$ be the set of positive integers $b$ such that $a_4(h) \neq b$.
    A sufficient condition that  $b \in \mcb$ is the existence
    of nonnegative integers $x_1,x_2,y_1,y_2,y_3$ with
    \[
    x_1+x_2  \leq h-1, \qquad y_1+y_2+y_3 \leq h, \qquad x_1y_1 = x_2y_2 = 0
    \]
    such that
    \[
    b + x_1 + x_2(h+1) = y_1 + y_2(h+1) + y_3(h^2+h+1)
    \]
    or, equivalently,
    \[
    b =  y_3(h^2+h+1)  + (y_2 - x_2) (h+1) + (y_1-x_1).
    \]
    We consider the following two cases separately: $x_2 = 0$ and $y_2 = 0$.

    Let $x_2 = 0$ and let $1 \leq y_3 \leq h$ and $0\leq y_2 \leq h-y_3$.
    Because
    \[
    0 \leq x_1 \leq h-1 \qquad\text{and}\qquad 0 \leq y_1 \leq h-y_3-y_2,
    \]
    the set \mcb\ contains the interval
    \begin{align}
        y_3(h^2+ &amp; h+1) + y_2(h+1) +  \left[ -(h-1), h-y_3-y_2 \right]  \nonumber   \\
        &amp; = y_3(h^2+h+1)  +  \left[  y_2(h+1) -h+1, y_2h + h- y_3 \right].        \label{Bhbeqny}
    \end{align}
    If
    \begin{equation}               \label{Bhbeqny2y3}
    0 \leq y_2 \leq h-y_3 - 1
    \end{equation}
    then  \mcb\ also contains the interval
    \begin{align}
        y_3(h^2+ &amp; h+1)  +   \left[   (y_2+1) (h+1) -h +1,  (y_2+1) h + h- y_3 \right]    \nonumber   \\
        &amp; = y_3(h^2+h+1)  +  \left[  y_2(h+1) + 2, y_2h  + 2h   - y_3 \right].       \label{Bhbeqny2}
    \end{align}
    Inequality~\eqref{Bhbeqny2y3} implies that
    \[
    y_2(h+1) + 2  \leq y_2h + h- y_3 +1,
    \]
    and so intervals~\eqref{Bhbeqny} and~\eqref{Bhbeqny2} overlap.
    Therefore, \mcb\ contains the interval
    \begin{align}
        y_3 &amp; (h^2+h+1)  +  \bigcup_{y_2=0}^{h-y_3} \left[  y_2(h+1) -h+1, y_2h + h- y_3 \right]   \nonumber  \\
        &amp; = y_3(h^2+h+1) + \left[ -h+1, (h-y_3) h + h- y_3 \right] \nonumber  \\\
        &amp; = \left[  y_3(h^2+h+1) -h+1, y_3h^2 + h^2+h \right].      \label{Bhyint}
    \end{align}



    Let $y_2 = 0$ and let $1 \leq y_3 \leq h$ and $0 \leq x_2 \leq h-y_3$.
    Note that $h-y_3 \leq h -1$.
    Because
    \[
    0 \leq x_1 \leq h-1-x_2 \qquad\text{and}\qquad 0 \leq y_1 \leq h-y_3,
    \]
    the set \mcb\ contains the interval
    \begin{align}
        y_3(h^2+ &amp; h+1)  - x_2(h+1) +  \left[ -(h-1-x_2), h -y_3 \right]  \nonumber   \\
        &amp; = y_3(h^2+h+1)  +  \left[  -x_2h -h + 1,  - x_2(h+1) + h -  y_3  \right].          \label{Bhbeqnx}
    \end{align}
    If
    \begin{equation}               \label{Bhbeqnx2y3}
    0 \leq x_2 \leq h-y_3-1
    \end{equation}
    then  \mcb\ also contains the interval
    \begin{align}
        y_3(h^2+ &amp; h+1)  +  \left[  -(x_2+1)h -h + 1,  - (x_2+1)(h+1)+ h - y_3 \right]    \nonumber   \\
        &amp; = y_3(h^2+h+1)  +  \left[  -x_2h - 2h + 1,  - x_2(h+1) - y_3 -1 \right].         \label{Bhbeqnx2}
    \end{align}
    Inequality~\eqref{Bhbeqnx2y3} implies that
    \[
    -x_2h -h  \leq - x_2(h+1)  - y_3 - 1,
    \]
    and so  intervals~\eqref{Bhbeqnx}  and~\eqref{Bhbeqnx2}  overlap.
    Therefore, \mcb\ contains the interval
    \begin{align}
        y_3 (h^2+ &amp; h+1) + \bigcup_{x_2=0}^{h-y_3}  \left[  -x_2h - h + 1,  - x_2(h+1) +  h-y_3 \right]    \nonumber \\
        &amp; = y_3(h^2+h+1) +  \left[  -(h-y_3 )h - h + 1,  h-y_3 \right] \nonumber \\
        &amp; =  \left[  y_3(h^2+ 2h+1)  -h^2 - h + 1,  y_3(h^2+h) +  h  \right].      \label{Bhxint}
    \end{align}


    Intervals~\eqref{Bhyint} and~\eqref{Bhxint} overlap because $y_3 \leq h \leq 2h$,
    and so \mcb\ contains the interval
    \begin{equation}
    I(y_3) =   \left[  y_3(h^2+ 2h+1) -h^2 - h +1, y_3h^2 + h^2+h \right]
    \end{equation}
    for $y_3 \in [1,h]$.
    These intervals move to the right as $y_3$ increases.
    Intervals $(I(y_3)$ and $I(y_3+1)$ overlap if
    \[
    (y_3+1) (h^2+ 2h+1)  -h^2 - h + 1\leq  y_3h^2+ h^2 +  h  + 1
    \]
    or, equivalently, if  $(2h+1)y_3 \leq h^2-1$ or
    \[
    y_3 \leq \left\lfloor \frac{h^2 -1}{2h+1} \right\rfloor  = \begin{cases}
        \frac{h-1}{2}, &amp; \text{if $h$ is odd;} \\
        \frac{h-2}{2}, &amp; \text{if $h$ is even.}
    \end{cases}
    \]
    For odd  $h \geq 3$, the set \mcb\ contains the interval
    \begin{align}                 \label{Bhodd1}
        \bigcup_{y_3=1}^{(h+1)/2} I(y_3)
        &amp; = \bigcup_{y_3=1}^{(h+1)/2}   \left[  y_3(h^2+ 2h+1)  -h^2 - h + 1,  y_3h^2+h^2 +  h  \right] \nonumber  \\
        &amp; = \left[  h+2,  \left(\frac{h+1}{2} \right) h^2+ h^2 +  h  \right]  \nonumber \\
        &amp; = \left[  h+2,  \frac{h^3+ 3h^2 + 2h}{2}  \right].
    \end{align}
    For even $h \geq 2$, the set \mcb\ contains the interval
    \begin{align}                       \label{Bheven1}
        \bigcup_{y_3=1}^{h/2} I(y_3) &amp; =  \left[  y_3(h^2+ 2h+1)  -h^2 - h + 1,  y_3h^2+h^2 +  h  \right]    \nonumber  \\
        &amp; = \left[  h+2,  \left(\frac{h}{2} \right) h^2+ h^2 +  h  \right]    \nonumber    \\
        &amp; =  \left[  h+2,  \frac{h^3+ 2h^2 + 2h}{2}  \right].
    \end{align}

    For odd  $h \geq 3$, let
    \[
    y_2 = 0, \qquad y_3 = \frac{h+3}{2}, \qquad x_2 = \frac{h+1}{2}.
    \]
    The set \mcb\ contains the interval
    \begin{align}              \label{Bhodd2}
        y_3(h^2 &amp; +h+1) - x_2(h+1) + [-(h-1-x_2), h-y_3] \nonumber  \\
        &amp; = \left( \frac{h+3}{2}  \right) (h^2+h+1) - \left( \frac{h+1}{2}  \right)(h+1) + \left[ -\frac{h-3}{2}, \frac{h-3}{2} \right]  \nonumber  \\
        &amp; =\left[ \frac{h^3 + 3h^2 + h + 5}{2}, \frac{h^3 + 3h^2 + 3h - 1}{2} \right] .
    \end{align}
    Intervals~\eqref{Bhodd1} and~\eqref{Bhodd2}
    overlap and so \mcb\ contains the interval
    \[
    \left[  h+2,  \frac{h^3 + 3h^2 + 3h - 1}{2} \right].
    \]
    It follows that, for odd  $h \geq 3$, we have the lower bound
    \[
    a_4(h) \geq  \frac{h^3 + 3h^2 + 3h - 1}{2} + 1 =  \frac{h^3 + 3h^2 + 3h + 1}{2}.
    \]

    For even $h \geq 2$, let
    \[
    y_2 = 0, \qquad y_3 = \frac{h+2}{2}, \qquad x_2 = \frac{h}{2}.
    \]
    The set \mcb\ contains the interval
    \begin{align}                       \label{Bheven2}
        y_3(h^2 &amp; +h+1) - x_2(h+1) + [-(h-1-x_2), h-y_3 ] \nonumber  \\
        &amp; = \left( \frac{h+2}{2} \right)  (h^2+h+1) - \left( \frac{h}{2}\right)  (h+1)
        + \left[ -\frac{h-2}{2}, \frac{h-2}{2} \right]    \nonumber    \\
        &amp; =   \left[ \frac{h^3 + 2h^2 + h + 4}{2}, \frac{h^3 + 2h^2 + 3h}{2} \right] .
    \end{align}
    Intervals~\eqref{Bheven1} and~\eqref{Bheven2}
    overlap and  so \mcb\ contains the interval
    \[
    \left[  h+2,  \frac{h^3 + 2h^2 + 3h}{2} \right].
    \]
    It follows that, for even  $h \geq 2$, we have the lower bound
    \[
    a_4(h) \geq  \frac{h^3 + 2h^2 + 3h}{2} + 1 =  \frac{h^3 + 2h^2 + 3h + 2}{2}.
    \]
    This completes the proof of Lemma~\ref{Bhlemma1}.
\end{proof}


\section{The upper bound for $a_4(h)$}

In this section we compute an upper bound for $a_4(h)$.

\begin{lemma}                                          \label{Bhlemma2}
For all positive integers $h$ we have
\[
a_4(h) \leq    \begin{cases}
    \frac{1}{2}\left( h^3 + 3h^2 + 3h + 1\right),  &amp; \text{if $h$ is odd;}\\
    \frac{1}{2}\left( h^3 + 2h^2 + 3h + 2\right),   &amp; \text{if $h$ is even.}
\end{cases}
\]
\end{lemma}


\begin{proof}
    Let
    \[
    H =  \begin{cases}
        \frac{1}{2}(h^2 + 2h + 1), &amp; \text{if $h$ is odd;}\\
        \frac{1}{2}(h^2 + h + 2),  &amp; \text{if $h$ is even.}
    \end{cases}
    \]
    We must prove that
    \[
    a_4(h) \leq (h+1)H.
    \]
    This inequality is equivalent to the statement that there do not exist nonnegative integers
    $x_0, x_1, x_2, x_3$ and $y_1, y_2, y_3$ such that
    \begin{align}                     \label{Bheqn}
        x_0 (h+1)H &amp; + x_1 + x_2(h+1) + x_3(h^2+h+1) \\
        &amp; = y_1 + y_2(h+1) + y_3(h^2+h+1) \nonumber
    \end{align}
    with
    \begin{equation}                    \label{Bheqncond1}
    x_0 + x_1 + x_2 + x_3 \leq h, \qquad  y_1 + y_2 + y_3 \leq h
    \end{equation}
    and
    \begin{equation}                    \label{Bheqncond2}
    x_0 \geq 1, \qquad x_1y_1 = x_2y_2 = x_3y_3 = 0.
    \end{equation}


    Suppose that  equation~\eqref{Bheqn} has a solution satisfying conditions~\eqref{Bheqncond1}
    and~\eqref{Bheqncond2}.   Note that
    \[
    h^2 +1 &lt; 2H.
    \]
    If $x_0 \geq 2$, then
    \begin{align*}
        (h+1)(h^2+1) &amp; &lt; 2(h+1)H  \leq x_0(h+1)H \\
        &amp; \leq  y_1 + y_2(h+1) + y_3(h^2+h+1) \\
        &amp; \leq h(h^2+h+1) \\
        &amp; &lt; (h+1) (h^2 +1),
    \end{align*}
    which is absurd.  Therefore,
    \[
    x_0=1.
    \]
    If $y_3 = 0$, then
    \[
    \frac{(h+1)(h^2+1)}{2}  &lt; (h+1)H  \leq y_1+y_2(h+1) \leq h(h+1)
    \]
    and so $(h-1)^2 &lt; 0$, which is absurd.  Therefore,
    \[
    y_3 \geq 1 \qquad\text{and}\qquad x_3 = 0.
    \]
    With $x_0=1$ and $x_3=0$, equation~\eqref{Bheqn}  becomes
    \begin{align}                 \label{Bheqn2}
        x_1+ (H+x_2)(h+1) &amp; = y_1+y_2(h+1)+y_3(h^2+h+1) \\
        &amp; =  y_1+ y_3 + (y_2 + y_3h) (h+1). \nonumber
    \end{align}
    We obtain the congruence
    \[
    x_1 \equiv y_1 + y_3 \pmod{h+1}.
    \]
    If $x_1 = 0$, then $y_1+y_3 \equiv 0 \pmod{h+1}$.  The inequalities
    $y_1 \geq 0$ and $y_3 \geq 1$ imply
    $y_1+y_3 \geq h+1$, which contradicts condition~\eqref{Bheqncond1}.
    Therefore,
    \[
    x_1 \geq 1 \qquad\text{and}\qquad y_1 = 0
    \]
    and
    \[
    x_1 \equiv y_3 \pmod{h+1}.
    \]
    Because $1 \leq y_3 \leq h$, if $x_1 \neq y_3$, then $x_1 \geq y_3+h+1 &gt; h$,
    which is absurd.  Therefore,
    \[
    x_1 = y_3
    \]
    and equation~\eqref{Bheqn2} becomes, simply,
    \begin{equation}                    \label{Bheqn3}
    H  + x_2 = y_2 +y_3h,
    \end{equation}
    where $x_2,y_2, y_3$ are nonnegative integers such that
    \[
    x_2 + y_3 \leq h-1,\quad y_2+y_3 \leq h, \qquad\text{and}\qquad x_2y_2 = 0.
    \]
    We consider separately the two cases: $h$ odd and $h$ even.

    Let $h$ be odd.  If $y_3 \leq (h+1)/2$,
    then equation~\eqref{Bheqn3} gives
    \begin{align*}
        \frac{h^2+2h+1}{2} &amp;  \leq y_2 + y_3h \leq (h-y_3) + y_3 h \\
        &amp; = h + y_3(h-1) \leq h + \frac{h^2-1}{2} \\
        &amp; = \frac{h^2+2h-1}{2}
    \end{align*}
    which is absurd.  It follows that $y_3 &gt; (h+1)/2$ and, because $h$ is odd, that
    \[
    y_3 \geq \frac{h+3}{2}.
    \]
    If $y_2 = 0$, then
    \[
    x_2 = y_3h-H \geq  \frac{h^2+3h}{2}   -  \frac{h^2 + 2h + 1}{2} \geq \frac{h - 1}{2},
    \]
    and so
    \[
    h + 1=   \frac{h-1}{2} + \frac{h+3}{2} \leq  x_2 + y_3 \leq h-1
    \]
    which is absurd.  Therefore,
    \[
    y_2 \geq 1 \qquad\text{and}\qquad x_2 = 0.
    \]
    Equation~\eqref{Bheqn3} becomes
    \[
    H  = y_2 + y_3h.
    \]
    Equivalently,
    \[
    h^2 + 2h + 1= 2H =  2y_2 + 2y_3h  \geq 2y_2 + h^2 + 3h,
    \]
    and so
    \[
    1 \geq 2y_2+h,
    \]
    which is absurd.
    This completes the proof in the odd case.




    Let $h$ be even.
    If $y_3 \leq h/2$,
    then equation~\eqref{Bheqn3} gives
    \begin{align*}
        \frac{h^2+h+2}{2} &amp;  \leq y_2 + y_3h \leq (h-y_3) + y_3 h \\
        &amp; = h + y_3(h-1) \leq h + \frac{h^2-h}{2} \\
        &amp; = \frac{h^2+h}{2}
    \end{align*}
    which is absurd.  It follows that $y_3 &gt; h/2$ and, because $h$ is even, that
    \[
    y_3 \geq \frac{h+2}{2}.
    \]
    If $y_2 = 0$, then
    \[
    x_2 = y_3h- H \geq \frac{h^2+2h}{2} - \frac{h^2 + h + 2}{2} =  \frac{h - 2}{2},
    \]
    and so
    \[
    h =  \frac{h+2}{2} +   \frac{h-2}{2} \leq  y_3+x_2 \leq h-1,
    \]
    which is absurd.  Therefore,
    \[
    y_2 \geq 1 \qquad\text{and}\qquad x_2 = 0.
    \]
    Equation~\eqref{Bheqn3} becomes
    \[
    H  = y_2 + y_3h
    \]
    Equivalently,
    \[
    h^2 + h + 2 = 2H = 2y_2 + 2y_3h \geq 2y_2 + h^2 + 2h,
    \]
    and so
    \[
    2 \geq 2y_2+h,
    \]
    which is absurd.
    This completes the proof in the even case.
\end{proof}

Now Theorem~\ref{Bhtheorem}, the exact formula for $a_4(h)$,
follows immediately from Lemmas~\ref{Bhlemma1} and~\ref{Bhlemma2}.

\begin{thebibliography}{9}
    \bibitem{guy04}
    R.~K.~Guy, \emph{Unsolved Problems in Number Theory}, 3rd edition, Springer, 2004.

    \bibitem{mian-chow44}
    A.~M.~Mian and S.~Chowla, On the $B_2$-sequences of {S}idon,
    \emph{Proc. Nat. Acad. Sci. India Sect. A} {\bf 14} (1944), 3--4.

    \bibitem{nath2023x}
    M.~B.~Nathanson, The third positive element in the greedy $B_h$-set,
    to appear in \emph{Palest.~J.~Math.}, Available at \url{http://arxiv.org/abs/2310.14426}.

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




\bigskip
\hrule
\bigskip

\noindent 2020 {\it Mathematics Subject Classification}:
Primary 11B13; Secondary 11B34, 11B75, 11P99.

\noindent \emph{Keywords: } Sidon set, $B_h$-set, greedy algorithm.

\bigskip
\hrule
\bigskip

\noindent (Concerned with sequences
\seqnum{A000012},
\seqnum{A001477},
\seqnum{A002061},
\seqnum{A005282},
\seqnum{A020725},
\seqnum{A051912},
\seqnum{A347570},
\seqnum{A365300},
\seqnum{A365301},
\seqnum{A365302},
\seqnum{A365303},
\seqnum{A365304},
\seqnum{A365305},
\seqnum{A365515},
\seqnum{A369817},
\seqnum{A369818}, and
\seqnum{A369819}.)

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received March 11 2024;
revised version received August 28 2024.
Published in {\it Journal of Integer Sequences}, August 28 2024.

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