1 Introduction

Let \({\mathbb {N}}\) be the set of nonnegative integers. A numerical semigroup S is a subset of \({\mathbb {N}}\) containing zero which is closed under addition of natural numbers and such that \({\mathbb {N}} {\setminus } S\) is finite. The cardinality of \({\mathbb {N}} {\setminus } S\) is called the genus of S, denoted \({\text {g}}(S)\).

Numerical semigroups have a unique finite minimal system of generators, that is, given a numerical semigroup S there exists a unique set \(\{a_1, \ldots , a_e\} \subset {\mathbb {N}}\) such that

$$\begin{aligned} S = {\mathbb {N}} a_1 + \cdots + {\mathbb {N}} a_e \end{aligned}$$

and no proper subset of \(\{a_1, \ldots , a_e\}\) generates S (see [10, Theorem 2.7]). In this case, the set \(\{a_1, \ldots , a_e\}\) is the minimal system of generators of S, its cardinality is called the embedding dimension of S, denoted \({\text {e}}(S)\), and \(\min \{a_1, \ldots , a_e\}\) is called the multiplicity of S, denoted \({\text {m}}(S)\). Notice that the finiteness of the genus implies that \(\gcd (a_1, \ldots , a_e) = 1\). In fact, one has that the necessary and sufficient condition for a subset \({\mathcal {A}}\) of \({\mathbb {N}}\) to generate a numerical semigroup is \(\gcd ({\mathcal {A}}) = 1\) (see, e.g., [10, Lemma 2.1]).

Let S be a numerical semigroup. Since \({\mathbb {N}} {\setminus } S\) is finite, there exists the greatest integer not in S which is called the Frobenius number of S, denoted \({\text {F}}(S)\). The so-called Frobenius problem deals with finding a closed formula for \({\text {F}}(S)\) in terms of the minimal systems of generators of S, if possible (see, e.g., [9]).

Let b be a positive integer greater than 1. Set \(a_1 = \sum _{j=0}^{n-1} b^j\) and consider the sequence \((a_i)_{i \ge 1}\) defined by the recurrence relation

$$\begin{aligned}a_i - a_{i-1} = a\, b^{i-2},\ \text {for every}\ i \ge 2, \end{aligned}$$

where a and n are positive integers. In this paper, we study the numerical semigroups, \(S_a(b,n)\), generated by \(\{a_1, a_2, \ldots \},\) provided that \(\gcd (a_1, a) = 1\). This last condition is necessary and sufficient for \(S_a(b,n)\) to be a numerical semigroup (see Proposition 4). In this case, we say that \(S_a(b,n)\) is a generalized repunit numerical semigroup as it generalizes the repunit numerical semigroups studied in [11] (see Example 7).

Clearly, the generalized repunit numerical semigroup \(S_a(b,n)\) has multiplicity \(a_1\). Moreover, by Theorem 6, we have that \(S_a(b,n)\) is minimally generated by \(\{a_1, \ldots , a_n\}\); in particular, the embedding dimension of \(S_a(b,n)\) is n.

The main results in this paper are Theorem 22, which provides the following formula for the Frobenius number of \(S_a(b,n)\):

$$\begin{aligned} {\text {F}}(S_a(b,n)) = \left\{ \begin{array}{ccc} (n-1)\,\left( b^n-1-a\right) +a\, \left( \sum _{j=0}^{n-1} b^j\right) &{} \text {if} &{} a < b^n-1; \\ b^n-1-a + a\, \left( \sum _{j=0}^{n-1} b^j\right) &{} \text {if} &{} a > b^n-1, \end{array}\right. \end{aligned}$$

and Corollary 26, which gives the following formula for the genus of \(S_a(b,n)\):

$$\begin{aligned} {\text {g}}(S_a(b,n)) = \frac{(n-1)\, b^n + a\, \left( \sum _{j=1}^{n-1} b^j\right) }{2}. \end{aligned}$$

To achieve these results, we take advantage of Selmer’s formulas, summarized in Proposition 20. These formulas depend on the Apéry sets of \(S_a(b,n)\). We explicitly compute the Apéry set of \(S_a(b,n)\) with respect to \(a_1\) (Theorem 15). This is a result that may seem technical; however, it reflects the internal structure of generalized repunit numerical semigroups. For instance, the Apéry set of \(S_a(b,i)\) can be obtained from the Apéry set of \(S_a(b,i-1)\), for every \(i \ge 3\). This is Corollary 19 whose statement is a stronger version of [8, Theorem 3.3] partially thanks to the fact that generalized repunit numerical semigroups are homogeneous in the sense of [5] (Proposition 17).

The last section of the paper is devoted to the computation of the pseudo-Frobenius numbers of \(S_a(b,n)\). Concretely, using our results in Sect. 3, we explicitly compute the whole set of pseudo-Frobenius numbers of \(S_a(b,n)\) and we obtain that its cardinality is \(n-1\) (Proposition 29). So, we prove that the type of \(S_a(b,n)\) is equal to \(n-1\) which implies that \(S_a(b,n)\) is Wilf (see Sect. 5 for further details).

Generalized repunit numerical semigroups have other interesting properties. Without going further, using Gröbner basis techniques, in [1] it is proved that the toric ideal associated to \(S_a(b,n)\) is determinantal and that the cardinal of any minimal presentation of \(S_a(b,n)\) is \(\left( {\begin{array}{c}n\\ 2\end{array}}\right) \). Moreover, following [7], we proved that, for \(n > 3\), generalized repunit numerical semigroups are uniquely presented, in the sense of [4], if and only if \(a < b-1\).

Finally, we note that our results are also valid for the case \(b = 1\). In this case, \(a_i = n+(i-1)\, a,\ i \ge 1\), is an arithmetic sequence that generates a MED semigroup, provided that \(\gcd (n,a)=1\). These semigroups are widely known (see, e.g., [10, Section 3]); for this reason and for the sake of simplicity, we consider \(b > 1\); so that \(a_1\) is properly a repunit number.

2 Generalized Repunit Numerical Semigroups

Let \(b > 1\) be a positive integer.

Definition 1

A repunit number in base b is an integer whose representation in base b contains only the digit 1.

We write \(r_b(\ell )\) for the repunit number in base b of length \(\ell \), that is,

$$\begin{aligned} r_b(\ell ) = \sum _{j=0}^{\ell -1} b^j = \frac{b^\ell -1}{b-1}. \end{aligned}$$

By convention, we assume \(r_b(0) = 0\).

Example 2

The first six repunit numbers in base 2 are \(1, 3, 7, 15, 31, 63 \ldots \), whereas the first six repunit numbers in base 3, are \(1, 4, 13, 40, 121, 364 \ldots \). Observe that repunit numbers in base 2 are the Mersenne numbers.

Here and in what follows, a and n denote two positive integers.

Notation 3

Set \(a_i := r_b(n) + a\, r_b(i-1),\ i \ge 1\). Observe that \(a_1 = r_b(n)\) and \(a_i - a_{i-1} = a\, b^{i-2},\) for every \(i \ge 2\). We write \(S_a(b,n)\) for the submonoid of \({\mathbb {N}}\) generated by \(a_i,\ i {\ge } 1\).

If \(n=1,\) then \(a_1 = 1\) and therefore \(S_a(b,n) = {\mathbb {N}}\). So, in the following we assume that \(n > 1\).

Proposition 4

\(S_a(b,n)\) is a numerical semigroup if and only if \(\gcd (r_b(n),a) {=} 1\).

Proof

Let \(d = \gcd (r_b(n),a)\). By definition, \(S_a(b,n) \subseteq d\, {\mathbb {N}}\). Now, if \(S_a(b,n)\) is a numerical semigroup, then \({\mathbb {N}} {\setminus } d\, {\mathbb {N}} \subset {\mathbb {N}} {\setminus } S_a(b,n)\) has finitely many elements, and hence \(d = 1\). Conversely, if \(\gcd (r_b(n),a) = 1\), then \(\gcd (a_1, a_2) = \gcd (r_b(n), r_b(n)+a) = \gcd (r_b(n),a) = 1\). So, \(a_1 {\mathbb {N}} + a_2 {\mathbb {N}}\) is a numerical semigroup containing \(S_a(b,n)\). Therefore, \({\mathbb {N}} {\setminus } S_a(b,n) \subseteq {\mathbb {N}} {\setminus } (a_1 {\mathbb {N}} + a_2 {\mathbb {N}})\) has finitely many elements, that is to say, \(S_a(b,n)\) is a numerical semigroup. \(\square \)

Let us prove that if \(\gcd (r_b(n),a) = 1\), then \(\{a_1, \ldots , a_n\}\) is the minimal generating set of \(S_a(b,n)\). We begin with a useful lemma.

Lemma 5

The following equality holds: \(a_{n+i} = a_i + a\, b^{i-1}\, a_1,\) for all \(i \ge 1\).

Proof

It suffices to observe that \(r_b(n+i-1) = r_b(i-1) + b^{i-1}\, r_b(n)\), for all \(i \ge 1\), and, consequently, that \(a_{n+i} = a_1 + a\, r_b(n+i-1) = a_1 + a\, ( r_b(i-1) + b^{i-1} r_b(n)) = a_i + a\, b^{i-1}\, a_1\), for all \(i \ge 1\). \(\square \)

Observe that the previous lemma already implies that \(\{a_1, \ldots , a_n\}\) generates \(S_a(b,n)\). So, it remains to see that \(\{a_1, \ldots , a_n\}\) is minimal for the inclusion. In this case, by [10, Theorem 2.7], \(\{a_1, \ldots , a_n\}\) will be the (unique) minimal system of generators of \(S_a(b,n)\).

Theorem 6

If \(S_a(b,n)\) is a numerical semigroup, then \(\{a_1, \ldots , a_n\}\) is the minimal system of generators of \(S_a(b,n)\). In particular, the embedding dimension of \(S_a(b,n)\) is n.

Proof

By Lemma 5, we have that \(\{a_1, \ldots , a_n\}\) is a system of generators of \(S_b(a,n)\). Now, since \(a_1< \cdots < a_n\), to see the minimality property, it suffices to prove that \(a_i \not \in \langle a_1, \ldots , a_{i-1}\rangle \) for every \(i \in \{2, \ldots , n\}\). By the condition \(\gcd (a_1, a_2) = \gcd (a_1, a) = 1\) this is true for \(i=2\). Also when \(a=1\), we have that \(a_i - a_k = r_b(i-1)-r_b(k-1) = \sum _{j=k-1}^{i-2} b^j < a_1,\) for every \(k \le i\), and consequently, \(a_i \not \in \langle a_1, \ldots , a_{i-1}\rangle \).

So, from now on we assume \(a > 1\) and \(i \in \{3, \ldots , n\}\). If \(a_i \in \langle a_1, \ldots , a_{i-1}\rangle \), then there exist \(u_1, \ldots , u_{i-1} \in {\mathbb {N}}\) such that \(a_i = \sum _{j=1}^{i-1} u_j a_j\). Therefore, \(a_i = a_1 + a\, r_b(i-1)\) is equal \(\big (\sum _{j=1}^{i-1} u_j\big ) a_1 + a\, \sum _{j=1}^{i-1} u_j r_b(j-1)\) and thus

$$\begin{aligned}\left( \sum _{j=1}^{i-1} u_j\right) a_1 \equiv a_1\ (\!\!\!\!\!\mod a ).\end{aligned}$$

Now, since \(S_a(b,n)\) is a numerical semigroup, by Proposition 4, we have \(\gcd (a_1,a) = \gcd (r_b(n),a) = 1\), and we conclude that \(\sum _{j=1}^{i-1} u_j \equiv 1\ (\!\!\! \mod a)\). If \(\sum _{j=1}^{i-1} u_j = 1\), then there exists \(k \in \{1, \ldots , i-1\}\) such that \(u_k = 1\) and \(u_j = 0\) for every \(j \ne k\), that is to say, \(a_i = a_k\) which is not possible because \(k < i\). Thus, there exists a positive integer N such that \(\sum _{j=1}^{i-1} u_j = 1 + N\, a\). Therefore, \(a_i = (1+N\,a)\, a_1 \ge (1+a)\, a_1 = a_{n+1}\), where the last equality follows from Lemma 5. However, this inequality implies \(i \ge n+1\), in contradiction to our assumption. \(\square \)

We emphasize that the hypothesis \(S_a(b,n)\) is a numerical semigroup (equivalently, \(\gcd (a_1, \ldots , a_n)=1\)) cannot be avoided for the minimality property of \(\{a_1, \ldots , a_n\}\); for example, if \(b=2, a=5\) and \(n = 4,\) we have that \(a_1 = 15, a_2 = 20, a_3 = 30\) and \(a_4 = 50\); clearly, \(a_1\) and \(a_2\) suffice to generate \(S_a(b,n)\), in this case.

Here and throughout this section, we suppose \(\gcd (r_b(n),a) = 1\) so that \(S_a(b,n)\) is a numerical semigroup with multiplicity \(a_1\) and, by Theorem 6, of embedding dimension n. We call these semigroups generalized repunit numerical semigroups or grepunit semigroups for short.

Example 7

  1. (i)

    If \(a = 2^n, a_1 = 2^n-1\) and \(b = 2\), then \(S_a(b,n)\) is a Mersenne numerical semigroup (see [12]).

  2. (ii)

    If \(a = b^n\), then \(S_a(b,n)\) is a repunit numerical semigroup (see [11]).

The numerical semigroups in Example 7 are part of the larger family of those numerical semigroups which are closed respect to the action of affine maps. A numerical semigroup S is said to be closed respect to the action of an affine map if there exists \(\alpha \in {\mathbb {N}} {\setminus } \{0\}\) and \(\beta \in {\mathbb {Z}}\) such that \(\alpha s + \beta \in S,\) for every \(s \in S {\setminus } \{0\}\).

Corollary 8

\(S_a(b,n)\) is closed by the action of the affine map \(x \mapsto b\, x + a-(b^n-1)\).

Proof

We first, observe that

$$\begin{aligned} b\, a_j + a-(b^n-1)&= b\, a_j + a - (b-1) r_b(n) \\&= b\, r_b(n) - (b-1)\, r_b(n) + a\, b\, r_b(j-1) + a \\ {}&= r_b(n) + a\, b\, r_b(j-1) + a = r_b(n) + a\, r_b(j) \\ {}&= a_{j+1},\end{aligned}$$

for every \(j \ge 1\).

Now, since \(\{a_1, a_2, \ldots , a_n\}\) generates \(S_a(b,n)\), given \(s \in S {\setminus } \{0\}\), there exist \(u_i \in {\mathbb {N}},\ i = 1, \ldots , n,\) with \(u_j \ne 0\) for some j, such that \(s = \sum _{i=1}^n u_i a_i\). Therefore,

$$\begin{aligned} b\, s + a-(b^n-1)&= \sum _{i=1}^n (u_i b)\, a_i + a-(b^n-1) \\&= \sum _{\begin{array}{c} i=1 \\ i \ne j \end{array}}^{n} (u_i b)\, a_i + (u_j b)\, a_j + a-(b^n-1) \\&= \sum _{\begin{array}{c} i=1 \\ i \ne j \end{array}}^{n} (u_i b)\, a_i + \big ((u_j-1) b\big )\, a_j + b\, a_j + a-(b^n-1) \\ {}&= \sum _{\begin{array}{c} i=1 \\ i \ne j \end{array}}^{n} (u_i b)\, a_i + \big ((u_j-1) b\big )\, a_j + a_{j+1} \in S, \end{aligned}$$

as claimed. \(\square \)

In [13], numerical semigroups which are closed respect to the action of the affine maps \(x \mapsto \alpha x + \beta \), with \(\alpha \in {\mathbb {N}} {\setminus } \{0\}\) and \(\beta \in {\mathbb {N}}\), are studied. Therefore, by Corollary 8, the grepunit semigroup \(S_a(b,n)\) belongs to the family studied in [13] if and only if \(a - (b^n-1) > 0\); equivalently, \(a > b^n-1\).

Remark 9

Grepunit semigroups could be seen also as shifted numerical monoids in the sense of [8]; since, by Theorem 6, \(S_a(b,n)\) is minimally generated by

$$\begin{aligned} \{a_1, a_1 + a\, r_b(1), \ldots , a_1 + a\, r_b(n-1)\}. \end{aligned}$$

Nevertheless, the hypothesis \(r_b(n) = a_1 > a^2\, r_b(n-1)^2\) required in [8] only holds for grepunit semigroups when \(n=2\) and \(a^2 < b+1\). Indeed, \(r_b(n) > a^2\, r_b(n-1)^2\) if and only if

$$\begin{aligned}a^2 < \frac{r_b(n)}{r_b(n-1)^2} = \frac{1+b\, r_b(n-1)}{r_b(n-1)^2} = \frac{1}{r_b(n-1)^2} + \frac{b}{r_b(n-1)}. \end{aligned}$$

Now, as the right hand side is either \(1+b\), if \(n=2\), or less than \((1+2b)/(1+b)^2 < 1\), otherwise, we are done.

To finish this section, we make explicit a set of relations which characterizes \(S_a(b,n)\).

Lemma 10

For each pair of integers \(i \ge 1\) and \(j \ge 1\), it holds that \(b\, a_i + a_{i+j} = b\, a_{i+j-1} + a_{i+1}\).

Proof

Since \(a_{i+j} = a_1 + a\, r_b(i+j-1) = a_1 + a\, (r_b(i-1) + b^{i-1}\, r_b(j)) = a_i + a\, b^{i-1}\, r_b(j)\), for every j, we have that

$$\begin{aligned} b\, a_i + a_{i+j}&= b\, a_i + a_i + a\, b^{i-1}\, r_b(j) \\ {}&= b\, a_i + a_i + a\, b^ {i-1}\, (b\, r_b(j-1)+1) \\ {}&= b\, (a_i + a\, b^{i-1}\, r_b(j-1)) + a_i + a\, b^{i-1} \\ {}&= b\, a_{i+j-1} + (a_1 + a\, r_b(i-1)) + a\, b^{i-1} \\ {}&= b\, a_{i+j-1} + a_{i+1}, \end{aligned}$$

as claimed. \(\square \)

Let us delve into what it is said in Lemma 10. Consider the subgroup \({\mathcal {L}}\) of \({\mathbb {Z}}^n\) generated by the rows of the \((n-1) \times n-\)matrix

$$\begin{aligned} A = \left( \begin{array}{cccccccc} b &{} -(b+1) &{} 1 &{} 0 &{} \ldots &{} 0 &{} 0 &{} 0 \\ 0 &{} b &{} -(b+1) &{} 1 &{} \ldots &{} 0 &{} 0 &{} 0 \\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{} \vdots &{} \vdots \\ 0 &{} 0 &{} 0 &{} 0 &{} \ldots &{} b &{} -(b+1) &{} 1 \\ (a+1) &{} 0 &{} 0 &{} 0 &{} \ldots &{} 0 &{} b &{} -(b+1) \end{array}\right) . \end{aligned}$$

We first observe that, by Lemma 5, all the equalities in Lemma 10 can be written in the form

$$\begin{aligned}{\textbf{v}}\, A \left( \begin{array}{c} a_1 \\ \vdots \\ a_n \end{array}\right) = 0 \end{aligned}$$

for some \({\textbf{v}} \in {\mathbb {Z}}^{n-1}\). Moreover, taking into account that, by Lemma 5 again, \(a_{n+1} = (a+1)\, a_1\), a direct computation shows that the maximal minors of A are equal to \(-a_1, a_2, -a_3, \ldots , (-1)^n a_n.\) So, \({\mathbb {Z}}^n/{\mathcal {L}}\) is a group of rank \(n-1\) which is torsion free if and only if \(\gcd (a_1, \ldots , a_n) =1\); equivalently, \(S_a(b,n)\) is a numerical semigroup by Proposition 4. Thus, in this case, we have that the semigroup homomorphism

$$\begin{aligned} S_a(b,n) \longrightarrow {\mathbb {N}}^n/{\mathcal {L}};\quad s = \sum _{i=1}^n u_i a_i \longmapsto (u_1, \ldots , u_n) + {\mathcal {L}}, \end{aligned}$$

is an isomorphism; that is to say, \(S_a(b,n)\) is the finitely generated commutative monoid corresponding to the congruence \(\sim \) on \({\mathbb {N}}^n\) defined by \({\textbf{u}} \sim {\textbf{v}} \Longleftrightarrow {\textbf{u}} - {\textbf{v}} \in {\mathcal {L}}\).

Now, as a straightforward consequence of the results in [6, Section 7.1] we conclude the following.

Corollary 11

Let \({\mathbb {k}}\) be a field. The semigroup ideal of \({\mathbb {k}}[x_1, \ldots , x_n]\) associated to \(S_a(b,n)\) is equal to the ideal \(I_{\mathcal {L}}\) generated by

$$\begin{aligned} \{x_1^{u_1} \cdots x_n^{u_n} - x_1^{v_1} \cdots x_n^{v_n}\ \mid \ u_i-v_i \in {\mathcal {L}},\ i = 1, \ldots , n\}. \end{aligned}$$
(1)

Observe that accordingly to the definition of \({\mathcal {L}}\) the binomials in \(I_{\mathcal {L}}\) not involving \(x_1\) are homogeneous.

3 Apéry Sets of Grepunit Semigroups

The main aim of this section is to determine the Apéry set of a grepunit semigroup with respect to its multiplicity. Let us start by recalling what Apéry sets of a numerical semigroup are.

Definition 12

Let S be a numerical semigroup. The Apéry set of S with respect to \(s \in S\), denoted \({\text {Ap}}(S,s)\), is defined as

$$\begin{aligned} {\text {Ap}}(S,s) = \{\omega \in S \mid \omega -s \not \in S\}. \end{aligned}$$

For the sake of simplicity, we write \({\text {Ap}}(S)\) for the Apéry set of S with respect to its multiplicity, that is, \({\text {Ap}}(S) = {\text {Ap}}(S,{\text {m}}(S))\).

Let ab and n be three positive integers such that \(b> 1, n > 1\) and \(\gcd (r_b(n), a) = 1\). As mentioned above, the main objective of this section is to compute \({\text {Ap}}(S_a(b,n))\). To this end, we first introduce the sets R(bi).

Definition 13

Let \(i \ge 2\) be an integer and define R(bi) to be the subset of \({\mathbb {N}}^{i-1}\) whose elements \((u_2, \ldots , u_i)\) satisfy

  1. (a)

    \(0 \le u_j \le b,\) for every \(j = 2, \ldots , i\);

  2. (b)

    if \(u_j = b\), then \(u_k = 0\) for every \(k < j\).

Observe that

$$\begin{aligned} R(b,i) = \left( R(b,i-1) \times \{0, \ldots , b-1\} \right) \cup \{(0, \ldots , 0, b)\} \subset {\mathbb {N}}^{i-1}, \end{aligned}$$
(2)

for every \(i \ge 3\).

Lemma 14

The cardinality of R(bi) is equal to \(r_b(i)\), for every \(i \ge 2\).

Proof

We proceed by induction on i. If \(i=2\), then \(R(b,i) = \{0,1,\ldots ,b\}\) and \(r_b(i) = b+1\). Suppose that \(i > 2\) and that the result is true for \(i-1\). By (2), the cardinality of R(bi) is equal to b times the cardinality of \(R(b,i-1)\) plus one. Since, by induction hypothesis, the cardinality of \(R(b,i-1)\) is equal to \(r_b(i-1)\) and \(r_b(i) = b\, r_b(i-1) + 1\), we are done. \(\square \)

Recall that, by Proposition 4, we have that \(S_a(b,n)\) is a grepunit semigroup if and only if \(\gcd (r_b(n), a) = 1\). In this case, \(S_a(b,n)\) is minimally generated by

$$\begin{aligned} a_1:=r_b(n), a_2 := r_b(n) + a\, r_b(1), \ldots , a_n := r_b(n) + a\, r_b(n-1), \end{aligned}$$

by Theorem 6.

Theorem 15

With the above notation, we have that

$$\begin{aligned} {\text {Ap}}(S_a(b,n)) = \left\{ \sum _{i=2}^n u_i a_i \mid (u_2, \ldots , u_n) \in R(b,n)\right\} . \end{aligned}$$

Proof

For the sake of simplicity of notation, we write S for \(S_a(b,n)\).

As \({\text {Ap}}(S) \subset {\mathbb {N}}\), its elements are naturally ordered: \(0 = \omega _1< \ldots < \omega _{a_1}.\) So, we can proceed by induction on the index j of \(\omega _j\). If \(j = 1\), then \(\omega _j = 0\); so, by taking \((0, \ldots , 0) \in R(b,n)\) we are done. Suppose now that \(j > 1\) and that the result is true for every \(j' < j\). Let k be the smallest index such that \(\omega _j-a_k \in S\). Clearly, \((\omega _j - a_k) - a_1 \not \in S\); otherwise \(\omega _j - a_1 = \big ((\omega _j - a_k) - a_1\big ) + a_k \in S\), in contradiction with the fact that \(\omega _j \in {\text {Ap}}(S)\). Therefore \(\omega _j - a_k \in {\text {Ap}}(S)\) and, by induction hypothesis, there exists \((u_2, \ldots , u_n) \in R(b,n)\) such that \(\omega _j - a_k = \sum _{i=2}^n u_i a_i\). Thus,

$$\begin{aligned} \omega _j = \sum _{i=2}^{k-1} u_i a_i + (u_k+1) a_k + \sum _{i=k+1}^{n} u_i a_i = (u_k+1) a_k + \sum _{i=l+1}^{n} u_i a_i, \end{aligned}$$

where the second equality follows from the minimality of k. Let us see that \((0, \ldots , 0, u_k+1, u_{k+1}, \ldots , u_n)\) lies in R(bn). If \(u_k+1 \le b\) and \(u_i < b,\ i \in \{k+1, \ldots , n\}\), we are done. So, we distinguish two cases:

  • If \(u_k+1 > b\), then \(u_k+1=b+1\). In this case, \((u_k + 1) a_k = (b+1)\, a_k = b\, a_k + a_k = b\, a_{k-1}+a_{k+1}\), where the last equality follows from Lemma 10.

  • If \(u_i = b\), for some \(i \in \{k+1, \ldots , n\}\), then \(u_k = 0\) and so \((u_k +1) a_k + u_i a_i = a_k + b a_i = b\, a_{k-1} + a_{i+1}\), where the last equality follows from Lemma 10 again.

In both cases, we obtain that \(\omega _j - a_{k-1} \in S\) which contradicts the minimality of k. Hence, none of these two cases can occur. \(\square \)

In [5], the notion of homogeneous numerical semigroups is introduced. Recall that if S is a numerical semigroup minimally generated by \(\{a_1, \ldots , a_n\}\), then the set of lengths of \(s \in S\) is defined as

$$\begin{aligned} {\textsf{L}}_S(s) := \left\{ \sum _{j=1}^n u_j\ \mid \ s = \sum _{j=1}^n u_j\, a_j,\ u_j \ge 0 \right\} . \end{aligned}$$

Definition 16

A numerical semigroup is said to be homogeneous if \({\textsf{L}}_S(s)\) is a singleton for each \(s \in {\text {Ap}}(S)\).

Proposition 17

The numerical semigroup \(S_a(b,n)\) is homogeneous.

Proof

By [5, Proposition 3.9] and Corollary 11, it suffices to observe that one of the terms of each non-homogeneous element in (1) for the standard grading on \({\mathbb {k}}[x_1,\ldots , x_n]\) is divisible by \(x_1\). \(\square \)

Let us see now that, for \(i \in \{3, \ldots , n\}\), the Apéry set \({\text {Ap}}(S_a(b,i))\) can be constructed from the set \(R(b,i-1)\). But, first we need a further piece of notation.

Recall that, by Proposition 4, we have that \(S_a(b,i)\) is a grepunit semigroup if and only if \(\gcd (r_b(i), a) = 1\). In this case, \(S_a(b,i)\) is minimally generated by

$$\begin{aligned} a^{(i)}_1:=r_b(i), a^{(i)}_2 := a^{(i)}_1 + a\, r_b(1), \ldots , a^{(i)}_i := a^{(i)}_1 + a\, r_b(i-1), \end{aligned}$$

by Theorem 6.

Corollary 18

Let \(i \in \{3, \ldots , n\}\). If \(\gcd (r_b(i),a) = 1\), then \(\omega \in {\text {Ap}}(S_a(b,i))\) if and only if \(\omega = b\, a^{(i)}_i\) or there exist \((u_2, \ldots u_{i-1}) \in R(b,i-1)\) and \(u_i \in \{0, \ldots , b-1\}\) such that

$$\begin{aligned} \omega = \sum _{j=2}^{i-1} u_j a^{(i-1)}_j + b^{i-1} \left( \sum _{j=2}^{i-1} u_j \right) + u_i\, a^{(i)}_i. \end{aligned}$$
(3)

Proof

We observe that \(a^{(i)}_j = a^{(i-1)}_j + r_b(i) - r_b(i-1) = a^{(i-1)}_j + b^{i-1},\ j = 0, \ldots , i-1\). So, (3) becomes

$$\begin{aligned} \omega = \sum _{j=1}^{i-1} u_j a^{(i)}_j + u_i\, a^{(i)}_i \end{aligned}$$

and, taking into account (2), our claim readily follows from Theorem 15. \(\square \)

Notice that, by Theorem 15, an immediate consequence of Corollary 18 is that \({\text {Ap}}(S_a(b,i))\) can be constructed from \({\text {Ap}}(S_a(b,i-1))\) provided that both \(S_a(b,i)\) and \(S_a(b,i-1)\) are numerical semigroups; indeed, the first and second summands in the right hand side of (3) correspond to the elements of \({\text {Ap}}(S_a(b,i-1))\) and their lengths, respectively. Recall that, by Proposition 17, all elements in \({\text {Ap}}(S_a(b,i-1))\) have the same length.

If S is a homogeneous numerical semigroup, we write \({\textsf{m}}_S(s)\) for the length of \(s \in {\text {Ap}}(S)\). The notation \({\textsf{m}}_S(s)\) is usually reserved for the minimal length \(s \in S\); clearly, no ambiguity occurs in our case.

The following result is a straightforward consequence of Corollary 18.

Corollary 19

Let \(i \in \{3, \ldots , n\}\). If \(\gcd (r_b(i),a) = \gcd (r_b(i-1),a) = 1\), then \(\omega \in {\text {Ap}}(S_a(b,i))\) if and only if \(\omega = b\, a^{(i)}_i\) or there exist \(\omega ' \in {\text {Ap}}(S_a(b,i-1))\) and \(u_i \in \{0, \ldots , b-1\}\) such that

$$\begin{aligned} \omega = \omega ' + b^{i-1}\, {\textsf{m}}_{S_a(b,i-1)}(\omega ') + u_i\, a^{(i)}_i. \end{aligned}$$
(4)

Corollary 19 maintains a great similarity with [8, Theorem 3.3]; however, the techniques used are very different and, more importantly, we do not require the hypothesis \(r_b(n) > a^2\, r_b(n-1)^2\) (see Remark 9).

4 The Frobenius Problem

Let ab and n be three positive integers such that \(b{>}1\), \(n{>}1\) and \(\gcd (r_b(n),a) =1\).

In this section, we address the Frobenius problem for \(S_a(b,n)\). More precisely, we will give a formula for \({\text {F}}(S_a(b,n))\) in terms of ab and n. To do this, we take advantage of the following result due to Selmer (see, e.g., [10, Proposition 2.21]).

Proposition 20

Let S be a numerical semigroup and let \(s \in S{\setminus } \{0\}\). Then,

  1. (a)

    \({\text {F}}(S) = \max {\text {Ap}}(S,s) - s\);

  2. (b)

    \({\text {g}}(S) = \frac{1}{s} \left( \sum _{\omega \in \textrm{Ap}(S,s)} \omega \right) - \frac{s-1}{2}\).

Before giving our formula for the Frobenius number, we show an interesting result which will be used below and later in the last section. As in the previous section, we write \({\text {Ap}}(S)\) for \({\text {Ap}}(S,{\text {m}}(S))\).

Lemma 21

If \(\alpha _i := a_i + \sum _{j=i}^n (b-1)\, a_j,\ i = 2, \ldots , n\), then the following holds:

  1. (a)

    \(\alpha _i \in {\text {Ap}}(S_a(b,n))\), for every \(i = 2, \ldots , n\)

  2. (b)

    If \(a < b^n-1,\) then \(\alpha _2> \ldots > \alpha _n\), and if \(a > b^n-1\), then \(\alpha _2< \ldots < \alpha _n\).

  3. (c)

    For each \(\omega \in {\text {Ap}}(S_a(b,n)),\) there exists \(i \in \{2, \ldots , n\}\) such that \(\omega \le \alpha _i\).

Proof

Part (a) is nothing but a particular case of Theorem 15. To prove (b), it suffices to observe that

$$\begin{aligned}\alpha _i - \alpha _{i+1} = b\, a_i - a_{i+1} = b^n-1-a,\ i = 2, \ldots , n-1, \end{aligned}$$

and note that \(b^n-1 \ne a\) because \(\gcd (r_b(n), a) = 1\) by hypothesis. Finally, to prove (c) we can take advantage of Theorem 15 which state that for each \(\omega \in {\text {Ap}}(S_a(b,n))\), there exist \((u_2, \ldots , u_n) \in R(b,n)\) such that \(\omega = \sum _{j=2}^n u_j\, a_j\). Clearly, by the definition of R(bn), if \(u_i\) is the leftmost nonzero entry in \((u_2, \ldots , u_n) \in R(b,n)\), then

$$\begin{aligned}\sum _{j=2}^n u_j\, a_j \le a_i + \sum _{j=i}^n (b-1)\, a_j = \alpha _i\end{aligned}$$

and we are done. \(\square \)

Theorem 22

The Frobenius number of \(S_a(b,n)\) is equal to

  1. (a)

    \((n-1)\,(b^n-1-a)+a\, a_1\), if \(a < b^n-1;\)

  2. (b)

    \(b^n-1-a + a\, a_1\), if \(a > b^n-1\).

Proof

By Lemma 21, we have that \(\max {\text {Ap}}(S_a(b,n))\) is equal to either \( a_2 + \sum _{j=2}^n (b-1)\, a_j\), if \(a < b^n-1\), or \(b\, a_n\), if \(a > b^n-1\). So, we distinguish two cases:

  1. (a)

    If \(a < b^n-1\), then \(\max {\text {Ap}}(S_a(b,n)) = \alpha _2\). So, by Selmer’s formula (Proposition 20), we obtain that

    $$\begin{aligned} {\text {F}}(S_a(b,n))&= \left( a_2 + \sum _{j=2}^n (b-1)\, a_j\right) - a_1 = \displaystyle {\sum _{j=2}^n (b-1)\, a_j} + a \\&= \sum _{j=2}^n (b-1) \left( a_1 + a \sum _{k=0}^{j-2} b^j\right) + a \\&= (n-1)(b-1) a_1 + a \sum _{j=2}^n (b^{j-1}-1) +a \\ {}&= (n-1)(b-1) a_1 + a\, a_1 - (n-1) a \\ {}&= (n-1)\,(b^n -1-a)+a\, a_1 . \end{aligned}$$
  2. (b)

    If \(a > b^n-1\), then \(\max {\text {Ap}}(S_a(b,n)) = \alpha _n\). So, by Selmer’s formula we conclude that

    $$\begin{aligned} {\text {F}}(S_a(b,n))&= b\, a_n - a_1 = b\, (a_1 + a\, r_b(n-1)) - a_1 \\ {}&= (b-1) a_1 + a\, b,\, r_b(n-1) = b^n - 1 + a\, (a_1 -1)\\ {}&= b^n-1-a + a\,a_1. \end{aligned}$$

\(\square \)

Observe that condition \(a > b^n-1\) corresponds to the case considered in [13] (see the comment after Corollary 8).

5 The Genus of Grepunit Semigroups

In this section, we use Selmer’s formulas (Proposition 20) to compute the genus of grepunit semigroups in terms of ab and n.

The following results state some useful properties of the sets R(bi).

Lemma 23

Let \(b > 1\) be an integer. For each \(i \ge 2\), the following holds:

$$\begin{aligned} \sum _{(u_2, \ldots u_i) \in R(b,i)} \left( \sum _{j=2}^i u_j \right) = \sum _{j=2}^i \frac{b^i+b^{i-(j-1)}}{2}. \end{aligned}$$

Proof

We proceed by induction on i. If \(i=2\), then \(R(b,i) = \{0,1,\ldots ,b\}\) and our claim readily follows. Suppose that \(i > 2\) and that the result is true for \(i-1\). Now, since by Lemma 14 the cardinality of \(R(b,i-1)\) is equal to \(r_b(i-1)\), by (2), we have that

$$\begin{aligned}{} & {} \sum _{(u_2, \ldots u_i) \in R(b,i)} \left( \sum _{j=2}^i u_j \right) \nonumber \\{} & {} \quad = \sum _{(u_2, \ldots u_{i-1}) \in R(b,i-1)} b\, \left( \sum _{j=2}^{i-1} u_j \right) + r_b(i-1) \left( \sum _{k=0}^{b-1} k \right) + b. \end{aligned}$$

So, by induction hypothesis, we obtain that

$$\begin{aligned} \sum _{(u_2, \ldots u_i) \in R(b,i)} \left( \sum _{j=2}^i u_j \right)&= b\, \sum _{j=2}^{i-1} \frac{b^{i-1}+b^{(i-1)-(j-1)}}{2} + r_b(i-1) \left( \sum _{k=0}^{b-1} k\right) + b \\ {}&= \sum _{j=2}^{i-1} \frac{b^{i}+b^{i-(j-1)}}{2} + \frac{b^{i-1} - 1}{b-1}\, \frac{b (b-1)}{2} + b \\&= \sum _{j=2}^{i-1} \frac{b^{i}+b^{i-(j-1)}}{2} + \frac{b^i + b}{2} = \sum _{j=2}^i \frac{b^i+b^{i-(j-1)}}{2}, \end{aligned}$$

as claimed. \(\square \)

As in previous sections, let ab and n be three positive integers such that \(b > 1\) and \(n > 1\). Given \(i \in \{2, \ldots , n\}\), we write

$$\begin{aligned} a^{(i)}_1:=r_b(i), a^{(i)}_2 := a^{(i)}_1 + a\, r_b(1), \ldots , a^{(i)}_i := a^{(i)}_1 + a\, r_b(i-1). \end{aligned}$$

Proposition 24

Let \(i \in \{2, \ldots , n\}.\) Then,

$$\begin{aligned} \sum _{(u_2, \ldots u_i) \in R(b,i)} \left( \sum _{j=2}^i u_j a^{(i)}_j \right) = \sum _{j=2}^i \frac{b^i+b^{i-(j-1)}}{2}\, a^{(i)}_j. \end{aligned}$$

Proof

We proceed by induction on i. If \(i = 2\), then \(R(b,i) = \{0, \ldots , b\}\) and

$$\begin{aligned} \sum _{u_2 \in \{0, \ldots , b\}} \left( u_2\, a^{(2)}_2 \right) = \left( \sum _{u_2 \in \{0, \ldots , b\}} u_2 \right) \, a^{(2)}_2 = \frac{b\, (b+1)}{2}\, a_2^{(2)}. \end{aligned}$$

Suppose now \(i > 2\) and that the result is true for \(i-1\). Since \(a_j^{(i)} = a_j^{(i-1)} + b^{i-1},\ j = 1, \ldots , i-1\), by (2), we have that

$$\begin{aligned} \sum _{(u_2, \ldots u_i) \in R(b,i)} \left( \sum _{j=2}^i u_j a^{(i)}_j \right) =&\sum _{(u_2, \ldots , u_{i-1}) \in R(b,i-1)} b \left( \sum _{j=2}^{i-1} u_j a^{(i-1)}_j \right) + \\ {}&+ b^{i-1} \left( \sum _{(u_2, \ldots , u_{i-1}) \in R(b,i-1)} \left( \sum _{j=2}^{i-1} u_j \right) \right) + \\ {}&+ r_b(i-1) \sum _{k=0}^{b-1} k\, a^{(i)}_i + b\, a_i^{(i)}. \end{aligned}$$

By induction hypothesis, the first summand of the right hand side is equal to

$$\begin{aligned} b \left( \sum _{j=2}^{i-1} \frac{b^{i-1} + b^{i-1-(j-1)}}{2}\, a_j^{(i-1)} \right) = \sum _{j=2}^{i-1} \frac{b^{i} + b^{i-(j-1)}}{2}\, a_j^{(i-1)}, \end{aligned}$$

and, by Lemma 23, the second summand of the right hand side is equal to

$$\begin{aligned} b^{i-1}\, \left( \sum _{j=2}^{i-1} \frac{b^i + b^{i-(j-1)}}{2}\right)= & {} \sum _{j=2}^{i-1} \frac{b^i + b^{i-(j-1)}}{2}\, b^{i-1}\\ {}= & {} \sum _{j=2}^{i-1} \frac{b^i + b^{i-(j-1)}}{2}\, \left( a_j^{(i)}-a_j^{(i-1)}\right) . \end{aligned}$$

Therefore,

$$\begin{aligned}&\sum _{(u_2, \ldots u_i) \in R(b,i)} \left( \sum _{j=2}^i u_j a^{(i)}_j \right) \nonumber \\&\qquad \quad = \sum _{j=2}^{i-1} \frac{b^i + b^{i-(j-1)}}{2}\, a_j^{(i)} + + r_b(i-1) \sum _{k=0}^{b-1} k\, a^{(i)}_i + b\, a_i^{(i)} \\ {}&\qquad \quad = \sum _{j=2}^{i-1} \frac{b^i + b^{i-(j-1)}}{2}\, a_j^{(i)} + \left( \sum _{k=0}^{i-2} b^k\right) \frac{(b-1)b}{2}\, a^{(i)}_i + b\, a^{(i)}_i \\ {}&\qquad \quad = \sum _{j=2}^{i-1} \frac{b^i + b^{i-(j-1)}}{2}\, a_j^{(i)} + \frac{b^i + b}{2}\, a^{(i)}_i = \sum _{j=2}^i \frac{b^i+b^{i-(j-1)}}{2}\, a^{(i)}_j, \end{aligned}$$

as claimed. \(\square \)

The next result follows immediately from Theorem 15 and Proposition 24.

Corollary 25

Let \(i \in \{2, \ldots , n\}.\) Then

$$\begin{aligned} \sum _{\omega \in {\text {Ap}}(S_a(b,i))} \omega = \sum _{j=2}^i \frac{b^i+b^{i-(j-1)}}{2}\, a_j^{(i)}. \end{aligned}$$

Now, as a direct consequence of Corollary 25 and Selmer’s formula (Proposition 20), we obtain the following formula for the genus of \(S_a(b,n)\), provided that \(\gcd ((r_b(n), a) = 1\).

$$\begin{aligned} \begin{aligned} {\text {g}}(S_a(b,n))&= \frac{\sum _{j=2}^n \displaystyle {\frac{b^n+b^{n-(j-1)}}{2}}\, a_j}{a_1} - \frac{a_1-1}{2} \\ {}&= \frac{1}{a_1}\, \sum _{j=2}^n \frac{b^n+b^{n-(j-1)}}{2} \, a_j - \frac{a_1-1}{2} \end{aligned} \end{aligned}$$
(5)

where \(a_j = a_j^{(n)},\ j = 1, \ldots , n\), as usual.

Corollary 26

The genus of \(S_a(b,n)\) is equal to

$$\begin{aligned} {\text {g}}(S_a(b,n)) = \frac{(n-1)\, b^n + (a_1-1)\, a}{2}.\end{aligned}$$

Proof

Since \(a_j = a_1 + a\, r_b(j-1)\), by Eq. (5), we have that

$$\begin{aligned} {\text {g}}(S_a(b,n))&= \frac{1}{2\, a_1}\, \sum _{j=2}^n (b^n+b^{n-(j-1)}) \, (a_1 + a\, r_b(j-1)) - \frac{a_1-1}{2} \\ {}&= \frac{1}{2} \sum _{j=2}^n (b^n + b^{n-(j-1)}) + \frac{a}{2 a_1} \sum _{j=2}^n (b^n + b^{n-(j-1)})\, r_b(j-1) - \frac{a_1-1}{2} \\ {}&= \frac{(n-1)\, b^n}{2} + \frac{a_1-1}{2} + \frac{a}{2 a_1} \sum _{j=2}^n (b^n + b^{n-(j-1)})\, r_b(j-1) - \frac{a_1-1}{2} \\ {}&= \frac{(n-1)\, b^n}{2} + \frac{a}{2 a_1} \sum _{j=2}^n (b^n + b^{n-(j-1)})\, r_b(j-1). \end{aligned}$$

Now, taking into account that \(r_b(j-1) = \frac{b^{j-1} - 1}{b-1}\), we obtain that

$$\begin{aligned} {\text {g}}(S_a(b,n))&= \frac{(n-1)\, b^n}{2} + \frac{a}{2 a_1 (b-1)} \sum _{j=2}^n (b^n + b^{n-(j-1)})\, (b^{j-1} - 1) \\ {}&= \frac{(n-1)\, b^n}{2} + \frac{a}{2 a_1 (b-1)} \sum _{j=1}^{n-1} (b^{n+j} - b^{n-j}) \\ {}&= \frac{(n-1)\, b^n}{2} + \frac{a}{2 a_1 (b-1)} \Big ( (b^n-1) \sum _{j=1}^{n-1} b^j \Big ) \\&= \frac{(n-1)\, b^n + (a_1-1)\, a}{2}, \end{aligned}$$

as claimed. \(\square \)

Example 27

If \(a = b = 3\) and \(n = 4\), then the grepunit semigroup \(S = S_a(b,n)\) is minimally generated by \(a_1 = 40, a_2 = 43, a_3 = 52\) and \(a_4 = 79\). By Corollary 25, we have that \(\sum _{\omega \in {\text {Ap}}(S)} \omega = 54\, a_2 + 45\, a_3 + 42\, a_4 = 7980.\) So, by (5), we conclude that

$$\begin{aligned}{\text {g}}(S) = \frac{7980}{40} - \frac{39}{2} = 180. \end{aligned}$$

Note that, by Corollary 26, we can get \({\text {g}}(S)\) without computing \(\sum _{\omega \in {\text {Ap}}(S)} \omega \).

6 The Type of Grepunit Semigroups. Wilf’s Conjecture

Let S be a numerical semigroup and let \({\text {n}}(S)\) be the cardinality of \(\{s \in S \mid s < {\text {F}}(S)\}\). Clearly, \({\text {g}}(s) + {\text {n}}(S) = {\text {F}}(S)+1\). In [14], H.S. Wilf conjectured that

$$\begin{aligned} {\text {F}}(S) \le {\text {e}}(S)\, {\text {n}}(S) - 1,\end{aligned}$$
(6)

where \({\text {e}}(S)\) denotes the embedding dimension of S.

Although there are many families of numerical semigroups for which this conjecture is known to be true, the general case remains unsolved. The numerical semigroups that satisfy Wilf’s conjecture are said to be Wilf (see for example the survey [2]).

In this section, we will prove that the grepunit semigroups are Wilf. Since \({\text {n}}(S) = {\text {F}}(S)-{\text {g}}(s)+1\), we can take advantage of our explicit formulas for the Frobenius number (Theorem 22) and for the genus (Corollary 26) to check that (6) holds. However, we will follow a different approach: we will prove that the grepunit semigroups are Wilf as an immediate consequence of the computation of their pseudo-Frobenius numbers.

Recall that an integer x is a pseudo-Frobenius number of a numerical semigroup S, if \(x \not \in S\) and \(x+S \in S\), for all \(s \in S {\setminus } \{0\}\). We denote by \({\text {PF}}(S)\) the set of pseudo-Frobenius numbers of S. The cardinality of \({\text {PF}}(S)\) is called the type of S and it is denoted \({\text {t}}(S)\).

Given a numerical semigroup S, we write \(\preceq _S\) for the partial order on \({\mathbb {Z}}\) such that \(y \preceq _S x\) if and only if \(x - y \in S\).

The following result is [10, Proposition 2.20].

Proposition 28

Let S be a numerical semigroup. If s is a nonzero element of S, then

$$\begin{aligned} {\text {PF}}(S) = \left\{ \omega - s\ \mid \ \omega \in {\text {Maximals}}_{\preceq S}\, {\text {Ap}}\big (S,s\big ) \right\} . \end{aligned}$$

As in the previous sections, let ab and n be three positive integers such that \(b> 1, n > 1\) and \(\gcd (r_b(n),a) = 1\).

Proposition 29

The set of maximal elements of \({\text {Ap}}\big (S_a(b,n)\big )\) with respect to \(\preceq _{S_a(b,n)}\) is equal to

$$\begin{aligned}\left\{ a_i + (b-1) \sum _{j=i}^n a_j\ \mid \ i = 2, \ldots , n\right\} .\end{aligned}$$

Proof

Set \(S:=S_a(b,n)\) and \(\alpha _i := a_i + \sum _{j=i}^n (b-1)\, a_j,\ i = 2, \ldots , n\). From the proof of Lemma 21(c), we have that, for each \(\omega \in {\text {Ap}}(S)\), there exists \(\alpha _i\) such that \(\alpha _i - \omega \in S\). Therefore, \({\text {Maximals}}_{\preceq S} {\text {Ap}}(S) \subseteq \{\alpha _2, \ldots , \alpha _n\}\). Now, since by Lemma 21, \(\alpha _2> \ldots > \alpha _n,\) if \(a < b^n-1\), and \(\alpha _2< \ldots < \alpha _n,\) if \(a > b^n-1\); in order to prove the reverse inclusion, we distinguish two cases:

  • If \(a < b^n-1\), then \(\alpha _j - \alpha _i = (i-j) (b^n-(a+1)) = \alpha _{n-(i-j)} - \alpha _n\), for every \(i > j\). Now, if there exist \(i > j\) such that \(\alpha _i \preceq _S \alpha _j\), then \(\alpha _{n-(i-j)} - \alpha _n \in S\). So, \(\alpha _{n-(i-j)} = \alpha _n + \sum _{l=2}^n u_l a_l\) for some \(u_l \in {\mathbb {N}},\ l = 2, \ldots , n\), not all zero. If \(k \in \{2, \ldots , n\}\) is such that \(u_k \ne 0\), then \(\alpha _{n-(i-j)} = \alpha _n + a_k + s\), where \(s = \sum _{l=2}^n u_l a_l-a_k \in S\). Thus, since \(\alpha _n = b a_n\) and \(b a_n + a_k = b a_{k-1} + (a+1) a_1\), we conclude that \(\alpha _{n-(i-j)} - a_1 = b a_{k-1} + a\, a_1 + s \in S\), which is not possible because \(\alpha _{n-(i-j)} \in {\text {Ap}}(S)\).

  • If \(a > b^n-1\), then \(\alpha _j - \alpha _i = (j-i) ((a+1)-b^n) = \alpha _{j-i+2} - \alpha _2,\) for every \(i < j\). Now, if there exist \(i > j\) such that \(\alpha _i \preceq _S \alpha _j\), then \(\alpha _{j-i+2} - \alpha _2 \in S\). So, \(\alpha _{j-i+2} = \alpha _2 + \sum _{l=2}^n u_l a_l = a_2 + \sum _{l=2}^n (u_l + b-1) a_l\), for some \(u_l \in {\mathbb {N}},\ l = 1, \ldots , n\), not all zero. If \(k \in \{2, \ldots , n\}\) is such that \(u_k \ne 0\), then \(\alpha _{n-(i-j)} = a_2 + b\, a_k + s\), where \(s = \sum _{l=2}^n (u_l + b-1) a_l - b\, a_k \in S\). Thus, since \(a_2 + b\, a_k = b a_1 + a_{k+1}, \) if \(k < n\), and \(a_2 + b\, a_k = (b+a+1)\, a_1\), if \(k = n\), we conclude that \(\alpha _{j-i+2} - a_1 \in S\), a contradiction again.

Finally, since we have shown that \(\alpha _i - \alpha _j \not \in S_a(b,n)\), for every \(i,j \in \{2, \ldots , n\}\), we conclude that \(\alpha _i \in {\text {Maximals}}_{\preceq S}({\text {Ap}}(S))\), for every \(i = 2, \ldots , n\), as desired.

\(\square \)

Corollary 30

The set of pseudo-Frobenius numbers of \(S_a(b,n)\) is equal to

$$\begin{aligned} \left\{ (n-i+1)\,(b^n-1-a) + a\, a_1 \ \mid \ i = 2, \ldots , n \right\} . \end{aligned}$$

Consequently, the type of \(S_a(b,n)\) is \(n-1\).

Proof

By Propositions 28 and 29, \({\text {PF}}(S_a(b,n) = \{a_i + (b-1)\sum _{j=i}^n a_j-a_1\ \mid \ i = 2, \ldots , n \}.\) Now, taking into account that

$$\begin{aligned} a_i + (b-1)\sum _{j=i}^n a_j-a_1&= a\, r_b(i-1) + (b-1) (n-i+1) a_1\\&\quad + (b-1)\, a\, \sum _{j=i}^n r_b(j-1) \\&= a\, r_b(i-1) + (n-i+1)(b^n-1) + a\, \sum _{j=i}^n (b^{j-1}-1) \\ {}&= a\, r_b(i-1) + (n-i+1)(b^n-1-a)\\&\quad + a\, ( a_1 - r_b(i-1)) \\&= (n-i+1)(b^n-1-a) + a\, a_1, \end{aligned}$$

for every \(i \in \{2, \ldots , n\}\), and we are done. \(\square \)

Finally, since, by [3, Theorem 20], \({\text {F}}(S) \le ({\text {t}}(S)+1)\, {\text {n}}(S)-1\), for every numerical semigroup S, and, by Corollary 30, \({\text {t}}(S_a(b,n)) + 1 = {\text {e}}(S_a(b,n))\), we conclude that generalized repunit numerical semigroups are Wilf.