1 Introduction

Given \(X_1, \ldots , X_n \subseteq \mathbf{Z}\), we denote by \(X_1 + \cdots + X_n\) the sumset of \(X_1, \ldots , X_n\) (i.e., the set of all sums of the form \(x_1 + \cdots + x_n\) with \(x_i \in X_i\) for all \(i = 1, \ldots , n\)); in particular, we write kX for the k-fold sumset (i.e., the sumset of k copies) of a given \(X \subseteq \mathbf{Z}\). Sumsets are some of the most fundamental objects studied in additive combinatorics [9, 12], with a great variety of results relating the “size” of the summands \(X_1, \ldots , X_n\) to that of the sumset \(X_1 + \cdots + X_n\).

When the summands are finite, the size is usually the number of elements. Otherwise, many different notions of size have been considered, each corresponding to some real-valued function (either totally or partially defined on the power set of \(\mathbf{Z}\)) that, while retaining essential features of a probability, is better suited than a measure to certain applications. In the latter case, the focus has definitely been on the asymptotic density \({\mathsf d}\), the lower asymptotic density \(\mathsf d_\star \), and the Schnirelmann density \(\sigma \), where we recall that, for a set \(X \subseteq \mathbf{N}\),

$$\begin{aligned}&\mathsf d(X) := \lim _{n \rightarrow \infty } \frac{|X \cap \llbracket 1, n \rrbracket |}{n}, \quad \mathsf d_\star (X) := \liminf _{n \rightarrow \infty } \frac{|X \cap \llbracket 1, n \rrbracket |}{n}, \quad \text {and}\quad \\&\sigma (X) := \inf _{n \ge 1} \frac{|X \cap \llbracket 1, n \rrbracket |}{n}, \end{aligned}$$

with the understanding that the limit in the definition of \(\mathsf d(X)\) has to exist. It is entirely beyond the scope of this manuscript to provide a survey of the relevant literature, so we limit ourselves to list a couple of classical results that are somehow related with our work:

  • In [14] (see, in particular, the last paragraph of the section “Added in proof”), B. Volkmann proved that, for all \(n \ge 2\) and \(\alpha _1, \ldots , \alpha _n, \beta \in {]0,1]}\) with \(\alpha _1 + \cdots + \alpha _n \le \beta \), there are \(A_1, \ldots , A_n \subseteq \mathbf{N}\) such that \(\mathsf d(A_i) = \alpha _i\) for each \(i = 1, \ldots , n\) and \(\mathsf d(A_1 + \cdots + A_n) = \beta \).

  • In [10, Theorem 1], M. B. Nathanson showed that, for \(n \ge 2\) and all \(\alpha _1, \ldots , \alpha _n, \beta \in [0,1]\) with \(\alpha _1 + \cdots + \alpha _n \le \beta \), there exist \(X_1, \ldots , X_n \subseteq \mathbf{N}\) with \(\mathsf {d}_\star (X_i) = \sigma (X_i) = \alpha _i\) for each \(i = 1, \ldots , n\) and \(\mathsf d_\star (X_1 + \cdots + X_n) = \sigma (X_1 + \cdots + X_n) = \beta \).

In a similar vein, A. Faisant et al. have more recently proved the following (see [3, Theorem 1.3]):

Theorem 1.1

Given \(n \in \mathbf{N}^+\) and \(\alpha \in [0,1]\), there is \(A \subseteq \mathbf{N}\) with \(\mathsf d(kA) = k\alpha /n\) for each \(k = 1, \ldots , n\).

Their proof combines the equidistribution theorem (i.e., that the sequence \(n \mapsto na \bmod 1\) is uniformly distributed in the interval [0, 1] for every irrational number a) with the elementary property that, for every \(\alpha \in {]0,1]}\), the asymptotic density of the set \(\left\{ \lfloor \alpha ^{-1}n \rfloor : n \in \mathbf{N}\right\} \) is equal to \(\alpha \). In the same manuscript, one can also find the following (see [3, Theorem 1.2]):

Theorem 1.2

Given \(\alpha \in [0,1]\) and a non-empty finite \(B \subseteq \mathbf{N}\), there is \(A \subseteq \mathbf{N}\) with \(\mathsf d(A+B) = \alpha \).

This is a partial generalization of Theorem 1.1 for the special case where \(n = 1\). A complete generalization was obtained by P.-Y. Bienvenu and F. Hennecart, shortly after [3] was posted on arXiv in Sept. 2018: Their proof is based on a “finite version” of Weyl’s criterion for equidistribution due to P. Erdős and P. Turán (see [1, Theorem 1.8] for details and [1, Theorems 1.1.a and 1.5] for additional results along the same lines).

Yet another item in the spirit of Theorem 1.1 is the following result by N. Hegyvári et al. (see [4, Proposition 2.1]):

Proposition 1.3

Given \(\alpha \in [0,1]\), there is \(A \subseteq \mathbf{N}\) with \(0 \in A\) and \(\gcd (A) = 1\) such that \(\mathsf d(A) = \alpha \) and \(2A = \mathbf{N}\).

In the present paper, we aim to prove that Theorems 1.1 and 1.2 and Proposition 1.3 hold, much more generally, with the asymptotic density \(\mathsf d\) replaced by an arbitrary quasi-density \(\mu \) (see Sect. 2.2 for definitions) and — what is perhaps more interesting — uniformly in the choice of \(\mu \) (see Theorems 3.13.3 for a precise formulation). Most notably, this implies that Theorems 1.1 and 1.2 are true with \(\mathsf d\) replaced by the Banach density [12, Sect. 5.7] or the analytic density [13, Sect. III.1.3], both of which play a rather important role in number theory and related fields and for which we are not aware of any similar results in the literature.

We emphasize that the proofs of our generalizations of Theorems 1.1 and 1.2 take a completely different route than the ones found in [1, 3]: The latter critically depend on special features of the asymptotic density, whereas our approach relies on the properties of a little known density first considered by R. C. Buck [2] and the “structure” of the set of all quasi-densities. This is in line with one of our long-term goals, which was also the motivation for first introducing quasi-densities in [8]: Obtain sharper versions of various results in additive combinatorics and analytic number theory by shedding light on the “(minimal) structural properties” they depend on.

2 Preliminaries

In this section, we establish some notations and terminology used throughout the paper and prepare the ground for the proofs of our main theorems in Sect. 3.

2.1 Generalities

We denote by \(\mathbf{R}\) the real numbers, by \(\mathbf{H}\) either the integers \(\mathbf{Z}\) or the non-negative integers \(\mathbf{N}\), and by \(\mathbf{N}^+\) the positive integers. Given \(x \in \mathbf{R}\), we use \(\lfloor x \rfloor \) for the greatest integer \(\le x\) and set \(\mathrm {frac}(x) := x - \lfloor x \rfloor \); and given \(X \subseteq \mathbf{Z}\) and \(h,k \in \mathbf{Z}\), we define \(k \cdot X + h := \{kx+h: x \in X\}\). An arithmetic progression of \(\mathbf {H}\) is then a set of the form \(k\cdot \mathbf {H}+h\) with \(k \in \mathbf{N}^+\) and \(h \in \mathbf{H}\), and we write

  • \(\mathscr {A}\) for the collection of all finite unions of arithmetic progressions of \(\mathbf {H}\);

  • \(\mathscr {A}_\infty \) for the collection of all subsets of \(\mathbf{H}\) that can be expressed as the union of a finite set and countably many arithmetic progressions of \(\mathbf{H}\);

  • \(\llbracket a, b \rrbracket := \{x \in \mathbf{Z}: a \le x \le b\}\) for the discrete interval between two integers a and b.

If X and Y are sets, then we write \(\mathcal P(X)\) for the power set of X and \(X \subseteq _fin Y\) to mean that \(X \setminus Y\) is finite. Further terminology and notations, if not explained when first introduced, are standard, should be clear from context, or are borrowed from [8].

2.2 Densities (and quasi-densities)

We say a function \(\mu ^\star : \mathcal P(\mathbf{H}) \rightarrow \mathbf{R}\) is an upper density (on \(\mathbf{H}\)) provided that, for all \(X, Y \in \mathcal P(\mathbf{H})\), the following conditions are satisfied:

  1. (F1)

    \(\mu ^\star (X) \le \mu ^\star (\mathbf{H}) = 1\);

  2. (F2)

    \(\mu ^\star \) is monotone, i.e., if \(X \subseteq Y\) then \(\mu ^\star (X) \le \mu ^\star (Y)\);

  3. (F3)

    \(\mu ^\star \) is subadditive, i.e., \(\mu ^\star (X \cup Y) \le \mu ^\star (X) + \mu ^\star (Y)\);

  4. (F4)

    \(\mu ^\star (k \cdot X + h) = \frac{1}{k} \mu ^\star (X)\) for every \(k \in \mathbf{N}^+\) and \(h \in \mathbf{H}\).

In addition, we say \(\mu ^\star \) is an upper quasi-density (on \(\mathbf{H}\)) if it satisfies (F1), (F3), and (F4).

It is arguable that non-monotone upper quasi-densities—whose existence is guaranteed by [8, Theorem 1]—are not so interesting from the point of view of applications. Yet, it seems meaningful to understand if monotonicity is “critical” to our conclusions or can be dispensed with: This is basically our motivation for considering upper quasi-densities in spite of our main interest lying in the study of upper densities (it is obvious that every upper density is an upper quasi-density).

With the above in mind, we let the conjugate of an upper quasi-density \(\mu ^\star \) be the function

$$\begin{aligned} \mu _\star : \mathcal {P}(\mathbf {H}) \rightarrow \mathbf {R}: X\mapsto 1-\mu ^\star (\mathbf {H}\setminus X). \end{aligned}$$

Then we refer to the restriction \(\mu \) of \(\mu ^\star \) to the set

$$\begin{aligned} \mathcal D := \{X \subseteq \mathbf {H}: \mu ^\star (X) = \mu _\star (X)\} \end{aligned}$$

as the quasi-density induced by \(\mu ^\star \), or simply as a quasi-density (on \(\mathbf{H}\)) if explicit reference to \(\mu ^\star \) is unnecessary. Accordingly, we call \(\mathcal D\) the domain of \(\mu \) and denote it by \(\text {dom}(\mu )\).

Upper densities (and upper quasi-densities) were first introduced in [8] and further studied in [6, 7]. Notable examples include the upper asymptotic, upper Banach, upper analytic, upper logarithmic, upper Pólya, and upper Buck densities, see [8, Sect. 6 and Examples 4, 5, 6, and 8] for details. In particular, we recall that the upper Buck density (on \(\mathbf{H}\)) is the function

$$\begin{aligned} {\mathfrak {b}}^\star : {\mathcal {P}}(\mathbf {H}) \rightarrow \mathbf {R}: X \mapsto \inf _{A \in \mathscr {A},\, X\subseteq A}\mathsf {d}^\star (A \cap \mathbf{N}), \end{aligned}$$
(1)

where \(\mathscr {A}\) is the collection of all finite unions of arithmetic progressions of \(\mathbf {H}\) (as already mentioned in Sect. 2.1) and \(\mathsf d^\star \) is the upper asymptotic density on \(\mathbf{N}\), that is, the function

$$\begin{aligned} \mathcal P(\mathbf{N}) \rightarrow \mathbf{R}: X \mapsto \limsup _{n \rightarrow \infty } \frac{|X \cap \llbracket 1, n \rrbracket |}{n}. \end{aligned}$$
(2)

We shall write \(\mathfrak b_\star \) and \(\mathfrak b\), respectively, for the conjugate of and the density induced by \(\mathfrak b^\star \); we call \(\mathfrak b_\star \) the lower Buck density and \(\mathfrak b\) the Buck density (on \(\mathbf{H}\)). By [8, Example5], one has

$$\begin{aligned} \mathfrak b_\star (X) = \sup _{A \in \mathscr {A},\, A \subseteq X} \mathsf d^\star (A \cap \mathbf{N}), \quad \text {for every } X \subseteq \mathbf{H}. \end{aligned}$$
(3)

Note that the density induced by and the conjugate of \(\mathsf d^\star \) are, resp., the asymptotic density \(\mathsf d\) and the lower asymptotic density \(\mathsf d_\star \) introduced in Sect. 1: One should keep this in mind when comparing our main results (that is, Theorems 3.13.3) with Theorems 1.1 and 1.2 and Proposition 1.3.

2.3 Basic properties

Our primary goal in this section is to prove an inequality for the upper and the lower Buck density of sumsets of a certain special form (Proposition 2.4). We start with a recollection of basic facts that are either implicit to or already contained in [8].

Proposition 2.1

Let \(\mu ^\star \) be an upper quasi-density on \(\mathbf {H}\). The following hold:

  1. (i)

    \(\mathfrak b_\star (X) \le \mu _\star (X)\le \mu ^\star (X) \le \mathfrak b^\star (X)\) for every \(X\subseteq \mathbf {H}\).

  2. (ii)

    If \(h \in \mathbf{H}\) and \(X \subseteq Y \subseteq \mathbf{H}\), then \(\mathfrak b_\star (X+h) = \mathfrak b_\star (X) \le \mathfrak b_\star (Y)\).

  3. (iii)

    \(\mathscr {A}\subseteq \mathrm {dom}(\mathfrak {b}) \subseteq \mathrm {dom}(\mu )\) and \(\mu (X)=\mathfrak {b}(X)\) for every \(X \in \mathrm {dom}(\mathfrak b)\).

  4. (iv)

    If \(m \in \mathbf{N}^+\) and \(\mathfrak h \subseteq \llbracket 0, m-1 \rrbracket \), then \(m \cdot \mathbf{H}+ \mathfrak h \in \mathrm {dom}(\mathfrak b)\) and \(\mathfrak b(m \cdot \mathbf{H}+ \mathfrak h) = \frac{|\mathfrak h|}{m}\).

  5. (v)

    If \(X\subseteq \mathbf {H}\) is finite, then \(X \in \mathrm {dom}(\mathfrak b)\) and \(\mathfrak b(X)=0\).

  6. (vi)

    If \(X \in \mathrm {dom}(\mathfrak b)\), \(Y \subseteq \mathbf{H}\), and \(\mathfrak b^\star (Y) = 0\), then \(X \cup Y \in \mathrm {dom}(\mathfrak b)\) and \(\mathfrak b(X \cup Y) = \mathfrak b(X)\).

Proof

We have already mentioned that \(\mathfrak b^\star \), as defined in Eq. (1), is an upper density and hence monotone. With this in mind, (i) follows from [8, Proposition 2(vi), Theorem 3, and Corollary 4], where among other things it is established that \(\mathfrak b^\star \) is the pointwise maximum of the set of all upper quasi-densities on \(\mathbf {H}\); (ii) follows from [8, Proposition 15] (which shows that \(\mathfrak b_\star \) is “shift-invariant”) and the monotonicity of \(\mathfrak b^\star \); (iii) and (iv) follow from [8, Corollary 5 and Proposition 7]; and (v) follows from (i) and [8, Proposition 6]. As for (vi), note that, if \(X \in \mathrm{dom}(\mathfrak b)\), \(Y \subseteq \mathbf{H}\), and \(\mathfrak b^\star (Y) = 0\), then we have from (i), (ii), and (F3) that

$$\begin{aligned} \mathfrak b^\star (X) = \mathfrak b_\star (X) \le \mathfrak b_\star (X \cup Y) \le \mathfrak b^\star (X \cup Y) \le \mathfrak b^\star (X) + \mathfrak b^\star (Y) = \mathfrak b^\star (X), \end{aligned}$$

which proves that \(X \cup Y \in \mathrm{dom}(\mathfrak b)\) and \(\mathfrak b(X \cup Y) = \mathfrak b(X)\), as wished. \(\square \)

The next result shows that \(\mathfrak b^\star \) and \(\mathfrak b_\star \) are additive under some circumstances.

Proposition 2.2

Let \(X, Y \subseteq \mathbf{H}\) and \(A, B \in \mathscr {A}\), and assume \(X \subseteq A\), \(Y \subseteq B\), and \(A \cap B = \emptyset \). Then \(\mathfrak b^\star (X \cup Y) = \mathfrak b^\star (X) + \mathfrak b^\star (Y)\) and \(\mathfrak b_\star (X \cup Y) = \mathfrak b_\star (X) + \mathfrak b_\star (Y)\).

Proof

Given \(E,F,G \in \mathscr {A}\) with \( X\subseteq E\), \( Y\subseteq F\), and \( G \subseteq X \cup Y\), it is clear from our assumptions that

$$\begin{aligned} X \subseteq E\cap A \in \mathscr {A}, \quad Y \subseteq F \cap B \in \mathscr {A}, \quad \text {and}\quad (E \cap A) \cap (F \cap B) \subseteq A \cap B = \emptyset , \end{aligned}$$
(4)

and

$$\begin{aligned} \left\{ \begin{array}{l} \mathscr {A} \ni G \cap A \subseteq X \quad \text {and}\quad \mathscr {A} \ni G \cap B \subseteq Y, \\ G = (G \cap A) \cup (G \cap B) \quad \text {and}\quad (G \cap A) \cap (G \cap B) = \emptyset . \end{array} \right. \end{aligned}$$
(5)

On the other hand, we have by parts (iii) and (iv) of Proposition 2.1 that

$$\begin{aligned} \mathsf d^\star (V \cup W) = \mathsf d^\star (V) + \mathsf d^\star (W), \quad \text {for all } V, W \in \mathscr {A} \text { with }V \cap W = \emptyset ; \end{aligned}$$

and it is a basic fact that, for all non-empty subsets S and T of \(\mathbf{R}\),

$$\begin{aligned} \inf S + \inf T = \inf (S + T) \quad \text {and}\quad \sup S + \sup T = \sup (S + T). \end{aligned}$$

So, putting it all together, we conclude from Eqs. (1) and (4) that

$$\begin{aligned} \begin{aligned} \mathfrak {b}^\star (X)+\mathfrak {b}^\star (Y)&= \inf \{\mathsf d^\star (E) + \mathsf d^\star (F): E, F \in \mathscr {A},\, X \subseteq E, \text { and } Y \subseteq F\} \\&\le \inf \{\mathsf d^\star (E \cap A) + \mathsf d^\star (F \cap B): E, F \in \mathscr {A},\, X \subseteq E, \text { and } Y \subseteq F\} \\&\le \inf \{\mathsf d^\star ((E \cup F) \cap (A \cup B)): E, F \in \mathscr {A},\, X \subseteq E, \text { and } Y \subseteq F\} \\&\le \inf \{\mathsf d^\star (G): G \in \mathscr {A} \text { and }X \cup Y \subseteq G\} \\&= \mathfrak b^\star (X \cup Y), \end{aligned} \end{aligned}$$

which, by subadditivity of \(\mathfrak b^\star \), leads to \(\mathfrak {b}^\star (X \cup Y) = \mathfrak {b}^\star (X)+\mathfrak {b}^\star (Y)\). Likewise, Eqs. (3) and (5) yield

$$\begin{aligned} \begin{aligned} \mathfrak b_\star (X \cup Y)&= \sup \{\mathsf d^\star (G): G \in \mathscr {A} \text { and } G \subseteq X \cup Y\} \\&= \sup \{\mathsf d^\star (E \cup F): E, F \in \mathscr {A}, \, E \subseteq X,\text { and }F \subseteq Y\} \\&= \sup \{\mathsf d^\star (E) + \mathsf d^\star (F): E, F \in \mathscr {A}, \, E \subseteq X,\text { and }F \subseteq Y\} \\&= \mathfrak b_\star (X) + \mathfrak b_\star (Y); \end{aligned} \end{aligned}$$

in particular, it is seen from Eq. (5) that, if \(G \in \mathscr {A}\) and \(G \subseteq X \cup Y\), then \(\mathscr {A} \ni G \cap A \subseteq X\) and \(\mathscr {A} \ni G \cap B \subseteq Y\), which is used in the second equality from the last block.

\(\square \)

It is perhaps worth noticing that Proposition 2.2 does not hold with \(\mathfrak b^\star \) replaced by \(\mathsf d^\star \). In fact, set \(X := E \cap (2 \cdot \mathbf{H})\) and \(Y := F \cap (2 \cdot \mathbf{H}+ 1)\), where

$$\begin{aligned} E := \bigcup _{n \ge 1} \llbracket (4n)!, (4n+1)! \rrbracket \quad \text {and}\quad F := \bigcup _{n \ge 1} \llbracket (4n+2)!, (4n+3)! \rrbracket . \end{aligned}$$

Then X and Y are both contained in disjoint arithmetic progressions of \(\mathbf{H}\), but it is not difficult to see that \(\mathsf d^\star (X) = \mathsf d^\star (Y) = \mathsf d^\star (X \cup Y) = \frac{1}{2}\), cf. [8, Lemma 1].

Lemma 2.3

Given \(k, p, q \in \mathbf{N}^+\), \(\mathfrak a \subseteq \llbracket 0, q-1 \rrbracket \), and \(r \in \mathbf{H}\) with \(\gcd (p,q) = 1\), let \(A := q \cdot \mathbf{H}+ \mathfrak a\) and \(B := p \cdot \mathbf{H}+ r\). Then the sets \(k(A \cap B)\) and \(kA \cap kB\) are both in \(\mathscr {A}\) and their symmetric difference is finite; in particular, \(k(A \cap B), kA \cap kB \in \mathrm{dom}(\mathfrak b)\). Moreover, \(\mathfrak b(k(A \cap B)) = \mathfrak b(kA \cap kB) = (pq)^{-1} |k \mathfrak {a}|\).

Proof

We can assume \(\mathfrak a \ne \emptyset \), or else the conclusion is trivial. It is also clear that, if \(X = m \cdot \mathbf{H}+ \mathfrak q\) for some \(m \in \mathbf{N}^+\) and finite \(\mathfrak q \subseteq \mathbf{H}\), then \(kX = m \cdot \mathbf{H}+ k \mathfrak q \in \mathscr {A}\); and it is obvious that \(k(A \cap B) \subseteq kA \cap kB\) (because \(x_1 + \cdots + x_k \in kA \cap kB\) for all \(x_1, \ldots , x_k \in A \cap B\)). Since \(A \cap B \in \mathscr {A}\) and, by Proposition 2.1(iv), \(\mathscr {A} \subseteq \mathrm{dom}(\mathfrak b)\), we are thus left to check that

$$\begin{aligned} \text {(i) } kA \cap kB \subseteq _fin k(A \cap B) \quad \text {and}\quad \text {(ii) } \mathfrak b(kA \cap kB) = (pq)^{-1} | k \mathfrak a|. \end{aligned}$$

(i) Pick \(x \in kA \cap kB\) and, in case \(\mathbf {H}=\mathbf {N}\), assume \(x \ge k(k-1)pq\). Then \(x \equiv kr \bmod p\) and there exist \(a_1, \ldots , a_k \in A\) with \(a_1 \le \cdots \le a_k\) such that \(x = a_1 + \cdots + a_k\) (observe that, if \(\mathbf{H}= \mathbf{N}\), then \(a_k \ge (k-1)pq\)). Since p and q are coprime, we gather from the Chinese remainder theorem that, for each \(i \in \llbracket 1,k-1\rrbracket \), there is a smallest integer \(a_i^\prime \ge a_i\) such that \(a_i' \equiv a_i \bmod q\) and \(a_i' \equiv r \bmod p\) (in particular, \(a_i' \le a_i + pq\)). Accordingly, set \(a_k^\prime := x-\sum _{i=1}^{k-1} a_i^\prime \). By construction, \(a_k' \equiv x - \sum _{i=1}^{k-1} a_i^\prime \equiv a_k \bmod q\) and \(a_k^\prime \equiv kr - (k-1)r \equiv r \bmod {p}\). Moreover, if \(\mathbf {H}=\mathbf {N}\), then

$$\begin{aligned} a_k^\prime = a_k-\sum _{i=1}^{k-1}(a_i^\prime -a_i) \ge (k-1)pq-(k-1)pq \ge 0. \end{aligned}$$

In consequence, we find that \(a_1^\prime , \ldots , a_k^\prime \in A \cap B\) and hence \(x = a_1^\prime +\cdots +a_k^\prime \in k(A \cap B)\). This suffices to complete the proof, because x is an arbitrary element of \((kA \cap kB) \setminus V\), where \(V := \llbracket 0, k(k-1)pq-1 \rrbracket \) if \(\mathbf{H}= \mathbf{N}\) and \(V := \emptyset \) otherwise (to wit, V is a finite set). (ii) We have \(kA = q \cdot \mathbf{H}+ k\mathfrak a\) and hence \(kA \cap kB = (q \cdot \mathbf{H}+ k\mathfrak a) \cap (p \cdot \mathbf{H}+ kr)\). Since \(\gcd (p,q) = 1\), it follows from the Chinese remainder theorem that \(kA \cap kB\) is, apart from finitely many elements, the union of \(|k\mathfrak a|\) pairwise disjoint arithmetic progressions modulo pq. Therefore, we conclude from parts (iv)–(vi) of Proposition 2.1 that \(\mathfrak b(kA \cap kB) = (pq)^{-1}|k \mathfrak a|\), as wished. \(\square \)

Proposition 2.4

Fix \(n,t, p, q \in \mathbf {N}^+\) and \(s \in \mathbf{N}\) such that \(nt<q\) and \(\gcd (p,q) = 1\), let Y be a non-empty subset of \(q \cdot \mathbf{H}+ t\), and define \( X := q \cdot \mathbf {H}+ \llbracket 0, t-1 \rrbracket \), \(V := p \cdot \mathbf{H}+ s\), and \(S := (X \cup Y) \cap V\). Then

$$\begin{aligned} \frac{kt}{pq} + \mathfrak b_\star (k(Y \cap V))&= \mathfrak b_\star (kS) \le \mathfrak b^\star (kS) = \frac{kt}{pq} + \mathfrak b^\star (k(Y \cap V))\nonumber \\&\le \frac{kt+1}{pq}, \quad \text {for every } k \in \llbracket 1, n \rrbracket . \end{aligned}$$
(6)

In particular, if \(Y \in \mathscr {A}\), then

$$\begin{aligned} kS, k(Y \cap V) \in \mathrm{dom}(\mathfrak b) \quad \text {and}\quad \mathfrak b(kS) = \frac{kt}{pq} + \mathfrak b(k (Y \cap V)), \quad \text {for every } k \in \llbracket 1, n \rrbracket . \end{aligned}$$

Proof

The “In particular” part of the statement is straightforward from Eq. (6) and Proposition 2.1(v), by the fact that \(mA \in \mathscr {A}\) for all \(m \in \mathbf{N}^+\) and \(A \in \mathscr {A}\). So, we focus on the rest.

Fix \(k \in \llbracket 1, n \rrbracket \), and define \(X' := X \cap V \in \mathscr {A}\), \(Y' := Y \cap V\), and \(V' := (q \cdot \mathbf{H}+ t) \cap V \in \mathscr {A}\). Since Y is a non-empty subset of \(q \cdot \mathbf{H}+ t\) and p is coprime to q (by hypothesis), we gather from the Chinese remainder theorem that \(pqx + r \in Y' \subseteq V' = pq \cdot \mathbf{H} + r\) for some \(x \in \mathbf{H}\) and \(r \in q \cdot \mathbf{H}+ t\). Using that \(X'\) is itself a finite union of arithmetic progressions modulo pq, it follows that, for all \(i \in \mathbf{N}^+\) and \(j \in \mathbf{N}\),

$$\begin{aligned} iX' + jV' = iX' + jr \subseteq _fin iX' + j(pqx + r) \subseteq iX' + jY' \subseteq iX' + jV' \in \mathscr {A} \end{aligned}$$
(7)

and, on the other hand,

$$\begin{aligned} iX' + jY' \subseteq iX + j(q \cdot \mathbf{H}+ t) = q \cdot \mathbf{H}+ \llbracket 0, it-i \rrbracket + jt = q \cdot \mathbf{H}+ \llbracket jt, (i+j)t-i \rrbracket ; \end{aligned}$$
(8)

in particular, the relation \(iX' + jr \subseteq _fin iX' + j(pqx + r)\) becomes an equality when \(\mathbf{H}= \mathbf{Z}\). Hence,

$$\begin{aligned} kY' \subseteq kV' \subseteq q \cdot \mathbf{H}+ kt \in \mathscr {A} \end{aligned}$$
(9)

and

$$\begin{aligned} Z_k := \bigcup _{i=1}^{k} (iX'+(k-i)Y') \subseteq \bigcup _{i=1}^k (iX'+(k-i)V') =: Z_k' \in \mathscr {A}. \end{aligned}$$
(10)

So taking into account that

$$\begin{aligned} kS = \bigcup _{i=0}^k (iX' + (k-i)Y') = Z_k \cup kY' \end{aligned}$$

and considering that \((k - i)t \le kt - (i + 1) + 1 \le nt < q\) for all \(i \in \mathbf{N}\) (by hypothesis) and, by Eq. (8),

$$\begin{aligned} Z_k' \subseteq \bigcup _{i=1}^{k} (q \cdot \mathbf{H}+ \llbracket (k-i)t, kt - i \rrbracket ) = q \cdot \mathbf{H}+ \llbracket 0, kt - 1 \rrbracket , \end{aligned}$$

we gather from Propositions 2.1(ii) and 2.2 and Eq. (9) that

$$\begin{aligned} \mathfrak b_\star (Z_k) + \mathfrak b_\star (kY')&= \mathfrak b_\star (kS) \le \mathfrak b^\star (kS) = \mathfrak b^\star (Z_k) + \mathfrak b^\star (kY') \le \mathfrak b^\star (Z_k) + \mathfrak b^\star (kV')\\&= \mathfrak b^\star (Z_k) + \frac{1}{pq}. \end{aligned}$$

It remains to see that \(\mathfrak b_\star (Z_k) = \mathfrak b^\star (Z_k) = (pq)^{-1} kt\). For, set

$$\begin{aligned} S' := X' \cup V' = (X \cup (q \cdot \mathbf{H}+ t)) \cap V = (q \cdot \mathbf{H}+ \llbracket 0, t \rrbracket ) \cap V. \end{aligned}$$
(11)

We have

$$\begin{aligned} kS' = \bigcup _{i=0}^k (iX' + (k-i)V') = Z_k' \cup kV' \in \mathscr {A}. \end{aligned}$$

Recalling that each of \(kS'\), \(Z_k'\), and \(kV'\) is a finite union of arithmetic progressions (and hence, by Proposition 2.1(iv), a set in the domain of \(\mathfrak b\)) with \(kV' \subseteq q \cdot \mathbf{H}+ kt\) (see Eq. (9)) and \(kt < q\), it thus follows from Eq. (11), Lemma 2.3, and Propositions 2.1(v) and 2.2 that

$$\begin{aligned} \frac{kt+1}{pq} = \mathfrak b(kS') = \mathfrak b(Z_k') + \mathfrak b(kV') = \mathfrak b(Z_k') + \frac{1}{pq}. \end{aligned}$$

Moreover, we have from Eqs. (7) and (10) that \(Z_k' \subseteq _fin Z_k \subseteq Z_k'\). Therefore, we conclude from the last display and Proposition 2.1(vi) that \(Z_k \in \mathrm{dom}(\mathfrak b)\) and \(\mathfrak b(Z_k) = \mathfrak b(Z_k') = (pq)^{-1} kt\) (as wished). \(\square \)

2.4 A positional representation

We introduce a non-standard positional representation of real numbers (Proposition 2.6) that will be of key importance in the proof of Theorem 3.1; cf. [11, Theorem 1.6] for an “analogous” result attributed by I. Niven to G. Cantor.

Lemma 2.5

Let \(\alpha \) be an irrational number in the interval [0, 1], and fix \(m,t\in \mathbf {N}^+\). There then exist infinitely many \(n \in \mathbf {N}^+\) such that \(\lfloor (nt+1)\alpha \rfloor \in m \cdot \mathbf{N}^+\).

Proof

Since \(t\alpha \) is irrational, the sequence \((\mathrm {frac}(Nt\alpha ))_{N\ge 0}\) is equidistributed in [0, 1[ . This implies that there exists a set \(\mathcal {N}\subseteq \mathbf {N}^+\) such that \(\mathsf {d}(\mathcal {N})=(1-\alpha )/m\) and \(\mathrm {frac}(Nt\alpha ) \in \left]0,(1-\alpha )/m\right[\) for all \(N \in \mathcal {N}\), see e.g. [5, Exercise 1.15, p. 6]. Since

$$\begin{aligned} \mathrm {frac}((Ntm+1)\alpha )=m\mathrm {frac}(Nt\alpha )+\alpha \in {]0,1[}\,, \end{aligned}$$

it follows that \(\lfloor (Ntm+1)\alpha \rfloor =m\lfloor Nt\alpha \rfloor \in m \cdot \mathbf{N}^+\) for all \(N \in \mathcal {N}\). \(\square \)

Proposition 2.6

Let \(\alpha \) be an irrational number in the interval [0, 1], and fix \(n \in \mathbf{N}^+\). There then exist sequences \((\beta _i)_{i \ge 1}\) and \((q_i)_{i \ge 0}\) of positive integers with \(q_0 = 1\) and \(q_i \ge 2\) for \(i \ne 1\) such that

$$\begin{aligned} \alpha = \sum _{i \ge 1} \frac{n!\,\beta _i}{q_1 \cdots q_i} \end{aligned}$$
(12)

and, for every \(i \in \mathbf{N}^+\),

$$\begin{aligned} \gcd (q_i,n q_0 \ldots q_{i-1}) = 1, \quad \alpha _{i-1} \in {]0,1[}\,, \quad \text {and}\quad \lfloor q_i \alpha _{i-1} \rfloor \in n! \cdot \mathbf{N}^+, \end{aligned}$$

where we have defined

$$\begin{aligned} \alpha _0 :\,= \alpha \quad \text {and}\quad \alpha _i := q_1 \ldots q_{i} \left( \alpha - \sum _{j=1}^i \frac{n!\,\beta _j}{q_1 \ldots q_j}\right) . \end{aligned}$$
(13)

Proof

Given \(x \in [0,1]\) and \(N \in \mathbf{N}^+\), let

$$\begin{aligned} \mathcal {Q}(x,N) := \left\{ q \in \mathbf {N}^+ :\mathrm {gcd}(q,N)=1 \text { and }\lfloor qx \rfloor \in n! \cdot \mathbf{N}^+\right\} ; \end{aligned}$$

it follows by Lemma 2.5 that, if x is irrational, then the set \(\mathcal {Q}(x,N)\) is infinite. Thus, since \(\alpha _0, \alpha _1, \ldots \) are all irrational numbers by their definition in Eq. (13) and the irrationality of \(\alpha \), we can recursively define sequences \((q_i)_{i\ge 0}\) and \((\beta _i)_{i\ge 1}\) of positive integers by taking \(q_0 := 1\) and, for each \(i \in \mathbf{N}^+\),

$$\begin{aligned} q_i := \min \mathcal {Q}(\alpha _{i-1},nq_0\ldots q_{i-1}) \quad \text {and}\quad \beta _i:=\left\lfloor \frac{q_i \alpha _{i-1}}{n!}\right\rfloor ; \end{aligned}$$
(14)

in particular, \(\beta _i\) is a positive integer because \(\lfloor q_i \alpha _{i-1} \rfloor = n!\, k_i\) for some \(k_i \in \mathbf{N}^+\) (by definition of the set \(\mathcal {Q}(\alpha _{i-1},nq_0\ldots q_{i-1})\)), so that \(k_i \le q_i \alpha _{i-1}/n! < k_i + 1/n!\) and hence \(\beta _i = k_i\). It is clear that

$$\begin{aligned} q_i \alpha _{i-1}-1< n!\, \beta _i < q_i \alpha _{i-1}, \quad \text {for every } i \in \mathbf{N}^+. \end{aligned}$$
(15)

On the other hand, \(\alpha _0 =\alpha \in {]0,1[}\) ; and if \(\alpha _{i-1} \in {]0,1[}\) for some \(i \in \mathbf {N}^+\), then it follows by Eqs. (13) and (15) that \(\alpha _{i} =q_{i}\alpha _{i-1}-n!\,\beta _{i} \in {]0,1[}\,\). Thus, we see by induction that

$$\begin{aligned} \alpha _i \in {]0,1[}\,, \quad \text {for all }i \in \mathbf {N}. \end{aligned}$$

We may note, thanks to Eq. (14), that \(q_i> q_i \alpha _{i-1} > n! \ge 1\), hence \(q_i\ge 2\) for all \(i \in \mathbf {N}^+\). To conclude, identity (12) follows from the fact that

$$\begin{aligned} \left| \,\alpha - \sum _{j=1}^i \frac{n!\,\beta _j}{q_1 \ldots q_j}\,\right| =\frac{\alpha _i}{q_1\ldots q_i} < \frac{1}{2^i}, \quad \text {for all }i \in \mathbf{N}^+. \end{aligned}$$

\(\square \)

3 Main results

This section is devoted to the main results of the paper. We start with a generalization of Theorem 1.1. Recall from Sect. 2.1 that \(\mathscr {A}_\infty \) denotes the family of all subsets of \(\mathbf{H}\) that can be expressed as the union of a finite set and countably many arithmetic progressions of \(\mathbf{H}\).

Theorem 3.1

Given \(n \in \mathbf{N}^+\) and \(\alpha \in [0,1]\), there exists \(A \in \mathscr {A}_\infty \) such that \(kA \in \mathrm {dom}(\mu )\) and \(\mu (kA)=k\alpha /n\) for each \(k \in \llbracket 1, n \rrbracket \) and every quasi-density \(\mu \) on \(\mathbf{H}\).

Proof

Thanks to Proposition 2.1(iii), it will be enough to prove that there exists \(A \in \mathscr {A}_\infty \) such that \(kA \in \text {dom}(\mathfrak b)\) and \(\mathfrak b(kA) = \alpha k/n\) for each \(k \in \llbracket 1, n \rrbracket \). To this end, we distinguish two cases.

Case 1: \(\alpha \) is rational. Write \(\alpha = a/b\), where \(a \in \mathbf{N}\) and \(b \in \mathbf{N}^+\). Then set

$$\begin{aligned} A := \{0\} \cup (nb \cdot \mathbf{H}+ \llbracket 1, a \rrbracket ) \in \mathscr {A}_\infty . \end{aligned}$$

Since \(0 \le a \le b\), it is immediate (by induction) that

$$\begin{aligned} kA = \{0\} \cup (nb \cdot \mathbf{H}+ \llbracket 1, ka \rrbracket ), \quad \text {for every }k \in \llbracket 1, n \rrbracket . \end{aligned}$$

So, by Proposition 2.1(iii)–(vi), we find that

$$\begin{aligned} kA \in \text {dom}(\mathfrak b) \quad \text {and}\quad \mathfrak b(kA) = \frac{ka}{nb} = \frac{\alpha k}{n}, \quad \text {for every } k \in \llbracket 1, n \rrbracket . \end{aligned}$$

Case 2: \(\alpha \) is irrational. By Proposition 2.6, there exist sequences \((\beta _i)_{i\ge 1}\) and \((q_i)_{i\ge 0}\) of positive integers with \(q_0 = 1\) and \(q_i \ge 2\) for \(i \ne 0\) such that \(\gcd (q_i,n q_0 \ldots q_{i-1}) = 1\) for every \(i \in \mathbf{N}^+\) and

$$\begin{aligned} \alpha = \sum _{i \ge 1} \frac{n!\,\beta _i}{q_1 \ldots q_i}. \end{aligned}$$
(16)

Accordingly, we can recursively define sequences \((X_i)_{i\ge 1}\) and \((Y_i)_{i\ge 0}\) of subsets of \(\mathbf {H}\) by taking \(Y_0 := \mathbf {H}\) and, for each \(i \in \mathbf {N}^+\),

$$\begin{aligned} X_{i}:=Y_{i-1} \cap (q_{i}\cdot \mathbf {H}+ \llbracket 0, (n-1)!\,\beta _i-1 \rrbracket ) \quad \text { and }\quad Y_{i}:=Y_{i-1} \cap (q_{i}\cdot \mathbf {H}+(n-1)!\,\beta _i). \end{aligned}$$
(17)

Because \(q_1, q_2, \ldots \) are pairwise coprime integers, it is immediate from Eq. (17) and the Chinese remainder theorem that, for every \(i \in \mathbf{N}^+\), there exists \(r_i \in \mathbf{N}\) such that

$$\begin{aligned} Y_i = \bigcap _{j=1}^i (q_j \cdot \mathbf{H}+ (n-1)! \beta _j) = q_1 \ldots q_i \cdot \mathbf{H}+ r_i. \end{aligned}$$
(18)

Consequently, we obtain from Proposition 2.1(iv) that

$$\begin{aligned} kY_i \in \text {dom}(\mathfrak b) \quad \text {and}\quad \mathfrak {b}(kY_i)=\frac{1}{q_0\ldots q_{i}}\le \frac{1}{2^i}, \quad \text {for all }i, k \in \mathbf{N}^+. \end{aligned}$$
(19)

Note that the sets \(X_1, X_2, \ldots \) are pairwise disjoint; moreover,

$$\begin{aligned} X_i, Y_i \in \mathscr {A} \setminus \{\emptyset \} \quad \text {and}\quad X_{i} \cup Y_{i} \subseteq Y_{i-1}, \quad \text {for every } i \in \mathbf{N}^+. \end{aligned}$$
(20)

Then, for each \(i \in \mathbf {N}^+\), define \(A_i := X_1 \cup \ldots \cup X_i\) and \(B_i := A_i \cup Y_i\). We set

$$\begin{aligned} A:=\bigcup _{i\ge 1} A_i = \bigcup _{i \ge 1} X_i. \end{aligned}$$

It is obvious from Eq. (20) and our definitions that \(A \in \mathscr {A}_\infty \). So, to finish the proof, it only remains to show that \(kA \in \text {dom}(\mathfrak b)\) and \({\mathfrak {b}}(kA)=k\alpha /n\) for all \(k \in \llbracket 1,n\rrbracket \).

For, fix \(k \in \llbracket 1, n \rrbracket \) and \(i \in \mathbf{N}^+\). Since \(\mathfrak {b}\) is monotone, it is clear from Eqs. (19) and (20) that

$$\begin{aligned} \mathfrak {b}(kX_i) \le \mathfrak {b}(k(X_i\cup Y_i)) \le \frac{1}{2^{i-1}}. \end{aligned}$$
(21)

On the other hand, it follows from Eq. (20) and the above that

$$\begin{aligned} A_i \subseteq A \subseteq B_i \quad \text {and}\quad A_i, B_i \in \mathscr {A} \setminus \{\emptyset \}, \end{aligned}$$

which in turn implies that

$$\begin{aligned} kA_i \subseteq kA \subseteq kB_i, \quad kA_i, kB_i \in \text {dom}(\mathfrak b), \quad \text {and}\quad \mathfrak {b}(kA_i) \le \mathfrak {b}_\star (kA) \le \mathfrak {b}^\star (kA) \le \mathfrak {b}(kB_i). \end{aligned}$$
(22)

We claim that

$$\begin{aligned} \mathfrak {b}(kA_i)=\frac{k}{n}\sum _{j=1}^{i-1}\frac{n!\,\beta _j}{q_1\ldots q_j}+\mathfrak {b}(kX_{i}). \end{aligned}$$
(23)

For, let \(j \in \llbracket 0, i-1 \rrbracket \) and define \(Z_{i,j} := A_i \setminus A_j = X_{j+1} \cup \ldots \cup X_i\). We have from Eqs. (17) and (18) that \(X_{j+1} \subseteq Y_j\) and \(Z_{i,j+1} \subseteq Z_{i,j} \subseteq Y_j\). In consequence, we see that

$$\begin{aligned} Z_{i,j} = X_{j+1} \cup Z_{i,j+1} = (X_{j+1} \cap Y_j) \cup (Z_{i,j+1} \cap Y_j) = (X_{j+1} \cup Z_{i,j+1}) \cap Y_j. \end{aligned}$$

Since each of \(X_{j+1}\), \(Z_{i,j+1}\), and \(Y_j\) is a non-empty element of \(\mathscr {A}\), it thus follows from Proposition 2.4 (applied with \(q = q_{j+1}\), \(t = (n-1)!\,\beta _{j+1}\), \(p = q_1\ldots q_j\), \(X = X_{j+1}\), \(Y = Z_{i,j+1}\), and \(V = Y_j\)) that

$$\begin{aligned} \mathfrak {b}(kZ_{i,j}) = \frac{k}{n}\cdot \frac{n!\,\beta _{j+1}}{q_1\ldots q_{j+1}}+\mathfrak {b}(kZ_{i,j+1}). \end{aligned}$$

(Note that \(Z_{i,j+1} \cap Y_j = Z_{i,j+1}\).) So considering that \(A_i=Z_{i,0}\), we obtain by induction that

$$\begin{aligned} \mathfrak {b}(kA_i)=\frac{k}{n}\cdot \frac{n! \beta _1}{q_1}+\mathfrak {b}(kZ_{i,1})=\ldots =\frac{k}{n}\sum _{j=1}^{i-1}\frac{n!\,\beta _j}{q_1\ldots q_j}+\mathfrak {b}(kZ_{i,i-1}). \end{aligned}$$

This suffices to prove the claim (because \(X_i = Z_{i,i-1}\)), and in a similar way we find that

$$\begin{aligned} \mathfrak {b}(kB_i)=\frac{k}{n}\sum _{j=1}^{i-1}\frac{n!\,\beta _j}{q_1\ldots q_j}+\mathfrak {b}(k(X_{i}\cup Y_i)). \end{aligned}$$
(24)

The proof is essentially the same as the proof of Eq. (23), with the sets \(A_i \setminus A_j\) replaced by \(B_i \setminus A_j\) (\(0 \le j < i\)); we omit further details. Therefore, we gather from Eqs. (16), (21), (23), and (24) that

$$\begin{aligned} \max \left\{ \left| \,\mathfrak {b}(kA_i)-\frac{k\alpha }{n}\,\right| , \left| \,\mathfrak {b}(kB_i)-\frac{k\alpha }{n}\,\right| \right\} \le \sum _{j\ge i}\frac{n!\,\beta _j}{q_1\ldots q_j} +\frac{1}{2^{i-1}}. \end{aligned}$$

Consequently, we see that

$$\begin{aligned} \lim _{i\rightarrow \infty }\mathfrak {b}(kA_i) = \lim _{i\rightarrow \infty }\mathfrak {b}(kB_i)=\frac{k\alpha }{n}, \end{aligned}$$

and we conclude, by Eq. (22), that \(kA \in \mathrm {dom}(\mathfrak {b})\) and \(\mathfrak {b}(kA)=k\alpha /n\) (as wished). \(\square \)

Theorem 3.2

Given \(\alpha \in [0,1]\) and a non-empty finite set \(B\subseteq \mathbf {H}\), there exists \(A \in \mathscr {A}_\infty \) such that \(A+B \in \mathrm {dom}(\mu )\) and \(\mu (A+B) = \alpha \) for every quasi-density \(\mu \) on \(\mathbf{H}\).

Proof

Similarly as in the proof of Theorem 3.1, it suffices to prove that there exists \(A \in \mathscr {A}_\infty \) such that \(A+B \in \mathrm {dom}(\mathfrak b)\) and \(\mathfrak b(A+B) = \alpha \). To this end, set \(x:=\min B\) and \(y:=\max B\).

We may assume without loss of generality that \(x = 0\), because \( A+B = (A+x)+(B-x)\) and both \(A+x\) and \(B-x\) are subsets of \(\mathbf{H}\), with \(|B-x| = |B|\). Therefore, B is a subset of \(\mathbf{N}\); and we can suppose that \(y \ne 0\), or else the conclusion follows by Theorem 3.1.

Now, the statement to be proved is trivial for \(\alpha = 0\) or \(\alpha = 1\) (just take \(A := \emptyset \) in the former case and \(A := \mathbf{H}\) in the latter). Consequently, let \(\alpha \in {]0,1[}\) and pick \(h,k \in \mathbf {N}^+\) such that

$$\begin{aligned} \frac{h}{k}<\alpha <\frac{h+1}{k} \quad \text {and}\quad h\ge 2y+1. \end{aligned}$$

Then \(k\alpha -h \in {]0,1[}\) and \(h-y-1\ge y\), and we derive from Theorem 3.1 that there exists a set \(C\in \mathscr {A}_\infty \cap \mathrm {dom}(\mathfrak {b})\) such that \(\mathfrak {b}(C) = k\alpha - h\). So, we define

$$\begin{aligned} A:=(k\cdot \mathbf {H}+\llbracket 0,h-y-1\rrbracket ) \cup (k\cdot C+h-y). \end{aligned}$$

Then it is straightforward that

$$\begin{aligned} A \in \mathscr {A}_\infty \quad \text {and}\quad A+B=(k\cdot \mathbf {H}+\llbracket 0,h-1\rrbracket ) \cup (k\cdot C+h), \end{aligned}$$

and it follows by Propositions 2.1(iv) and 2.2 that

$$\begin{aligned} \mathfrak {b}^\star (A+B)=\mathfrak {b}^\star (k\cdot \mathbf {H}+\llbracket 0,h-1\rrbracket )+\mathfrak {b}^\star (k\cdot C+h)=\frac{h+\mathfrak {b}(C)}{k}=\alpha . \end{aligned}$$

Likewise, we calculate that \(\mathfrak {b}_\star (A+B) = \alpha \). Thus, \(A+B \in \text {dom}(\mathfrak b)\) and \(\mathfrak b(A+B) = \alpha \). \(\square \)

Theorem 3.3

Given \(\alpha \in [0,1]\), there exists a set \(A \subseteq \mathbf{H}\) with \(0 \in A\) and \(\gcd (A) = 1\) such that \(2A = \mathbf{H}\), \(A \in \mathrm {dom}(\mu )\), and \(\mu (A) = \alpha \) for every quasi-density \(\mu \) on \(\mathbf{H}\).

Proof

Once again, it suffices to prove that there exists \(A \in \mathrm {dom}(\mathfrak b)\) such that \(\mathfrak b(A) = \alpha \), cf. the proofs of Theorems 3.1 and 3.2. To this end, set

$$\begin{aligned} Q:=\{x^2+y^2: x,y \in \mathbf {N}\} \quad \text {and}\quad X := (Q \cup (-Q)) \cap \mathbf {H}. \end{aligned}$$

We know from Lagrange’s four square theorem that \(2Q=\mathbf {N}\), and from [6, Theorem 4.2] that \(\mathfrak {b}(Q)=0\). It follows that \(2X = \mathbf{H}\). Moreover, it is clear from the definition of \(\mathfrak b^\star \) that

$$\begin{aligned} \mathfrak b^\star ((-Q) \cap \mathbf{H}) = \mathfrak b^\star (Q \cap (-\mathbf{H})) \le \mathfrak b^\star (Q) = 0. \end{aligned}$$

Therefore, we find that

$$\begin{aligned} X \in \mathrm {dom}(\mathfrak b) \quad \text {and}\quad \mathfrak {b}(X) = 0. \end{aligned}$$

On the other hand, Theorem 3.1 guarantees that \({\mathfrak {b}}(Y)=\alpha \) for some \(Y \in \mathrm {dom}(\mathfrak b)\). So, letting \(A:=X \cup Y\) and putting all pieces together, we get from Proposition 2.1(vi) that

$$\begin{aligned} 2A=\mathbf {H}, \quad A \in \mathrm {dom}(\mathfrak b), \quad \text {and}\quad \mathfrak b(A) = \alpha . \end{aligned}$$

This finishes the proof, when considering that \(0 \in Q \subseteq A\) and \(1 \le \gcd (A) \le \gcd (Q) = 1\). \(\square \)

4 Closing remarks

Looking at the statement of Theorem 3.1, it is natural to ask whether assuming \(A \in \mathrm {dom}(\mu )\), for some fixed quasi-density \(\mu \) on \(\mathbf{H}\), is sufficient to guarantee that \(2A \in \mathrm {dom}(\mu )\).

By [4, Proposition 2.2], the answer is negative for the asymptotic density \(\mathsf {d}\) on \(\mathbf{N}\). But it follows by [8, Remark 3] that, in the classical framework of Zermelo-Fraenkel set theory with the axiom of choice, there is a density \(\mu \) on \(\mathbf {H}\) such that \(\mathrm {dom}(\mu )=\mathbf {H}\); hence, in this case, the answer is positive.

One can still wonder what happens with the Buck density \(\mathfrak b\), especially in light of the role played by \(\mathfrak b\) in the proofs of Sect. 3. Again, the answer turns out to be in the negative. In fact, set

$$\begin{aligned} V:=\{n! + n: n \in \mathbf {N}\} \quad \text {and}\quad A:=\{x^2+y^2: x,y \in V\}. \end{aligned}$$

Since \(\mathfrak {b}^\star \) is monotone, we gather from [6, Theorem 4.2], similarly as in the proof of Theorem 3.3, that \(A \in \text {dom}(\mathfrak b)\) and \(\mathfrak {b}(A)=0\). However, we will show that \(2A\notin \mathrm {dom}(\mathfrak {b})\). To begin, we have

$$\begin{aligned} 2A=\left\{ x_1^2+x_2^2 + x_3^2 +x_4^2: x_1,x_2, x_3, x_4 \in V\right\} . \end{aligned}$$

Fix \(k \in \mathbf {N}^+\) and \(h \in \mathbf {N}\). By Lagrange’s four square theorem, there exist \(y_1, y_2, y_3, y_4 \in \mathbf {N}\) such that \(h = y_1^2+y_2^2+y_3^2+y_4^2\). Set, for each \(i \in \llbracket 1, 4 \rrbracket \), \(n_i := (h+1)k + y_i\) and \(x_i := n_i! + n_i\), and note that \(x_i \in V\), \(x_i \ge h\), and \(n_i \ge k\). It is then easily checked that

$$\begin{aligned} \sum _{i=1}^4 x_i^2 \equiv \sum _{i=1}^4 (n_i! \, (n_i! + 2n_i) + n_i^2) \equiv \sum _{i=1}^4 n_i^2 \equiv \sum _{i=1}^4 y_i^2 \equiv h\bmod {k}. \end{aligned}$$

Therefore \((k\cdot \mathbf {H}+h) \cap 2A\) is non-empty and, since k and h were arbitrary, we conclude that the only arithmetic progression of \(\mathbf{H}\) containing 2A is \(\mathbf{H}\) itself, with the result that \(\mathfrak {b}^\star (2A)=1\).

Now suppose for a contradiction that \(\mathfrak {b}_\star (2A)\ne 0\). By Eq. (3), this is only possible if 2A contains an arithmetic progression of \(\mathbf {H}\), implying that there is a constant \(C \in \mathbf{R}^+\) such that \(|2A \cap [1,m]| \ge Cm\) for all large m. The latter is, however, a contradiction, because it is clear that

$$\begin{aligned}&|2A \cap \llbracket 1,m \rrbracket | \le |V \cap \llbracket 1,\sqrt{m} \,\rrbracket |^4\\&\quad \le \sup \{n^4: n \in \mathbf{N}\text { and } n! \le \sqrt{m}\}=o(m), \quad \text {as } m \rightarrow \infty . \end{aligned}$$

It follows that \(\mathfrak {b}_\star (2A)=0 \ne \mathfrak b^\star (2A)\), and hence \(2A\notin \mathrm {dom}(\mathfrak {b})\).