# On Families of Numerical Semigroups with two Coprime Generators and Dimension three

Antoine Mhanna

► To cite this version:

Antoine Mhanna. On Families of Numerical Semigroups with two Coprime Generators and Dimension three. 2023. hal-01337295v4

HAL Id: hal-01337295

https://hal.science/hal-01337295v4

Preprint submitted on 26 Aug 2023

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# On Families of Numerical Semigroups with two Coprime Generators and Dimension three

Antoine Mhanna

Kfardebian, Lebanon, tmhanat@yahoo.com

## Abstract

This paper examines in a new way some known facts about numerical semigroups especially when the number of minimal generators (that is the embedding dimension) is at most three and at least two minimal generators are coprime. For such semigroups, an algorithm is re-investigated to find the pseudo-Frobenius numbers. A certain family of *n* dimensional numerical semigroups of type at most *n* − 1 is also given.

MSC 2020: 11D07; 11A05.

Keywords: Numerical Semigroup, pseudo-Frobenius Number.

# 1 Introduction and preliminaries

Let $a_1, \dots, a_n$ be $n$ positive integers with $\gcd(a_1, \dots, a_n) = 1$. The set $S = \left\{ \sum_{i=1}^{n} \lambda_i a_i \mid n \in \mathbb{N}, \lambda_i \ge 0, \text{ for all } i \right\}$ is called the numerical semigroup $S$ and $a_1, \dots, a_n$ are called the generators of $S$. They are minimal generators if we cannot take out a generator $a_i$ without changing the set $S$; in general we denote $S$ by $\langle a_1, \dots, a_n \rangle$. For a numerical semigroup $S \neq \mathbb{N}$ the number $F(S) := \max\{n \in \mathbb{N} \mid n \notin S\}$ exists (see [7, Theorem 1.0.1] for proof) and is called the Frobenius number of $S$. We will suppose hereafter that $a_1 < a_2$. The interested reader can see [6] and the references therein (in particular [13]) for an extensive reading on numerical semigroups.

There are different algorithms computing $F(S)$ with $S$ a three minimally generated semigroup; among them is [14], also [4, 9], and Rödseth's formula [12]. We refer to [7] for a further discussion on these and other generalized algorithms.

In this section we revisit the classical semigroup $\langle a_1, a_2 \rangle$. We will represent a proof from [8, p. 134] for two main purposes: one, this makes the article more self-contained and two, reformulates in details an often cited result of Sylvester [8] on the Frobenius problem.
**Definition 1.** Let $a_1$ and $a_2$ be positive integers with $\text{gcd}(a_1, a_2) = 1$. The set of positive integers $x$ of the form $x = \alpha a_i - \beta a_{3-i}$, $i = 1$ or $2$ with $0 < \alpha < a_{3-i}$ and $0 < \beta < a_i$ is called the non-compound set and is denoted by $\text{NC}$. The set of integers $x$ of the form $x = \alpha a_1 + \beta a_2$ with $\alpha > 0$, $\beta > 0$, and $x < a_1 a_2$ is called the compound set and is denoted by $\mathcal{C}$.

**Lemma 1.** [5] Let $S = \langle a_1, a_2 \rangle$ and let $x$ be a positive integer; we have $x \in \mathcal{NC}$ if and only if $0 < x < a_1 a_2$ and $x \notin S$.

*Proof.* Suppose $x \in S$ and in $\mathcal{NC}$ with $x < a_1 a_2$. Consequently, $x = aa_1+ba_2 = \alpha a_i - \beta a_{3-i}$ for some non-negative numbers $a, b$; but this contradicts the fact that $\alpha < a_{3-i}$ and $\beta < a_i$ (for example if $i=1$, we have $(a-\alpha)a_1 = -(\beta+b)a_2$ and $|a-\alpha| < a_2$). Take the positive integers less than $a_1 a_2$ having neither $a_1$ nor $a_2$ as a divisor, there are $(a_1-1)(a_2-1)$ such integers. Arrange these numbers as pairs $(x, y)$ summing $a_1 a_2$; if $x \in \mathcal{NC}$, then $a_1 a_2 - x = y \in S$ and if $y \in \mathcal{C}$, then $(a_1 a_2 - y) = x \notin S$, which means that $x \in \mathcal{NC}$. $\square$

We have proven that $|NC| = |C| = \frac{(a_1-1)(a_2-1)}{2}$. The number $\mathcal{F}(S) = (a_1-1)(a_2-1) - 1 = a_1 a_2 - a_1 - a_2$ does not belong to $S$ since $a_1 a_2 - \mathcal{F}(S)$ is compound. Any number $y > a_1 a_2$ can be written as $\alpha a_1 a_2 + r$ and it is easily seen that since $r < a_1 a_2$, the remainder $r$ is either in $S$ or in $\mathcal{NC}$. Therefore all $n > \mathcal{F}(S)$ do belong to $S$.

Now we can characterize all the numbers that are not in $S = \langle a_1, a_2 \rangle$.

**Proposition 1.** The set $\mathcal{NC}$ is the set $\{\mathcal{F}(S) - y \mid y \in S, y < \mathcal{F}(S)\}$.

*Proof.* A direct application of previous result. $\square$

**Remark 1.** Notice at last that any integer $x < a_1 a_2$ in $S$ has a unique representation as $x = \alpha a_1 + \beta a_2$ with $(\alpha, \beta) \in \mathbb{N}^2$, $\alpha < a_2$, and $\beta < a_1$; assuming the contrary $\alpha a_1 + \beta a_2 = \nu a_1 + \gamma a_2$, that is $(\alpha - \nu)a_1 = (\gamma - \beta)a_2$ and we can not have $a_2$ divides $(\alpha - \nu)$ or $a_1$ divides $(\gamma - \beta)$. A number $x$ in $\mathcal{NC}$ can be written as $a_1 a_2 - wa_1 - ra_2 = (a_2 - w)a_1 - ra_2$, where $1 \le w < a_2$ and $1 \le r < a_1$. Hence, the uniqueness of $(w, r) \in \mathbb{N}^2$ follows similarly by contradiction.

We end this expository section by the following definition.

**Definition 2.** For a numerical semigroup $S$, we have $T(S) := \{x \in \mathbb{N} \mid x \notin S, x+s \in S, \text{ for all } s \in S, s > 0\}$. The cardinality of $T(S)$, denoted $t(S)$, is called the type of $S$ and a number in $T(S)$ is called a pseudo-Frobenius number.

The Apéry set of $S$ with respect to $n \in S$ is the set $\text{Ap}(S, n) = \{s \in S \mid s - n \notin S\}$ and the genus of $S$, denoted $g(S)$, is the cardinality of $\{\mathbb{N} \setminus S\}$.

## 2 Adding minimal generator

Here we consider numerical semigroups $S$ minimally generated by $a_1, a_2, a_3$; the integers $a_1$ and $a_2$ are coprime with $a_1 < a_2$. The next remark is already well known and is very useful, see [6, Chapter 1].
**Remark 2.** [14, 13] Let $a_1, a_2, \dots, a_n$ be positive integers. If $\gcd(a_2, \dots, a_n) = d$ and $a_j = da'_j$ for each $j > 1$, then the following holds:

* $F(\langle a_1, a_2, \dots, a_n \rangle) = dF(\langle a_1, a'_2, \dots, a'_n \rangle) + a_1(d-1)$ (Johnson's formula).

* The type of $\langle a_1, a_2, \dots, a_n \rangle$ equals type of $\langle a_1, a'_2, \dots, a'_n \rangle$.

* The type of $S = \langle a_1, a_2, a_3 \rangle$ is at most two.

* We have the equivalence:

$$w \in \mathrm{Ap}(\langle a_1, a'_2, \dots, a'_n \rangle, a_1) \iff dw \in \mathrm{Ap}(\langle a_1, a_2, \dots, a_n \rangle, a_1).$$

**Remark 3.** A number $x$ in $\mathbb{N}$ is written as $a_1a_2 - ka_2 - ja_1$ and we have $0 < k < a_1$ if and only if $0 < j < a_2$. This is useful when $ix \in \mathbb{N}$ ($i \in \mathbb{N}^*$) and $0 < ik < a_1$ so $0 < ij - (i-1)a_2 < a_2$ or $0 < ij < a_2$ so $0 < ik - (i-1)a_1 < a_1$.

From the unique representation of $\mathbb{N}$ numbers we have Lemma 2.

**Lemma 2.** Let $S = \langle a_1, a_2, a_3 \rangle$, $Q = \langle a_1, a_2 \rangle$, and $a_3 = a_1a_2 - ka_2 - ja_1$ for some $(k, j)$ with $1 \le k < a_1$ and $1 \le j < a_2$. If $2a_3 \in Q$, then the possible pseudo-Frobenius numbers are $\{a_1a_2 - (k+1)a_2 - a_1, a_1a_2 - a_2 - (j+1)a_1\}$.

**Corollary 1.** Let $S = \langle a, ka+d, ha+2d \rangle$ with $d \ge 1$ and $h$ a non-negative integer. For $a = 2i+1$ odd, if $\gcd(a,d) = 1$ and $\lfloor \frac{h}{2} \rfloor < k < h(\frac{a+1}{2}) + d$, then $T(S) = \{F_1 := a(ha+2d) - a - (\frac{a-1}{2}+1)(ha+2d), F_0 := a(ha+2d) - (h\frac{a-1}{2} + d+1-k+h)a - (ha+2d)\}$.

*Proof.* Write first

$$ka+d = a(ha+2d) - \left(h\frac{a-1}{2} + d - k + h\right)a - \left(\frac{a-1}{2}\right)(ha+2d)$$

and

$$ha + 2d = 2(ka + d) - (2k - h)a.$$

From these expressions and the conditions stated, we know that the generators of $S$ are minimal. Take $Q = \langle a, ha+2d \rangle$, where $a_1 = a$ and $a_2 = (ha+2d)$. Apply Lemma 2; since $F_0 + a_3 = (2k-h-1)(a_1) + i(a_2) \in Q$ and $F_1 + a_3 = a_1(d-1+hi+k) \in Q$ we get the result. $\square$

The case $k = h$ is well known [2]. See [7, Theorem 5.4.3] and [2] for a general family of numerical semigroups with an arithmetic progression of generators.

**Definition 3.** Let $S = \langle a_1, a_2, a_3 \rangle$ and $Q = \langle a_1, a_2 \rangle$. If $x := a_1a_2 - ka_2 - ja_1$, $1 \le k < a_1$, and $1 \le j < a_2$, then the integers $k$ and $j$ are called the level and the under-level of $x$, respectively. Let $m$ be the least integer such that $m \cdot a_3 \in Q$ with $m \ge 3$, $x_1 := a_3$ and let $x_i := ia_3 \notin Q$ for every $i$, $2 \le i \le m-1$. By Remark 3 we have either $ik < a_1$ (so $ij > a_2$) with $ij - (i-1)a_2 < a_2$, which we refer to as an upgrade start or $ij < a_2$ (so $ik > a_1$) with $ik - (i-1)a_1 < a_1$ referred to as a downgrade start, where $i$ verifies $2 \le i \le s_1 \le m-1$ for a certain $s_1$.
Next we represent an algorithm to find $T(S)$.

**Definition 4.** Keeping the previous notation, if $h$ denotes the highest level and $l$ the highest under-level among $x_i$, then our pseudo-Frobenius numbers candidates are of the form $F_0 := a_1a_2 - a_2 - (l+1)a_1 + wa_3$ for some $w \ge 0$ and $F_1 := a_1a_2 - (h+1)a_2 - a_1 + ra_3$ for some $r \ge 0$, where the integers $w$ and $r$ are the least integers such that $F_1 + a_3 \in Q$ and $F_0 + a_3 \in Q$, respectively.

It is worth mentioning that the two previous pseudo-Frobenius candidates are the precise formulas for pseudo-Frobenius numbers of $S$. This is proved by Ralf Fröberg et al. [13, Theorem 11, second proof] where similar characterizations of pseudo-Frobenius numbers for any $S = \langle a_1, a_2, a_3 \rangle$ are given, yielding that the type of $\langle a_1, a_2, a_3 \rangle$ is at most two.

**Example 1.** We illustrate the above definitions here; take $\langle 11, 13, 10 \rangle$, $a_3 = 10 = 11 \cdot 13 - 5 \cdot 11 - 6 \cdot 13$, and it can be verified that $m = 5$, $(5 \cdot a_3 \in Q = \langle 11, 13 \rangle)$. The semigroup has a downgrade start with $s_1 = 2$, $h = 7$, and $l = 10$. The pseudo-Frobenius numbers are $11 \cdot 13 - 11 - 8 \cdot 13 + 10 = 38$ and $11 \cdot 13 - 11 \cdot 11 - 13 + 20 = 29$.

The previous lemma has the following extension:

**Theorem 1.** Let $S = \langle a_1, \dots, a_n \rangle$ and $Q = \langle a_1, a_2 \rangle$, where $a_1$ and $a_2$ are two coprime generators. If $a_i + a_j \in Q$ for all $i$ and $j \ge 3$, then the type of $S$ is at most $n-1$.

*Proof.* The idea is simple in the sense that we get at most $n-1$ possible pseudo-Frobenius numbers $F_i \notin S$ verifying both $F_i + a_1 \in S$ and $F_i + a_2 \in S$. By Lemma 1 we can write $a_i := a_1a_2 - \alpha_i a_2 - \beta_i a_1$ with $i \ge 3$ for some $1 \le \alpha_i < a_1$ and $1 \le \beta_i < a_2$. Arrange these generators so sequence $(\alpha_i)_{i \ge 3}$ is decreasing (strictly) and thus, $(\beta_i)_{i \ge 3}$ is strictly increasing (since otherwise the difference between two consecutive minimal generators is in $Q$). Set

$$F_1 = a_1a_2 - a_2 - \max_{3 \le i \le n} (\beta_i + 1)a_1,$$

$$F_2 = a_1a_2 - \max_{3 \le i \le n} (\alpha_i + 1)a_2 - a_1,$$

and for $3 \le i \le n-1$, set

$$F_i = a_1a_2 - (\min(\alpha_i, \alpha_{i+1}) + 1)a_2 - (\min(\beta_i, \beta_{i+1}) + 1)a_1.$$

The proof is direct for possible pseudo-Frobenius numbers having their level or under-level equals 1 (the numbers $F_1$ and $F_2$ verify $F_1 \notin S$, $F_2 \notin S$, and $F_i + a_j \in S$ for any $i=1,2$ and $j=1,2$).

Otherwise we have the result from: $\{a_i + s|s \in Q, i \ge 3\} \cup Q = S$ and Remark 1. For example, one can prove that if $F_i = a_1a_2 - ka_2 - ja_1$ is a pseudo-Frobenius number, $k > 1$, and $j > 1$, then for some $i$ we have $\alpha_{i+1} < k < \alpha_i$ and $\beta_i < j < \beta_{i+1}$, to get the necessity of the given expressions. $\square$

**Remark 4.** It is well known that numerical semigroups $S$ of embedding dimension $n$ with $t(S) \le n-1$ verify Wilf's conjecture; see [6, Chapter 1].
# 3 Algorithm's Applications

Before giving some examples and applications, we point out that we do not discuss or compare other algorithms with the one in Definition 4. For example, the algorithm formulas [4, Corollary 12], proved by giving Apéry sets, require additional parameters assuming pairwise coprime minimal generators.

**Theorem 2.** [3] Let $S = \langle a, b, c \rangle$, $a < b < c$, $d = \gcd(a, b)$, $n = \frac{bv}{d} - 1$, $p = n(\frac{cdv}{a} - 1)$, $v \in \mathbb{N}$ such that $bv \equiv d \pmod a$ with $vd < a$, then

$$F(\langle a, b, c \rangle) = \frac{ab(F(\langle n, n+1, n+p \rangle) + 2n + 1)}{dn(n+1)} + (d-1)c - (a+b).$$

As stated by Igor Kan et al. [3, Theorem 1], Theorem 2 follows by applying Johnson's formula (Remark 2) three times; it could be better seen if one starts considering $b = db'$, $a = da'$. Replacing the different variables $n, p$ by the given values, the computation should be applied two times to the semigroup $\langle n, n+1, n+p \rangle$. Lastly the formula is applied for $\langle a, b, c \rangle$ with $\gcd(a, b) = d$.

**Theorem 3.** [3] Let $S = \langle a, a+1, a+p \rangle$. If $a \ge p(p-4)+2$, then

$$F(S) = \left\lfloor \frac{a}{p} \right\rfloor (a+1) + (p-1) \left\lfloor \frac{a+1}{p} \right\rfloor + (p-3)a - 1.$$

## 3.1 A downgrade semigroup

Next we present particular semigroups that were introduced by A. M. Robles-Pérez and J. C. Rosales [1].

**Lemma 3.** Let $S = \langle a, a+1, ia+d \rangle$, $a = dk + j$, $0 < i < d < a$, and $1 \le j < d$. If $(k+1)i + j + 1 = d$, then the type of $S$ is one.

*Proof.* The proof makes use of Remark 2: by finding a common factor $f$ of $a+1$, $ia+d$ and showing that $a \in \langle \frac{a+1}{f}, \frac{ia+d}{f} \rangle$. Notice that $a = j(k+1) + k(i(1+k)+1)$ from the definition of $a$ and $d$ with $a+1 = (d-i)(k+1)$ and $ia+d = (d-i)(1+i(1+k))$. The result follows taking $f = d-i$. □

**Theorem 4.** [1] Let $S = \langle a, b, c \rangle$ with pairwise coprime minimal generators and so $c = bh - ar = ab - (a-h)b - ra = (b-r)a - (a-h)b$. If $\frac{b}{r} \ge \left\lfloor \frac{a}{h} \right\rfloor$, then $T(S) = \left\{ \left\lfloor \frac{a-1}{h} \right\rfloor c + ra - b - a, (a-1)b - \left\lfloor \frac{a-1}{h} \right\rfloor ra - a \right\}$.

Using Remark 2 and [6, Proposition 2.20], it is not hard to prove that the formulas in the previous theorem are invariant with $\gcd(a, c) = d$ or $\gcd(b, c) = d$ and $d > 1$ ($\gcd(a, b) = 1$ necessarily). Consequently, by Theorem 2, we see that Theorem 4 and Theorem 5 are equivalent for those numerical semigroups of type 2.
**Theorem 5.** Let $S = \langle a, a+1, ia+d \rangle$, $Q = \langle a, a+1 \rangle$, where $a = dk + j$, $a_3 = ia + d$, $0 < i < d < a$, $1 \le j < d$, and $d \ge 3$. If $(k+1)i + j \ge d-1$, then $T(S) = \{F_1, F_2\}$ for:

$$F_1 = a(a+1) - (k(d-i) + 1)a - (a+1) + wa_3,$$

$$F_2 = a(a+1) - a - (a - d + 1)(a+1) + (k-1)a_3,$$

where $w = 0$ if $(k+1)i + j \ge d$ and $w = k$ otherwise.

*Proof.* Write $ia+d = a(a+1) - (d-i)a - (a-d)(a+1)$, we are in a downgrade start and

$$na_3 = a(a+1) - n(d-i)a - (a-dn)(a+1)$$

for all $n$ with $1 \le n \le k$. The number $(k+1)a_3 \in Q$ since

$$(k+1)a_3 = a(a+1) - (a - (i(k+1) + j - d))a + (d-j)(a+1).$$

Set by definition $wd := 3 + x$, if

$$F = a(a+1) - (k(d-i) + 1)a - (a+1),$$

then $F \notin S$ and $F + wa_3 = (-2 + j - x + wi - 1 + ki)(dk + j) + (2 + x)(dk + j + 1)$ is in $Q$ if, in particular:

$$ki + j \ge w(d - i) \text{ and } 2 + x = wd - 1 \ge 0 \quad (1),$$

$$\text{or } -(a+1) < ki + j - w(d - i) < 0 \text{ and } wd - 1 \ge a \quad (2).$$

We call $w_0$ the smallest such integer $\ge 1$; but it can be verified that $w_0$ exists as $w_0 = 1$ if $(k+1)i + j \ge d$ from (1) and $w_0 = k+1$ otherwise (2). Thus, first

$$F_1 = a(a+1) - (k(d-i) + 1)a - (a+1) + (w_0 - 1)(ia + d) \in T(S).$$

Take $G = a(a+1) - a - (a - d + 1)(a+1) + k(ia + d)$ and set $y = d - 1 - j$, $G = a(ki + j) + y(a+1) \in Q$. Now take $F = a(d-2) + d-1 + (k-t)(ia+d)$ with $1 \le t \le k$, clearly $F - G = -(td + ita)$ thus,

$$\begin{aligned} F &= a(ki + j + td + ita) - (-d + 1 + j + td + ita)(a + 1) \\ &= a(ki + j + td - it) - (1 + j + (t-1)d)(a + 1) \end{aligned}$$

and clearly $F$ is not in $Q$ if and only if $ki + j + t(d - i) < a + 1$ and $1 + j + (t - 1)d > 0$. We call $t_0$ the smallest such integer $\ge 1$; but it can be verified that $(k-1)i + j + d < a + 1$, that is $(k-1)i < (k-1)d + 1$ and so if $r = k - t_0 = k - 1$, the second pseudo-Frobenius is $F_2 = a(d - 2) + d - 1 + (k - 1)(ia + d)$.

Rearranging terms we get $F_1 = (j + ki - w(d - i))a + (wd - 1)(a + 1)$ and $F_2 = a((k-1)i + j + d) - (1 + j)(a + 1)$; if $w = 0$, then $F_1 \ne F_2$ since $1 < 1 + j$ and for $w = k$ we have $(k+1)i + j + 1 = d$ with $F_1 = F_2$. $\square$
**Remark 5.** By Remark 2, the case $d$ divides $a$ in Theorem 5 is almost trivial. Note also that the condition $(k+1)i + j \ge d-1$ of Theorem 5 is equivalent to

$$a - (d-i)(k+1) \ge -1 \iff \frac{a+1}{d-i} \ge \lfloor \frac{a}{d} \rfloor \quad (\text{Theorem 4}).$$

See also [15, Corollary 1].

**Example 2.** For $S = \langle 34, 35, 46 \rangle$, we cannot apply Theorem 3, applying Theorem 5 we have $d = 12$, $a = 34 = 2 \cdot 12 + 10$, $i = 1$, $k = 2$, and $j = 10$. Here $w = 0$ and $T(S) = \{373, 397\}$. Notice that Theorem 4 gives the same result without the pairwise coprime condition.

## 3.2 Semigroup of three consecutive squares

The Frobenius number formulas of numerical semigroups generated by three consecutive squares were given by M. Lepilov et al. [11] and also by Fel [10]. Here we compute their two pseudo-Frobenius numbers. One can verify that $(n+1)(n+2)^2 = (n+1)n^2 + 4(n+1)^2$ and $n(2n+1)^2 = n(n+1)^2 + (3n+2)n^2$ for any $n$.

**Lemma 4.** Let $S = \langle (4s-1)^2, (4s)^2, (4s+1)^2 \rangle$ and $Q = \langle n^2, (n+1)^2 \rangle$ with $n = 4s-1$ and $s > 1$; we have $T = \{256s^3-144s^2+8s-1, 272s^3-168s^2+s-2\}$.

*Proof.* First let us write

$$(n+2)^2 = n^2(n+1)^2 - (n^2 - 2n - 4)n^2 - (4n - 4)(n+1)^2;$$

if $n = 4s-1$ and $s > 1$, then we verify that $s(n+2)^2 \in Q$ and

$$(s-1)(n+2)^2 = (16s^2 - 15s - 1)n^2 - (n^2 - 4n + 3)(n+1)^2 \notin Q.$$

From Definition 3 and Definition 4 notation, we have that $S$ has an upgrade start with $s_1 = s-1$, $l = n^2 - 2n - 4$, and $h = n^2 - 4n + 3$. Finally we have:

$$\begin{aligned} & n^2(n+1)^2 - (n^2 - 2n - 3)n^2 - (n+1)^2 + (\alpha)(n+2)^2 \\ & = (4n + 4 + \alpha(4n + 5))n^2 - (1 + \alpha(4n - 4))(n+1)^2, \end{aligned}$$

we verify

$$\begin{aligned} & n^2(n+1)^2 - (n^2 - 2n - 3)n^2 - (n+1)^2 + (s-1)(n+2)^2 = (s-1)n^2 + (16s-8)(n+1)^2 \\ & \text{and } n^2(n+1)^2 - n^2 - (n^2 - 4n + 4)(n+1)^2 + (n+2)^2 = 16sn^2. \quad \square \end{aligned}$$

**Lemma 5.** Let $S = \langle (4s-3)^2, (4s-2)^2, (4s-1)^2 \rangle$ and $Q = \langle n^2, (n+1)^2 \rangle$ with $n = 4s-3$ and $s > 1$; we have $T(S) = \{144s^3 - 296s^2 + 193s - 42, 160s^3 - 352s^2 + 234s - 51\}$.
*Proof.* If $n = 4s - 3$ for some $s > 1$, then $(2s - 1)(n + 2)^2 \in Q$, the highest under-level is for

$$s(n + 2)^2 = n^2(n + 1)^2 - (16s^2 - 25s + 8)n^2 - (8s - 9)(n + 1)^2,$$

thus, we get $l = 16s^2 - 25s + 8$ and the highest level is for $h = 16s^2 - 32s + 16$ with

$$(s - 1)(n + 2)^2 = n^2(n + 1)^2 - (7s - 3)n^2 - (16s^2 - 32s + 16)(n + 1)^2$$

and

$$(2s - 2)(n + 2)^2 = n^2(n + 1)^2 - (14s - 6)n^2 - (16s^2 - 40s + 23)(n + 1)^2.$$

Here $s_1 = s - 1$ and we verify that

$$\begin{aligned} n^2(n + 1)^2 - n^2 - (16s^2 - 32s + 17)(n + 1)^2 + \alpha(n + 2)^2 \\ = (\alpha(4n + 5) - 1)n^2 - (8 - 8s + \alpha(4n - 4))(n + 1)^2, \end{aligned}$$

$$\begin{aligned} n^2(n + 1)^2 - (16s^2 - 25s + 9)n^2 - (n + 1)^2 + \alpha(n + 2)^2 \\ = (9s - 5 + \alpha(4n + 5))n^2 - (1 + \alpha(4n - 4))(n + 1)^2, \end{aligned}$$

$$n^2(n+1)^2 - n^2 - (16s^2 - 32s + 17)(n+1)^2 + s(n+2)^2 = (9(s-1) + 4)n^2 + (n+1)^2,$$

$$\text{and } n^2(n+1)^2 - (16s^2 - 25s + 9)n^2 - (n+1)^2 + (s-1)(n+2)^2 = (2(s-1))n^2 + (8(s-1))(n+1)^2. \quad \square$$

**Lemma 6.** Let $S = \langle(4s)^2, (4s + 1)^2, (4s + 2)^2\rangle$ and $Q = \langle n^2, (n + 1)^2 \rangle$ with $n = 4s$ and $s \ge 2$; we have $T(S) = \{112s^3 + 48s^2 + 8s - 1, 128s^3 - 20s - 5\}$.

*Proof.* Write $(n + 2)^2 = n^2(n + 1)^2 - (n^2 - 2n - 4)n^2 - (4n - 4)(n + 1)^2$; here we need the following expressions:

$$\left\{ \begin{aligned} s(n + 2)^2 &= n^2(n + 1)^2 - (3s + 1)n^2 - (16s^2 - 4s)(n + 1)^2, \\ (s + 1)(n + 2)^2 &= n^2(n + 1)^2 - (16s^2 - 5s - 3)n^2 - (12s - 4)(n + 1)^2, \\ 2s(n + 2)^2 &= n^2(n + 1)^2 - (2 + 6s)n^2 - (16s^2 - 8s)(n + 1)^2, \\ (2s + 1)(n + 2)^2 &= n^2(n + 1)^2 - (16s^2 - 2s - 2)n^2 - (8s - 4)(n + 1)^2, \\ 3s(n + 2)^2 &= n^2(n + 1)^2 - (9s + 3)n^2 - (16s^2 - 12s)(n + 1)^2, \\ (3s + 1)(n + 2)^2 &= n^2(n + 1)^2 - (16s^2 + s - 1)n^2 - (4s - 4)(n + 1)^2, \\ n(n + 2)^2 &= n^2(n + 1)^2 - (12s + 4)n^2 - (16s^2 - 16s)(n + 1)^2. \end{aligned} \right.$$

With $(n + 1)(n + 2)^2 \in Q$, we have $s_1 = s$, $h = 16s^2 - 4s$, and $l = 16s^2 + s - 1$. Finally

$$\begin{aligned} n^2(n + 1)^2 - n^2 - (16s^2 - 4s + 1)(n + 1)^2 + \alpha(n + 2)^2 \\ = (\alpha(4n + 5) - 1)n^2 - (1 - 4s + 16\alpha s - 4\alpha)(n + 1)^2, \end{aligned}$$
$$ \begin{aligned} & n^2(n+1)^2 - (16s^2 + s)n^2 - (n+1)^2 + \alpha(n+2)^2 \\ & = (2n+1-s+\alpha(4n+5))n^2 - (1+\alpha(4n-4))(n+1)^2, \end{aligned} $$

$$ n^2(n+1)^2 - n^2 - (16s^2 - 4s + 1)(n+1)^2 + (3s+1)(n+2)^2 = 3(n+1)^2 + (7s+1)n^2, $$
and

$$ n^2(n+1)^2 - (16s^2 + s)n^2 - (n+1)^2 + s(n+2)^2 = (4s)n^2 + (4s-1)(n+1)^2. $$

□

**Lemma 7.** Let $S = \langle(4s-2)^2, (4s-1)^2, (4s)^2\rangle$ and $Q = \langle n^2, (n+1)^2\rangle$ with $n = 4s-2$ for $s > 1$; we have $T(S) = \{80s^3 - 80s^2 + 28s - 5, 128s^3 - 160s^2 + 60s - 9\}$.

*Proof.* We check that $(n+2)^2 = n^2(n+1)^2 - (n^2 - 2n - 4)n^2 - (4n - 4)(n+1)^2$. The potential highest level and under-level are for the following multiples:

$$ \left\{ \begin{aligned} (s-1)(n+2)^2 &= n^2(n+1)^2 - (11s-2)n^2 - (16s^2 - 28s + 12)(n+1)^2, \\ s(n+2)^2 &= n^2(n+1)^2 - (16s^2 - 13s + 2)n^2 - (4s-4)(n+1)^2, \\ (2s-1)(n+2)^2 &= n^2(n+1)^2 - (6s-1)n^2 - (16s^2 - 24s + 8)(n+1)^2, \\ (2s)(n+2)^2 &= n^2(n+1)^2 - (16s^2 - 18s + 3)n^2 - (8s-8)(n+1)^2, \\ (3s-1)(n+2)^2 &= n^2(n+1)^2 - (s)n^2 - (16s^2 - 20s + 4)(n+1)^2, \\ (3s)(n+2)^2 &= n^2(n+1)^2 - (16s^2 - 23s + 4)n^2 - (12s-12)(n+1)^2, \\ n(n+2)^2 &= n^2(n+1)^2 - (12s-2)n^2 - (16s^2 - 32s + 12)(n+1)^2, \end{aligned} \right. $$

with $(n+1)(n+2)^2 \in Q$. Consequently, $s_1 = s-1$, $h = 16s^2 - 20s + 4$, and $l = 16s^2 - 13s + 2$. Finally we have

$$ \begin{aligned} & n^2(n+1)^2 - n^2 - (16s^2 - 20s + 5)(n+1)^2 + \alpha(n+2)^2 \\ & = (\alpha(4n+5) - 1)n^2 - (1 - 4s + 16\alpha s - 12\alpha)(n+1)^2, \end{aligned} $$

$$ \begin{aligned} & n^2(n+1)^2 - (16s^2 - 13s + 3)n^2 - (n+1)^2 + \alpha(n+2)^2 \\ & = (5s - 2 + \alpha(4n + 5))n^2 - (1 + \alpha(4n - 4))(n+1)^2. \end{aligned} $$

Thus,

$$ n^2(n+1)^2 - n^2 - (16s^2 - 20s + 5)(n+1)^2 + s(n+2)^2 = 3(n+1)^2 + (5s-2)n^2 $$
and

$$ n^2(n+1)^2 - (16s^2 - 13s + 3)n^2 - (n+1)^2 + (3s-1)(n+2)^2 = (n)n^2 + (n+1)(n+1)^2. $$

□

Lemma 8 and Lemma 9 can be considered the reduction by 4 ($d = 4$ see Remark 2) of Lemma 6 and Lemma 7, respectively.
**Lemma 8.** Let $S = \langle(2s)^2, (4s+1)^2, (2s+1)^2\rangle$ and $Q = \langle n^2, (n+1)^2\rangle$ with $n = 2s > 2$; we have $T(S) = \{32s^3 - 12s^2 - 11s - 2, 28s^3 - 4s - 1\}$.

*Proof.* First

$$(2n+1)^2 = n^2(n+1)^2 - (2n+1)n^2 - (n^2 - 2n - 1)(n+1)^2.$$

For $n = 2s$, the semigroup $S$ has a *downgrade start* with $s_1 = s - 1$, $l = n^2 - 3s - 1$, and $h = n^2 - 2n - 1$. By computation we have

$$ \begin{aligned} & n^2(n+1)^2 - n^2 - (n^2 - 2n)(n+1)^2 + \alpha(2n+1)^2 \\ & = (2n + \alpha(2n+1))(n+1)^2 - (1 + \alpha(2n+1))n^2, \end{aligned} $$

$$ n^2(n+1)^2 - n^2 - (n^2 - 2n)(n+1)^2 + (s-1)(2n+1)^2 = (s-1)(n+1)^2 + (7s+1)n^2, $$
and $n^2(n+1)^2 - (n^2 - 3s)n^2 - (n+1)^2 + (2n+1)^2 = 3sn^2 + 4s(n+1)^2$. $\square$

**Lemma 9.** Let $S = \langle(2s+1)^2, (4s+3)^2, (2s+2)^2\rangle$ and $Q = \langle n^2, (n+1)^2\rangle$ with $n = 2s + 1 > 1$; we have $T(S) = \{20s^3 + 28s^2 + 9s - 1, 32s^3 + 44s^2 + 13s - 2\}$.

*Proof.* First we got

$$(2n+1)^2 = n^2(n+1)^2 - (2n+1)n^2 - (n^2 - 2n - 1)(n+1)^2.$$

Also if $n = 2s + 1$, then $s(2n+1)^2 \notin Q$ and

$$(s+1)(2n+1)^2 = (s+1)n^2 + (3s+2)(n+1)^2,$$

so $s_1 = s$, $l = n^2 - s - 1$, and $h = n^2 - 2n - 1$.

$$ \begin{aligned} & n^2(n+1)^2 - n^2 - (n^2 - 2n)(n+1)^2 + \alpha(2n+1)^2 \\ & = (2n + \alpha(2n+1))(n+1)^2 - (1 + \alpha(2n+1))n^2. \end{aligned} $$

By a direct verification

$$ n^2(n+1)^2 - n^2 - (n^2 - 2n)(n+1)^2 + s(2n+1)^2 = (5s+3)n^2 + (3s+1)(n+1)^2 $$
and $n^2(n+1)^2 - (n^2 - s)n^2 - (n+1)^2 + (2n+1)^2 = sn^2 + (4s+2)(n+1)^2$. $\square$

### 3.3 A cyclic semigroup

The next lemma is the particular three dimensional case of Prof. Dao's question at: http://mathoverflow.net/questions/292507/a-formula-for-frobenius-number-of-certain-numerical-semigroups.

**Lemma 10.** [6, Proposition 10.16] Let $a, b, c$ be three positive integers such that $ab + a + 1$ and $ca + c + 1$ are coprime. For $S = \langle ab + a + 1, bc + b + 1, ca + c + 1\rangle$, we have $T(S) = \{abc - 1, 2(abc - 1)\}$.
*Proof.* First it is clear from the cyclic expression that, if any two of the generators share a common factor $d$, the third one will be divisible by $d$. Assuming the hypothesis, we write

$$bc+b+1 = (ab+a+1)(ca+c+1) - c(ab+a+1) - ((b+1)a-b)(ca+c+1).$$

The generators are $a_3 = bc+b+1$ and $Q = \langle ab+a+1, ca+c+1\rangle$.

We get $m = a+1$ (see Definition 3) and

$$ \begin{aligned} & (ab+a+1)(ca+c+1) - (ab+a+1) - ((b+1)a-b+1)(ca+c+1) + \alpha a_3 \\ & = (b+\alpha(b+1))(ca+c+1) - (1+\alpha c)(ab+a+1). \end{aligned} $$

Finally we verify

$$F_1 = (ab+a+1)(ca+c+1) - (ab+a+1) - ((b+1)a-b+1)(ca+c+1) + (a-1)(bc+b+1) = 2(abc-1)$$

$$\text{and } F_2 = (ab+a+1)(ca+c+1) - (ca+1)(ab+a+1) - (ca+c+1) = abc-1. \quad \square$$

# 4 Acknowledgments

I thank the http://www.les-mathematiques.net site and the reviewers for the corrections and advice. Computations were assisted through Maple software.

# References

[1] A. M. Robles-Pérez and J. C. Rosales, The Frobenius problem for some numerical semigroups with embedding dimension equal to three, *Hacettepe Journal of Mathematics and Statistics* **44** (2015), 901–908.

[2] A. Tripathi, The Frobenius problem for modified arithmetic progressions, *J. Integer Seq. 16(7)* (2013), Article 13.7.4.

[3] I. D. Kan, B. S. Stechkin, and I. V. Sharkov, On the Frobenius problem for three arguments, *Math. Notes* **62** (1997), 521–523.

[4] J. C. Rosales and P. A. García-Sánchez, Numerical semigroups with embedding dimension three, *Archiv der Mathematik* **83** (2004), 488–496.

[5] J. C. Rosales and M. B. Branco, The Frobenius problem for numerical semigroups, *Journal of Number Theory* **131** (2011), 2310–2319.

[6] J. C. Rosales and P. A. García-Sánchez, *Numerical Semigroups*, Developments in Mathematics **20**, Springer, New York, 2009.

[7] J. L. Ramírez Alfonsín, *The Diophantine Frobenius Problem*, Oxford Univ. Press, Oxford, 2005.
[8] J. J. Sylvester. Excursus on rational fractions and partitions, *Amer J. Math.* **5** (1882), 119–136.

[9] L. G. Fel, Frobenius Problem for Semigroups $S(d_1, d_2, d_3)$, *Funct. Anal. Other Math.* **1**(2006), 119–157.

[10] L. G. Fel, Numerical semigroups generated by squares, cubes and quartics of three consecutive integers, Conference paper, *International meeting on numerical semigroups with applications*, Levico-Terme Italy, 2016.

[11] M. Lepilov, J. O'Rourke, and I. Swanson, Frobenius numbers of numerical semigroups generated by three consecutive squares or cubes, *Semigroup Forum*, **91** (2015), 238–259.

[12] Ö. J. Rödseth, On a linear Diophantine problem of Frobenius, *J. Reine Angew. Math.* **301**, (1978) 171–178.

[13] R. Fröberg, C. Gottlieb, and R. Häggkvist, On numerical semigroups, *Semigroup Forum* **35** (1987), 63–83.

[14] S. M. Johnson, A Linear Diophantine Problem, *Can. J. Math.* **12** (1960), 390–398.

[15] S. S. Batra, N. Kumar, and A. Tripathi, Some problems concerning the Frobenius number for extensions of an arithmetic progression, *The Ramanujan Journal* **48** (2019), 545–565.