1 Introduction

Denote \(\mathbb N=\{0,1,2,3,\dots \}\) and \(\mathbb N_+=\mathbb N{\setminus } \{0\}=\{1,2,3,\dots \}.\) For \(a,b \in \mathbb Z,\) let \([a,b[=\{z \in \mathbb Z\mid a \le z < b\}\) and \([a,\infty [=\{z \in \mathbb Z\mid a \le z\}\) denote the integer intervals they span. A numerical semigroup is a subset \(S \subseteq \mathbb N\) containing 0,  stable under addition and with finite complement in \(\mathbb N.\) Equivalently, it is a subset of \(\mathbb N\) of the form \(S = \langle a_1,\ldots ,a_n \rangle =\mathbb Na_1 + \dots + \mathbb Na_n\) where \(\gcd (a_1,\ldots ,a_n)=1.\) The set \(\{a_1,\ldots ,a_n\}\) is then called a system of generators of S,  and the smallest such n is called the embedding dimension of S.

For a numerical semigroup S,  its corresponding gapset is the complement \(G=\mathbb N{\setminus } S,\) its genus is \(g=|G|,\) its multiplicity is \(m = \min S^*\) where \(S^*= S {\setminus } \{0\},\) its Frobenius number is \(f = \max (\mathbb Z{\setminus } S)\) and its conductor is \(c=f+1.\) Thus \([c,\infty [ \, \subseteq S\) and c is minimal for this property. Finally, the depth of S is \(q=\lceil c/m \rceil .\)

Given a finite subset \(A \subset \mathbb N,\) we denote by \(nA=A+\dots +A\) the n-fold sumset of A. See Sect. 2 for more details.

Definition 1.1

Let \(A \subset \mathbb Z\) be a finite subset. We associate to A the function \(\beta =\beta _A :\mathbb N_+ \rightarrow \mathbb Z\) defined for all \(n \ge 1\) by

$$\begin{aligned} \beta _A(n) = |nA|-(2n-1)(|A|-1). \end{aligned}$$

Notation 1.2

We denote by \({{\,\mathrm{\mathcal {B}}\,}}(A)\) the positive support in \(2+\mathbb N\) of the function \(\beta _A,\) i.e.

$$\begin{aligned} {{\,\mathrm{\mathcal {B}}\,}}(A) = \{n \ge 2 \mid \beta _A(n) \ge 1\}. \end{aligned}$$

For instance, \(2 \in {{\,\mathrm{\mathcal {B}}\,}}(A)\) if and only if \(|2A| \ge 3|A|-2.\) Interestingly, the failure of this condition, namely the inequality \(|2A| \le 3|A|-3,\) is the key hypothesis of the famous Freiman’s \(3k-3\) Theorem in additive combinatorics (Freiman 1959).

Example 1.3

If \(|A|=0\) or 1,  then \({{\,\mathrm{\mathcal {B}}\,}}(A)\) is infinite. Indeed, if \(A=\emptyset ,\) then \(|nA|=0\) and so \(\beta _\emptyset (n)=2n-1\) for all \(n \ge 1.\) Thus \({{\,\mathrm{\mathcal {B}}\,}}(\emptyset )=2+\mathbb N\) in that case. Similarly, if \(|A|=1,\) then \(\beta _A(n)=1\) for all \(n \ge 1.\) So here again \({{\,\mathrm{\mathcal {B}}\,}}(A)=2+\mathbb N.\)

In sharp contrast, Theorem 3.3 below states that if \(S \subset \mathbb N\) is a numerical semigroup of genus \(g \ge 2,\) then \({{\,\mathrm{\mathcal {B}}\,}}(\mathbb N{\setminus } S)\) is finite.

Example 1.4

Let \(S=\langle 3,7 \rangle .\) Then \(\mathbb N{\setminus } S=\{1,2,4,5,8,11\}\) and \(\beta _{\mathbb N{\setminus } S}(n)=0\) for all \(n \ge 2\) as easily seen. In particular, \({{\,\mathrm{\mathcal {B}}\,}}(\mathbb N{\setminus } S)=\emptyset .\)

More generally, it was shown in Komeda (1998) and Oliveira (1991) that \(\beta _{\mathbb N{\setminus } S}(n)=0\) for all symmetric numerical semigroups S of multiplicity \(m \ge 3\) and all \(n \ge 2.\) We shall not use this result below, but instead give a short self-contained proof of an immediate consequence, namely that \({{\,\mathrm{\mathcal {B}}\,}}(\mathbb N{\setminus } S)\) is empty in that case.

In fact, \({{\,\mathrm{\mathcal {B}}\,}}(\mathbb N{\setminus } S)\) is empty in most cases. Indeed, Buchweitz discovered in 1980 that the condition \({{\,\mathrm{\mathcal {B}}\,}}(\mathbb N{\setminus } S) = \emptyset \) is necessary for S to be a Weierstrass semigroup. By constructing instances where this condition fails, Buchweitz (1980) was able to negate the longstanding conjecture by Hurwitz (1893) according to which all numerical semigroups of genus \(g \ge 2\) are Weierstrass semigroups. His first counterexample was \( S =\langle 13,14,15,16,17,18,20,22,23 \rangle ,\) with corresponding gapset

$$\begin{aligned} G = \mathbb N{\setminus } S= [1,12] \cup \{19, 21, 24, 25\} \end{aligned}$$

of cardinality 16. Then \(2G=[2,50] {\setminus } \{39, 41, 47\},\) so that \(|2G|=46\) and \(\beta _G(2)=46-3 \cdot 15=1,\) implying \(2 \in {{\,\mathrm{\mathcal {B}}\,}}(G)\) and thus impeding S to be a Weierstrass semigroup. For more information on Buchweitz’s condition and Weierstrass semigroups, see e.g. Eisenbud and Harris (1987) and Kaplan and Ye (2013).

Here are the contents of this paper. In Sect. 2, we recall a result of Nathanson in additive combinatorics and we use it to study the asymptotic behavior of the function \(\beta _A(n).\) In Sect. 3, we introduce the Buchweitz set of a numerical semigroup and we prove our main results. Section 4 concludes the paper with open questions on the possible shapes of the sets \({{\,\mathrm{\mathcal {B}}\,}}(A).\)

2 Sumset Growth

Given finite subsets AB of a commutative monoid \((M,+),\) we denote as usual

$$\begin{aligned} A+B=\{a+b \mid a \in A, b \in B\}, \end{aligned}$$

the sumset of AB,  and \(2A=A+A.\) More generally, if \(n \ge 2,\) we denote \(nA=A+(n-1)A,\) where \(1A=A.\) The set nA is called the n-fold sumset of A.

A classical question in additive combinatorics is, how does |nA| grow with n? Here we only consider the case \(M=\mathbb Z.\) We shall need the following result of Nathanson (1996, Theorem 1.1).

Theorem 2.1

Let \(A_0 \subset \mathbb N\) be a finite subset of cardinality \(k \ge 2,\) containing 0 and such that \(\gcd (A_0)=1.\) Let \(a_0=\max (A_0).\) Then there exist integers cd and subsets \(C \subseteq [0,c-2],\, D \subseteq [0,d-2]\) such that

$$\begin{aligned} nA_0 = C \sqcup [c,a_0n-d] \sqcup (a_0n-D) \end{aligned}$$

for all \(n \ge \max \{(|A_0|-2)(a_0-1)a_0,1\}.\)

As pointed out in Nathanson (1996), the hypotheses \(0 \in A_0\) and \(\gcd (A_0)=1\) are not really restrictive. Indeed, for any finite set \(A \subset \mathbb Z\) with \(|A| \ge 2,\) the simple transformation \(A \mapsto A_0=(A-\alpha )/d,\) where \(\alpha =\min (A)\) and \(d=\gcd (A-\alpha ),\) yields a set \(A_0\) satisfying these hypotheses and such that \(|nA_0|=|nA|\) for all n. In view of our applications to gapsets, we shall need the following version.

Corollary 2.2

Let \(A \subset \mathbb N_+\) be a finite subset containing \(\{1,2\}.\) Let \(a=\max (A).\) Then there is an integer \(b \le 1\) such that

$$\begin{aligned} |nA| = (a-1)n+b \end{aligned}$$

for all \(n \ge (|A|-2)(a-2)(a-1).\)

Proof

Set \(A_0=A-1\) and \(a_0=a-1.\) Then \(A_0\) contains \(\{0,1\},\) hence it satisfies the hypotheses of Theorem 2.1. Using the same notation, its conclusion implies

$$\begin{aligned} |nA_0| = a_0n+b \end{aligned}$$
(1)

for all \(n \ge \max \{(|A_0|-2)(a_0-1)a_0,1\},\) where

$$\begin{aligned} b=|C|+|D|-c-d+1. \end{aligned}$$

Note that \(b \le 1\) since \(|C| \le \max (0,c-1),\) \(|D| \le \max (0,d-1).\) The desired statement follows from (1) since \(|nA|=|nA_0|\) for all \(n \ge 0.\) \(\square \)

2.1 Asymptotic Behavior of \(\beta _A(n)\)

We now study the evolution of \(\beta _A(n)\) as n grows.

Theorem 2.3

Let \(A \subset \mathbb N_+\) be a finite set containing \(\{1,2\}.\) Let \(f=\max (A)\) and \(g=|A|.\) Then

$$\begin{aligned} \lim _{n \rightarrow \infty } \beta _A(n) = \left\{ \begin{array}{ll} -\infty &{} \quad \text {if}\ f \le 2g-2,\\ +\infty &{} \quad \text {if}\ f \ge 2g. \end{array} \right. \end{aligned}$$

Finally if \(f=2g-1,\) then \(\beta _A(n)\) is constant and nonpositive for n large enough.

Proof

By Corollary 2.2, we have \(|nA|=(f-1)n+b\) for some integer \(b \le 1\) and for n large enough. Hence

$$\begin{aligned} \beta _A(n)= & {} (f-1)n+b-(2n+1)(g-1) \\= & {} (f-2g+1)n + b+1-g \end{aligned}$$

for n large enough. The claims for \(f \le 2g-2\) and \(f \ge 2g\) follow. If \(f=2g-1,\) then \(\beta _A(n)=b+1-g \le 0\) for n large enough, since \(b \le 1\) and \(g \ge 2.\) \(\square \)

Corollary 2.4

Let \(A \subseteq \mathbb N_+\) be a finite set containing \(\{1,2\}.\) Let \(f=\max (A)\) and \(g=|A|.\) Then \({{\,\mathrm{\mathcal {B}}\,}}(A)\) is finite if and only if \(f \le 2g-1.\)

Proof

If \(f \ge 2g,\) then \(\lim _{n \rightarrow \infty } \beta _{A}(n)=\infty \) by the theorem, whence \(\beta _A(n) \ge 1\) for all large enough n. Thus \({{\,\mathrm{\mathcal {B}}\,}}(A)\) is infinite in this case. If \(f \le 2g-1,\) the theorem implies \(\beta _A(n) \le 0\) for n large enough, whence \({{\,\mathrm{\mathcal {B}}\,}}(A)\) is finite in that case. \(\square \)

3 Application to Numerical Semigroups

Definition 3.1

Let \(S \subseteq \mathbb N\) be a numerical semigroup. We define the Buchweitz set of S as \({{\,\textrm{Buch}\,}}(S) = {{\,\mathrm{\mathcal {B}}\,}}(\mathbb N{\setminus } S).\) Explicitly, setting \(G=\mathbb N{\setminus } S,\) we have

$$\begin{aligned} {{\,\textrm{Buch}\,}}(S)= & {} \{n \ge 2 \mid |nG| > (2n-1)(|G|-1)\} \\= & {} \{n \ge 2 \mid \beta _G(n) \ge 1\}. \end{aligned}$$

In this section, we first prove that \({{\,\textrm{Buch}\,}}(S)\) is finite for all numerical semigroups S of genus \(g \ge 2.\) We then show, by explicit construction, that the cardinality of \({{\,\textrm{Buch}\,}}(S)\) may be arbitrarily large.

3.1 Finiteness of \({{\,\textrm{Buch}\,}}(S)\)

We start with a well known inequality linking the Frobenius number and the genus of a numerical semigroup.

Proposition 3.2

Let \(S \subset \mathbb N\) be a numerical semigroup with Frobenius number f and genus \(g \ge 1.\) Then \(f \le 2g-1.\)

Proof

Let \(x \in S \cap [0,f].\) Then \(f-x \notin S\) since S is stable under addition and \(x+(f-x)=f \notin S.\) Hence, the map \(x \mapsto f-x\) induces an injection

$$\begin{aligned} S \cap [0,f] \hookrightarrow \mathbb N{\setminus } S. \end{aligned}$$

Since \(|S \cap [0,f]| = (f+1)-g,\) it follows that \(f \le 2g-1,\) as claimed. \(\square \)

Recall that S is said to be symmetric if \(|S \cap [0,f]|=|\mathbb N{\setminus } S|,\) i.e. if \(f=2g-1.\) A classical result of Sylvester states that any numerical semigroup of the form \(S = \langle a,b \rangle \) with \(\gcd (a,b)=1\) is symmetric.

Theorem 3.3

Let \(S \subseteq \mathbb N\) be a numerical semigroup of genus \(g\ge 2.\) Then \({{\,\textrm{Buch}\,}}(S)\) is finite.

Proof

Let \(G = \mathbb N{\setminus } S.\) Then \({{\,\textrm{Buch}\,}}(S) = {{\,\mathrm{\mathcal {B}}\,}}(G)\) by definition. We have \(g=|G| \ge 2.\) Let \(f=\max (G)\) be the Frobenius number of S. Let \(m = \min (S {\setminus } \{0\})\) be the multiplicity of S. Then \(m \ge 2\) since \(g \ge 2,\) and \([1,m-1] \subseteq G.\)

Assume first \(m \ge 3.\) Then \(\{1,2\} \subseteq G.\) Hence Corollary 2.4 applies, and since \(f \le 2g-1\) by Proposition 3.2, it yields that \({{\,\mathrm{\mathcal {B}}\,}}(G)\) is finite, as desired.

Assume now \(m=2.\) Then \(S=\langle 2,b \rangle \) with b odd and \(b \ge 5\) since \(|G| \ge 2.\) At this point, we might conclude the proof right away using what is known in the symmetric case (Komeda 1998; Oliveira 1991). However, for the convenience of the reader, let us give a short self-contained argument. We have \(G=\{1,3,\ldots ,b-2\},\) i.e. all odd numbers from 1 to \(b-2.\) Hence \(G-1=\{0,2,\ldots ,b-3\}\) and \(\gcd (G-1)=2.\) Set \(A=(G-1)/2=[0,k],\) where \(k=(b-3)/2.\) For all \(n \ge 1,\) we have

$$\begin{aligned} |nG|=|nA|=|nk+1|=n(|G|-1)+1. \end{aligned}$$

Therefore \(\beta _G(n)=-(n-1)|G|+n,\) whence \(\beta _G(n) \le 0\) for all \(n \ge 2.\) It follows that \({{\,\mathrm{\mathcal {B}}\,}}(G) = \emptyset \) and we are done. \(\square \)

3.2 Unboundedness of \(|{{\,\textrm{Buch}\,}}(S)|\)

We show here, by explicit construction, that \(|{{\,\textrm{Buch}\,}}(S)|\) may be arbitrarily large.

Proposition 3.4

For any integer \(b\ge 3,\) there exists a numerical semigroup S such that \({{\,\textrm{Buch}\,}}(S)=[2,b].\)

Proof

Let \(k=b-2,\) and let S be the numerical semigroup of multiplicity \(m=6k+15\) and depth \(q=2\) whose corresponding gapset \(G=\mathbb N{\setminus } S\) is given by

$$\begin{aligned} G = [1,m-1] \sqcup \{2m-7, 2m-5, 2m-2, 2m-1\}. \end{aligned}$$
(2)

We claim that \({{\,\textrm{Buch}\,}}(S)=[2,k+2].\) Indeed, we will show a more precise statement, namely

$$\begin{aligned} \beta _G(n)=\left\{ \begin{array}{ll} 1 &{} \quad \text {if}\ n=2,\\ 2 &{} \quad \text {if}\ 3\le n \le k+2,\\ -6(n-k-3) &{} \quad \text {if}\ n\ge k+3. \end{array} \right. \end{aligned}$$

Let \(A=(2m-1)-G.\) Then \(\beta _G(n)=\beta _A(n)\) since \(|nG|=|nA|\) for all \(n \ge 1.\) We have

$$\begin{aligned} A=[0,1] \sqcup \{4,6\} \sqcup [m,2(m-1)]. \end{aligned}$$

Let us compute 2A and 3A. We obtain

$$\begin{aligned} 2A= & {} [0,2] \sqcup [4,8] \sqcup \{10,12\} \sqcup [m,4(m-1)], \\ 3A= & {} [0,14] \cup \{16,18\} \cup [m,6(m-1)]. \end{aligned}$$

In general, we have

$$\begin{aligned} nA = \left( [0,6n-4] \sqcup \{6n-2,6n\}\right) \cup [m,2n(m-1)] \end{aligned}$$
(3)

for all \(n \ge 3,\) as easily verified by induction on n.

Let us determine |nA| for all \(n \ge 1.\) Note first that the union in (3) is disjoint if and only if \(6n+1 \le m\) . Moreover, as \(m=6k+15,\) we have

$$\begin{aligned} 6n+1\le m \Longleftrightarrow n\le k+2. \end{aligned}$$

In contrast, if \(n\ge k+3,\) i.e. if \(6n-3\ge m,\) then the union in (3) collapses to a single interval and we get

$$\begin{aligned} nA=[0,2n(m-1)]. \end{aligned}$$

Summarizing, we have

$$\begin{aligned} |nA| = \left\{ \begin{array}{ll} m+3 &{} \quad \text {if}\ n=1,\\ 3m+7 &{} \quad \text {if}\ n=2,\\ (2n-1)(m-1)+6n-1 &{} \quad \text {if}\ 3\le n\le k+2,\\ 2n(m-1)+1 &{}\quad \text {if}\ n\ge k+4. \end{array} \right. \end{aligned}$$

The stated formula for \(\beta _G(n)=\beta _A(n)=|nA|-(2n-1)(|A|-1)\) follows. Hence \({{\,\textrm{Buch}\,}}(S)=[2,k+2],\) as claimed. \(\square \)

This family of numerical semigroups was inspired by the PF-semigroups introduced in García-García et al. (2021).

3.3 More Intervals

What are the possible shapes of \({{\,\textrm{Buch}\,}}(S)\) when S varies? We do not know in general. By Proposition 3.4, any finite integer interval I with \(|I| \ge 2\) and \(\min (I) = 2\) may be realized as \(I={{\,\textrm{Buch}\,}}(S)\) for some numerical semigroup S. Here we present families of numerical semigroups S realizing as \({{\,\textrm{Buch}\,}}(S)\) all finite integer intervals I with \(|I| \ge 2\) and \(\min (I) \in \{3,4,5,6\}.\)

Proposition 3.5

Let \(k \ge 1.\) Let S be the numerical semigroup of multiplicity \(m=6k+19\) and depth \(q=2\) whose corresponding gapset \(G=\mathbb N{\setminus } S\) is given by

$$\begin{aligned} G = [1,m-1] \sqcup \{2m-7, 2m-6, 2m-2, 2m-1\}. \end{aligned}$$
(4)

Then \({{\,\textrm{Buch}\,}}(S)=[3,k+3].\)

Proof

Let again \(A=(2m-1)-G=[0,1]\sqcup \{5,6\}\sqcup [m,2(m-1)].\) We then have

$$\begin{aligned} 2A= & {} [0,2] \sqcup [5,7] \sqcup [10,12] \sqcup [m,4(m-1)], \\ 3A= & {} [0,3] \sqcup [5,8] \sqcup [10,13] \sqcup [15,18] \sqcup [m,6(m-1)], \\ 4A= & {} [0,24] \cup [m,8(m-1)]. \end{aligned}$$

It follows that \(nA=[0,6n]\cup [m,2n(m-1)]\) for all \(n \ge 4.\) In particular, if \(6n\ge m\) then \(nA=[0,2n(m-1)].\) Therefore,

$$\begin{aligned} \beta _G(n)=\beta _A(n)=\left\{ \begin{array}{ll} 0 &{} \quad \text {if}\ n=2,\\ 1 &{} \quad \text {if}\ n=3,\\ 4 &{} \quad \text {if}\ 4 \le n \le k+3,\\ 6k-6n+22 &{} \quad \text {if}\ n \ge k+4. \end{array} \right. \end{aligned}$$

Hence \({{\,\textrm{Buch}\,}}(S)=[3,k+3],\) as claimed. \(\square \)

Proposition 3.6

For \(k\ge 1\) and \(i\in \{1,2,3\},\) let \(S_i\) be the numerical semigroup with \(G_i=\mathbb N{\setminus } S_i\) given by

$$\begin{aligned} \begin{array}{rcl} G_1 &{} = &{} [1,m_1-1] \sqcup \{2m_1-6, 2m_1-2, 2m_1-1\},\\ G_2 &{} = &{} [1,m_2-1] \sqcup \{2m_2-10,2m_2-4, 2m_2-3, 2m_2-2\},\\ G_3 &{} = &{} [1,m_3-1] \sqcup \{2m_3-10, 2m_3-9, 2m_3-2\}, \end{array} \end{aligned}$$

where \(m_1=4k+22,\) \(m_2=7k+44\) and \(m_3=5k+55,\) respectively. Then

$$\begin{aligned} {{\,\textrm{Buch}\,}}(S_1) = [4,k+4],\quad {{\,\textrm{Buch}\,}}(S_2) = [5,k+5],\quad {{\,\textrm{Buch}\,}}(S_3) = [6,k+6]. \end{aligned}$$

Proof

Similar to the proofs of Propositions 3.4 and 3.5. We omit it here. \(\square \)

Having realized all finite integer intervals I with \(|I| \ge 2\) and \(\min (I) \in [2,6]\) as \(I={{\,\textrm{Buch}\,}}(S)\) for a suitable numerical semigroups S,  is it possible to do the same for all finite integer intervals I with \(\min (I) \ge 7\)? We do not know in general. But here is a particular case where \(\min (I)\) can be arbitrarily large. It is based on a family of numerical semigroups found in Komeda (1998).

Proposition 3.7

For any integer \(k \ge 1,\) there is a numerical semigroup S such that \({{\,\textrm{Buch}\,}}(S) = [7+2k,7+4k].\)

Proof

For \(k \ge 1,\) let S be the numerical semigroup minimally generated by the set \(T_1 \cup T_2 \cup T_3,\) where

$$\begin{aligned} T_1= & {} [44 + 27 k + 4 k^2,79 + 51 k + 8 k^2], \\ T_2= & {} [81 + 51 k + 8 k^2, 84 + 53 k + 8 k^2], \\ T_3= & {} [87 + 53 k + 8 k^2,87 + 54 k + 8 k^2]. \end{aligned}$$

The corresponding gapset \(G=\mathbb N{\setminus } S\) is then given by

$$\begin{aligned} G = [1,43 + 27 k + 4 k^2] \cup \{80 + 51 k + 8 k^2, 85 + 53 k + 8 k^2, 86 + 53 k + 8 k^2 \}. \end{aligned}$$

Let \(A=(86 + 53 k + 8 k^2)-G.\) Then

$$\begin{aligned} A=[0,1]\sqcup \{6+2k\}\sqcup [43 + 26 k + 4 k^2,85 + 53 k + 8 k^2], \end{aligned}$$

of cardinality \(|A|=46 + 27 k + 4 k^2.\) The n-fold sumsets of A are then given by

$$\begin{aligned} nA{} & {} =[0,n] \cup \left( \bigcup _{i=1}^{n}\left[ i (6 + 2 k), i (6 + 2 k) + n - i\right] \right) \nonumber \\{} & {} \quad \cup \left[ 43 + 26 k + 4 k^2,(85 + 53 k + 8 k^2) n\right] . \end{aligned}$$
(5)

\(\bullet \) Assume first \(2\le n<6+2k.\) In this case, we have

$$\begin{aligned}{} & {} 0<n<6+2k<6+2k+n-1<\dots< (n-1)(6+2k) \\{} & {} \quad< (n-1)(6+2k)+n-1<n(6+2k)<(7+2k)(6+2k)+1 \\{} & {} \quad = 43 + 26 k + 4 k^2< (85 + 53 k + 8 k^2) n. \end{aligned}$$

Thus, all the sets appearing in (5) are disjoint and the cardinality of nA is equal to

$$\begin{aligned}{} & {} (n+1)+\sum _{i=1}^n i+((8 k^2+53 k+85) n-(4 k^2+26 k+43)+1)\\{} & {} \quad =-41 - 26 k - 4 k^2 + (173 n)/2 + 53 k n + 8 k^2 n + n^2/2. \end{aligned}$$

Thus,

$$\begin{aligned}{} & {} \beta _G(n)=(-41 - 26 k - 4 k^2 + (173 n)/2 + 53 k n + 8 k^2 n + n^2/2)\nonumber \\{} & {} \qquad -(4 k^2+27 k+46-1) (2 n-1)\nonumber \\{} & {} \quad =(4+k)-\left( \frac{7}{2} +k\right) n+\frac{1}{2} n^2 \end{aligned}$$
(6)

for every \(n\in [2,5+2k].\)

The only difference between the case \(n=6+2k\) and the previous one is that the sets [0, n] and \([6+2k,6+2k+n-1]\) have a nonempty intersection, equal to \(\{6+2k\}.\) Replacing n by \(6+2k\) and subtracting one, we obtain \(\beta _G(6+2k)=0.\)

\(\bullet \) Assume now \(6+2k < n \le 11+4k.\) The sequence of sets [0, n] and

$$\begin{aligned}{}[6\!+\!2k,6\!+\!2k\!+\!n\!-\!1], \dots , [(n\!-\!5\!-\!2k)(6\!+\!2k),(n\!-\!5\!-\!2k)(6\!+\!2k)\!+\!(5\!+\!2k)] \end{aligned}$$

verifies that the intersection of any two consecutive terms is nonempty. Moreover, their union is the interval \([0,(n-5-2k)(6+2k)+(5+2k)]\) whose cardinality is equal to \((n-5-2k)(6+2k)+(5+2k)+1.\) For \(i=n-4-2k,\ldots ,6+2k\) the intervals are disjoint with all the others sets appearing in the expression (5); the cardinality of the union of these sets is equal to \(\sum _{i=n-2 k-5}^{2k+5} i.\) For every \(i=7+2k,\ldots ,n\) the intersection

$$\begin{aligned}{}[ i (6 + 2 k), i (6 + 2 k) + n - i] \cap [43+26k+4k^2,(8 k^2+53 k+85)n] \end{aligned}$$

is nonempty, except for \(n=7+2k.\) Since \((7+2k)(6+2k)=42+26k+4k^2,\) the set

$$\begin{aligned}{} & {} \left( \bigcup _{i=7+2k}^{n}\left[ i (6 + 2 k), i (6 + 2 k) + n - i\right] \right) \\{} & {} \quad \cup \left[ 43 + 26 k + 4 k^2,(85 + 53 k + 8 k^2) n\right] \end{aligned}$$

is equal to \([42+26k+4k^2,(85 + 53 k + 8 k^2) n],\) and the cardinality of this set is \(\left( \left( 8 k^2+53 k+85\right) n-4 k^2-26 k-42\right) +1.\) Putting all the above together, we have that if \(6+2k < n \le 11+4k,\) the set nA has cardinality equal to

$$\begin{aligned}{} & {} ((n-5-2k)(6+2k)+(5+2k)+1)\\{} & {} \qquad + \sum _{i=n-2 k-5}^{2k+5} i+\left( \left( 8 k^2+53 k+85\right) n-4 k^2-26 k-42\right) +1\\{} & {} \quad =-65 - 46 k - 8 k^2 + (193 n)/2 + 57 k n + 8 k^2 n - n^2/2, \end{aligned}$$

and therefore

$$\begin{aligned} \beta _G(n)= & {} -65 - 46 k - 8 k^2 + (193 n)/2 + 57 k n + 8 k^2 n - n^2/2\nonumber \\{} & {} -(2 n - 1) (46 + 27 k + 4 k^2 - 1)\nonumber \\= & {} (-20-19 k-4 k^2)+\left( 3 k +\frac{13 }{2}\right) n-\frac{n^2}{2} \end{aligned}$$
(7)

for every \(n\in [6+2k,11+4k].\)

\(\bullet \) Finally, assume \(11+4k<n.\) The set

$$\begin{aligned}{}[0,n]\cup \left( \bigcup _{i=1}^{6+2k}[i(6+2k),i(6+2k)+n-i]\right) \cup [43 \!+\! 26 k \!+\! 4 k^2,(85 \!+\! 53 k \!+\! 8 k^2) n] \end{aligned}$$

is equal to \([0,(85 + 53 k + 8 k^2) n]\) and the remaining intervals are contained in this union. So we have \(nA=[0,(85 + 53 k + 8 k^2) n]\) and therefore

$$\begin{aligned} \beta _G(n)= & {} -\left( 4 k^2+27 k+46-1\right) (2 n-1)+\left( 8 k^2+53 k+85\right) n+1\nonumber \\= & {} (4k^2+27k+46)-(k+5)n \end{aligned}$$
(8)

for every \(n>11+4k.\)

Combining \(\beta _G(6+2k)=0\) with the formulation of (6), (7) and (8) for \(\beta _G(n),\) we get the following formulas:

$$\begin{aligned} \beta _G(n)=\left\{ \begin{array}{ll} (4+k)-(\frac{7}{2} +k)n+\frac{1}{2} n^2 &{} \quad \text {if}\ 2\le n< 6+2k,\\ 0 &{} \quad \text {if}\ n=6+2k,\\ (-20-19 k-4 k^2)+(3 k +\frac{13 }{2})n-\frac{n^2}{2} &{} \quad \text {if}\ 6+2 k<n\le 11+4 k,\\ (4k^2+27k+46)-(k+5)n &{} \quad \text {if}\ 11+4 k<n. \end{array} \right. \end{aligned}$$

Let \(k \ge 1\) be fixed. For \(2\le n<6+2k,\) the formula of \(\beta _G(n)\) is a degree two polynomial in n with positive leading coefficient such that \(\beta _G(2)=-1-k<0\) and \(\beta _G(5+2k)=-1-k<0.\) We have therefore \(\beta _G(n)<0\) for every \(n=2,\ldots ,5+2k.\)

If \(n>11+4k,\) we now have that \(\beta _G(n)\) is a degree one polynomial with negative leading coefficient and such that \(\beta _G(12+4k)=-14-5k<0.\) So \(\beta _G(n)<0\) for every \(n>11+4k.\)

Finally, if \(6+2 k<n \le 11+4 k\) the function \(\beta _G(n)\) is a degree two polynomial in n with negative leading coefficient. As in addition \(\beta _G(7+2k)=1+k,\) \(\beta _G(7+4k)=1\) and \(\beta _G(8+4k)=-k,\) the only positive values that we have in this part are for \(n\in [7+2k,7+4k].\)

Since \(\beta _G(n) \le 0\) except for \(n\in [7+2k,7+4k],\) the set \({{\,\textrm{Buch}\,}}(S)\) is equal to \([7+2k,7+4k].\) \(\square \)

4 Concluding Remarks

The current knowledge on the structure of \({{\,\mathrm{\mathcal {B}}\,}}(A)\) for finite subsets \(A \subset \mathbb Z\) is very scarce, even for gapsets. Do they have some special shape or property? We end this paper with three questions based on the few currently available observations.

Question 4.1

Let \(A \subset \mathbb Z\) be a finite subset, or more specifically a gapset. Is the set \({{\,\mathrm{\mathcal {B}}\,}}(A)\) always an interval of integers?

Question 4.2

Even more so, is the function \(\beta _A(n)\) unimodal?

Question 4.3

In sharp contrast with the above questions, let \(T \subset 2+\mathbb N\) be any finite subset. Does there exist a finite subset \(A \subset \mathbb N,\) or more specifically a gapset, such that \({{\,\mathrm{\mathcal {B}}\,}}(A)=T\)?