1 Introduction

The n-th cyclotomic polynomial is the minimal polynomial of any primitive n-th root of unity

$$\begin{aligned} \Phi _n(x) = \prod _{\begin{array}{c} j=1 \\ (j,n) = 1 \end{array}}^n \left( x - e^{2 \pi i j / n} \right) = \sum _{k=0}^{\varphi (n)} a_n(k) x^k, \end{aligned}$$
(1)

where \(\varphi \) is Euler’s totient function. It is of degree \(\varphi (n)\) and has integer coefficients.

Let \(\mathbb {N}\) denote the set of non-negative integers. A numerical semigroup S is an additive submonoid of \(\mathbb {N}\) with finite complement in \(\mathbb {N}\). The semigroup polynomial of S is defined by \(\mathrm {P}_S(x) = 1 + (x-1) \sum _{g \in \mathbb {N} \setminus S} x^g\). If \(p \ne q\) are primes and \(\langle p,q \rangle \) is the numerical semigroup generated by p and q, then

$$\begin{aligned} \Phi _{pq}= \mathrm {P}_{\langle p,q \rangle }, \end{aligned}$$
(2)

see for instance [11]. This identity can be used to reprove various properties of cyclotomic polynomials, e.g., that \(a_{pq}(k) \in \{ 0,1,-1 \}\), a result due to Migotti [9]. More generally, if p and q are two coprime non-negative integers, then \(\mathrm {P}_{\langle p,q \rangle }\) is a product of cyclotomic polynomials. There are various other interesting infinite families of numerical semigroups such that their semigroup polynomial has only cyclotomic factors. These facts led Ciolan, García-Sánchez and Moree [11] to define cyclotomic numerical semigroups as numerical semigroups whose semigroup polynomial is a product of cyclotomic polynomials. For this family of numerical semigroups it is easy to see that the following implications hold:

$$\begin{aligned} \text {complete intersection} \Longrightarrow \text {cyclotomic} \Longrightarrow \text {symmetric} \end{aligned}$$
(3)

(see Sect. 2.4). The converse of the second implication of (3) is far from true. In fact, for any odd integer F with \(F \ge 9\), there is a numerical semigroup with Frobenius number F that is symmetric and non-cyclotomic. This was proven independently by García-Sánchez (in the appendix of [7]), Herrera-Poyatos and Moree [7] and Sawhney and Stoner [13]. In the latter two papers it is shown (by quite different methods) that, for every \(k \ge 5\), the polynomial

$$\begin{aligned} 1-x+x^k-x^{2k-1}+x^{2k}, \end{aligned}$$

which is the semigroup polynomial of the symmetric numerical semigroup \(S_k = \langle k,k+1,\dots ,2k-2 \rangle \), is not a product of only cyclotomic polynomials. Therefore, \(S_k\) is symmetric, but not cyclotomic. It was conjectured by Ciolan, García-Sánchez and Moree [4] that the converse of the first implication in (3) holds true, more precisely they made the following conjecture.

Conjecture 1.1

[4, Conjecture 1]. A numerical semigroup S is cyclotomic if and only if it is complete intersection.

Using the GAP package [5] the authors of [4] verified that Conjecture 1.1 holds true for numerical semigroups with Frobenius number up to 70. Further, in the context of graded algebras, Borzì and D’Alì [2] prove a version of Conjecture 1.1 for Koszul algebras and for graded algebras that have an irreducible h-polynomial.

In this paper we classify all cyclotomic numerical semigroups such that their semigroup polynomial has at most two irreducible polynomial factors.

Theorem 1.2

Let S be a cyclotomic numerical semigroup.

  1. 1.

    If \(\mathrm {P}_S\) is irreducible, then \(S=\langle p,q\rangle \) with \(p \ne q\) primes and \(\mathrm {P}_S = \Phi _{pq}\).

  2. 2.

    If \(\mathrm {P}_S\) is a product of two irreducible polynomials, then either

    1. (a)

      \(S=\langle p,q^2\rangle \) with pq distinct primes and \(\mathrm {P}_S= \Phi _{pq}\Phi _{pq^2}\); or

    2. (b)

      \(S=\langle p, q^2,qr\rangle \) with pqr distinct primes such that \(p \in \langle q, r \rangle \) and \(\mathrm {P}_S= \Phi _{pq} \Phi _{q^2r}\).

As a byproduct, since the numerical semigroups obtained in Theorem 1.2 are easily seen to be complete intersections with the help of gluings (see Sect. 2), Conjecture 1.1 holds true in the cases studied in Theorem 1.2.

Theorem 1.3

Suppose that the semigroup polynomial \(\mathrm {P}_S\) has at most two irreducible factors. Then S is cyclotomic if and only if it is complete intersection.

Theorem 1.2 motivates the following definition. We define the polynomial length \(\ell (S)\) of S as the number of irreducible factors of \(\mathrm {P}_S\) (with multiplicity). We study this quantity in Sect. 5.1.

Our paper is organised as follows. In Sect. 2 we gather some preliminary material that is partly expository and will be useful further on. In Sect. 3 we prove part 1 of Theorem 1.2, and in Sect. 4 we prove part 2. Finally, in Sect. 5 we pose some conjectures involving the polynomial length of cyclotomic numerical semigroups.

The computer algebra computations in this paper were done by using Macaulay2 [6], the GAP system [16] and, in particular, the NumericalSgps package [5].

2 Preliminaries

2.1 Numerical semigroups and Hilbert series

For an introduction to numerical semigroups, see [12].

Let S be a numerical semigroup. The embedding dimension \(\mathrm {e}(S)\) of S is the cardinality of the (unique) minimal generating system of S. The Frobenius number of S is \(\mathrm {F}(S) = \max (\mathbb {Z} \setminus S)\). For example, if \(S = \langle a,b \rangle \) with \(b>a>1\) coprime integers, then \(\mathrm {F}(S)+1 = (a-1)(b-1)\) (see for instance [12, Proposition 2.13]). This fact in combination with the observation that if \(T \subseteq S\) are two numerical semigroups, then clearly \(\mathrm {F}(S) \le \mathrm {F}(T)\), proves the following lemma.

Lemma 2.1

If \(a,b \in S\) with \(\gcd (a,b)=1\), then \(\mathrm {F}(S)+1 \le (a-1)(b-1)\).

The Hilbert series of S is

$$\begin{aligned} \mathrm {H}_S(x) = \sum _{s \in S} x^s \in \mathbb {Z}[[x]], \end{aligned}$$

and the semigroup polynomial of S is

$$\begin{aligned} \mathrm {P}_S(x) = (1-x)\mathrm {H}_S(x) = 1 + (x-1) \sum _{g \in \mathbb {N} \setminus S}x^g. \end{aligned}$$
(4)

Note that \(\deg \mathrm {P}_S= \mathrm {F}(S)+1\). The second equality in (4) easily follows from \(\mathrm {H}_S(x) + \sum _{g \in \mathbb {N} \setminus S}x^g = 1/(1-x),\) where here and in the sequel we work in \(\mathbb {Z}[[x]]\) and use the shorthand \(1/(1-x)\) for \(1+x+x^2+x^3+\cdots .\)

Some properties of a numerical semigroup, such as symmetry, can be captured in terms of its semigroup polynomial. We need some notation in order to characterize symmetry in this way. A numerical semigroup S is symmetric if for every integer n we have that \(n \in S\) if and only if \(\mathrm {F}(S)-n \notin S\). A polynomial \(f(x) = \sum _{i=0}^d \alpha _i x^i \in \mathbb {Z}[x]\) is palindromic (or self-reciprocal) if \(f(x) = x^d f(x^{-1})\), that is, its coefficients \(\alpha _i\) satisfy the relation \(\alpha _i=\alpha _{d-i}\).

Theorem 2.2

[11, Theorem 5]. A numerical semigroup S is symmetric if and only if \(\mathrm {P}_S\) is palindromic.

2.2 Complete intersection numerical semigroups

Let \(S_1,S_2\) and S be numerical semigroups, and let \(a_1 \in S_2\) and \(a_2 \in S_1\) be coprime integers such that they are not minimal generators of their respective semigroups. We say that S is a gluing of \(S_1\) and \(S_2\) at \(a_1a_2\) if \(S=a_1 S_1 + a_2 S_2\) and we write \(S = a_1S_1 +_{a_1a_2} a_2S_2\). We will keep this notation until the end of this section. By [12, Lemma 9.8] we have that

$$\begin{aligned} \mathrm {e}(S) = \mathrm {e}(S_1) + \mathrm {e}(S_2). \end{aligned}$$
(5)

Let M be a submonoid of \(\mathbb {N}\), and let \(m \in M \setminus \{0\}\). The Apéry set of M at m is the set

$$\begin{aligned} {{\,\mathrm{{\text {Ap}}}\,}}(M,m) = \{ v \in M : v-m \notin M \}. \end{aligned}$$

Gluings can be characterised in terms of Apéry sets as in Lemma 2.3.

Lemma 2.3

[12, Theorem 9.2]. The numerical semigroup S is the gluing of \(S_1\) and \(S_2\) at \(m = a_1a_2\), if and only if the map

$$\begin{aligned} {{\,\mathrm{{\text {Ap}}}\,}}(a_1 S_1, m) \times {{\,\mathrm{{\text {Ap}}}\,}}(a_2 S_2, m) \rightarrow {{\,\mathrm{{\text {Ap}}}\,}}(S,m) \end{aligned}$$

given by \((v,w) \mapsto v+w\) is bijective. If this is the case, then we have \({{\,\mathrm{{\text {Ap}}}\,}}(S,m) = {{\,\mathrm{{\text {Ap}}}\,}}(a_1 S_1, m) + {{\,\mathrm{{\text {Ap}}}\,}}(a_2 S_2, m)\).

Gluings can also be characterized in terms of semigroup polynomials on using

$$\begin{aligned} \sum _{w \in {{\,\mathrm{{\text {Ap}}}\,}}(S,m)} x^w = \left( 1-x^m \right) \mathrm {H}_S(x), \end{aligned}$$
(6)

which follows from \(S = {{\,\mathrm{{\text {Ap}}}\,}}(S,m) + m \mathbb {N}\) [12, Lemma 2.6].

Proposition 2.4

[1, Corollary 4.4]. The following statements are equivalent:

  1. 1.

    \(S = a_1 S_1 +_{a_1a_2} a_2 S_2\);

  2. 2.

    \(\mathrm {H}_S(x) = (1-x^{a_1a_2})\mathrm {H}_{S_1}(x^{a_1})\mathrm {H}_{S_2}(x^{a_2})\);

  3. 3.

    \(\mathrm {P}_S(x) = \mathrm {P}_{\langle a_1,a_2 \rangle }(x)\mathrm {P}_{S_1}(x^{a_1})\mathrm {P}_{S_2}(x^{a_2})\).

Proof

The equivalence of (2) and (3) is trivial, so we just need to prove the equivalence of (1) and (2). From Lemma 2.3 we infer that \(S = a_1 S_1 +_{a_1a_2} a_2 S_2\) if and only if

$$\begin{aligned} \sum _{w \in {{\,\mathrm{{\text {Ap}}}\,}}(S,a_1a_2)} x^w= & {} \sum _{w_1 \in {{\,\mathrm{{\text {Ap}}}\,}}(a_1S_1,a_1a_2)}\sum _{w_2 \in {{\,\mathrm{{\text {Ap}}}\,}}(a_2S_2,a_1a_2)} x^{w_1+w_2} = \\= & {} \left( \sum _{w_1 \in {{\,\mathrm{{\text {Ap}}}\,}}(S_1,a_2)} x^{a_1w_1} \right) \left( \sum _{w_2 \in {{\,\mathrm{{\text {Ap}}}\,}}(S_2,a_1)} x^{a_2w_2} \right) . \end{aligned}$$

Now apply (6) and divide both sides by \(1-x^{a_1a_2}.\) \(\square \)

Complete intersection numerical semigroups are usually introduced in the context of minimal presentations [12, Chapter 8], where a numerical semigroup S is said to be complete intersection if the cardinality of a minimal presentation of S is equal to \(\mathrm {e}(S)-1\). In this paper we will only need the recursive characterisation of complete intersection numerical semigroups in terms of gluings.

Theorem 2.5

[12, Theorem 9.10]. A numerical semigroup is complete intersection if and only if S is \(\mathbb {N}\) or S is a gluing of two complete intersection numerical semigroups.

Using this characterisation in terms of gluings along with Proposition 2.4 one can determine the Hilbert series of S as follows.

Corollary 2.6

[1, Theorem 4.8]. Let \(S = \langle n_1,\dots ,n_e \rangle \) be a complete intersection numerical semigroup. Then there are \(d_1, \ldots , d_{e-1} \in S \setminus \{n_1, \ldots , n_e\}\) such that

$$\begin{aligned} \mathrm {H}_S(x) = \frac{(1-x^{d_1}) \dots (1-x^{d_{e-1}})}{(1-x^{n_1}) \dots (1-x^{n_e})}. \end{aligned}$$

The integers \(d_i\) in the previous result are actually the Betti elements of S (with multiplicity). We refer to [12, Chapter 7] for a definition of Betti element, which will be needed only in Sect. 5. If \(\mathrm {e}(S)=2\), so \(S = \langle a,b \rangle = a \mathbb {N} +_{ab} b \mathbb {N}\), then Corollary 2.6 and the fact that \(\deg \mathrm {P}_S = \mathrm {F}(S) = (a-1)(b-1)\) yield

$$\begin{aligned} \mathrm {P}_{\langle a,b\rangle }(x)=\frac{(1-x)(1-x^{ab})}{(1-x^a)(1-x^b)}. \end{aligned}$$
(7)

In the case when \(\mathrm {e}(S) = 3\), we have the following result due to Herzog.

Theorem 2.7

[8, Theorem 4.2.1]. Let S be a numerical semigroup. If \(\mathrm {e}(S) = 3\), then S is complete intersection if and only if it is symmetric.

2.3 Cyclotomic polynomials

For an introduction to cyclotomic polynomials, see [15].

From the definition (1) we have

$$\begin{aligned} x^n-1 = \prod _{d \mid n} \Phi _d(x). \end{aligned}$$
(8)

This in combination with (7) yields for example that

$$\begin{aligned} \mathrm {P}_{\langle a,b\rangle }=\prod _{\begin{array}{c} d|ab,~d\not \mid a,~d\not \mid b \end{array}}\Phi _{d}. \end{aligned}$$
(9)

An important property of the cyclotomic polynomials is that they are irreducible over the rationals, several famous mathematicians gave different proofs of this, cf. Weintraub [17]. Hence, (8) gives the factorization of \(x^n-1\) into irreducibles.

By the so called Möbius inversion formula (see [14, Proposition 3.7.1]) we infer from (8) that

$$\begin{aligned} \Phi _n(x) = \prod _{d \mid n} (x^d-1)^{\mu (n/d)}, \end{aligned}$$
(10)

where the Möbius function \(\mu \) is defined by

$$\begin{aligned} \mu (n) = {\left\{ \begin{array}{ll} 1 &{} n=1;\\ (-1)^k &{} n = p_1 \cdots p_k \text { with the }p_i \text { distinct primes};\\ 0 &{} \text {otherwise}. \end{array}\right. } \end{aligned}$$

By taking degrees in (10) we obtain \(\varphi (n)=\sum _{d|n}d\mu (n/d)\). If \(n > 1\), then \(\sum _{d \mid n} \mu (n/d) = 0\), so equation (10) can be rewritten as

$$\begin{aligned} \Phi _n(x) = \prod _{d \mid n} (1-x^d)^{\mu (n/d)}. \end{aligned}$$
(11)

Recall that a polynomial f of degree d is palindromic if \(f(x) = x^d f(x^{-1})\). As, for \(n>1\),

$$\begin{aligned} x^{\varphi (n)}\Phi _n \left( \frac{1}{x} \right) = x^{\sum _{d|n}d\mu (n/d)}\prod _{d \mid n} \left( 1-\frac{1}{x^d} \right) ^{\mu (n/d)}=\prod _{d \mid n} (x^d-1)^{\mu (n/d)}=\Phi _n(x), \end{aligned}$$
(12)

we see that \(\Phi _n(x)\) is palindromic for \(n>1\).

It follows from (11) that for \(n>1\) we have \(\Phi _n(0)=1\) and

$$\begin{aligned} \Phi _n(x) \equiv 1-\mu (n)x\,\,(\mathrm{mod ~}x^2). \end{aligned}$$
(13)

Let r be any natural number. Using (10) and the fact that the Möbius function is only supported on squarefree integers, we see that

$$\begin{aligned} \Phi _{nr^2}(x) = \prod _{d \mid nr^2} (x^{nr^2/d}-1)^{\mu (d)}= \prod _{d \mid nr} ((x^r)^{nr/d}-1)^{\mu (d)}, \end{aligned}$$

and so

$$\begin{aligned} \Phi _{nr^2}(x) = \Phi _{nr}(x^r). \end{aligned}$$
(14)

2.4 Cyclotomic numerical semigroups

A numerical semigroup S is cyclotomic if \(\mathrm {P}_S\) is a product of cyclotomic polynomials, that is, \(\mathrm {P}_S=\prod _{d \in \mathcal {D}} \Phi _d^{f_d}\), for some finite set \(\mathcal {D}\), with \(f_d\ge 1\). As \(\mathrm {P}_S(1)=1,\) \(\Phi _1\) does not appear in this product.

Corollary 2.6 gives rise to the following result of Ciolan et al. [4].

Corollary 2.8

Every complete intersection numerical semigroup is cyclotomic.

Proof

By Corollary 2.6 and (8) we have \(\mathrm {P}_S(x)=(1-x)\mathrm {H}_S(x)=\prod \Phi _n(x)^{f_n},\) with possibly \(f_n<0.\) However, this would imply that \(\mathrm {P}_S(x)\) has a pole at \(x=e^{2\pi i/n},\) contradicting the fact that \(\mathrm {P}_S\) is a polynomial. \(\square \)

Observe that the product of two palindromic polynomials is palindromic. Hence, by applying Theorem 2.2 and recalling that \(\Phi _n\) is palindromic for \(n>1\) (see Sect. 2.3), we reach the following conclusions.

Corollary 2.9

[4, Theorem 1]. Every cyclotomic numerical semigroup is symmetric.

Corollary 2.10

[4, Lemma 7]. Conjecture 1.1 holds true for those S with \(\mathrm {e}(S)\le 3\).

Proof

This follows from Corollary 2.9 and Theorem 2.7. \(\square \)

To conclude this section, we note that the cyclotomicity of numerical semigroups is preserved under gluing.

Corollary 2.11

If S is the gluing of \(S_1\) and \(S_2\) at \(a_1a_2\), then S is cyclotomic if and only if both \(S_1\) and \(S_2\) are cyclotomic.

Proof

This follows from Proposition 2.4. \(\square \)

3 Cyclotomic numerical semigroups of polynomial length 1

In this section we classify cyclotomic numerical semigroups having irreducible semigroup polynomial. They are given in Corollary 3.3.

Lemma 3.1

Let S be a numerical semigroup such that \(\Phi _n\) divides \(\mathrm {P}_S\) for some n. If \(p, q \in S\) are two different primes dividing n, then \(S = \langle p,q\rangle \) and \(\mathrm {P}_S = \Phi _{pq}\).

Proof

Recall that \(\deg \Phi _n = \varphi (n)\), see (1), and \(\deg \mathrm {P}_S = \mathrm {F}(S)+1\). Hence,

$$\begin{aligned} (p-1)(q-1) \le \varphi (n) \le \deg \mathrm {P}_S = \mathrm {F}(S)+1. \end{aligned}$$

By Lemma 2.1, with \(a = p\) and \(b = q\), it follows that

$$\begin{aligned} (p-1)(q-1) \le \varphi (n) \le \mathrm {F}(S)+1 \le (p-1) (q-1), \end{aligned}$$

and we conclude that \(\mathrm {P}_S = \Phi _n\) and \(\varphi (n) = \varphi (p q)\). Writing \(n=kpq\) we have \(\varphi (pq)=\varphi (n)=\varphi (kpq)\ge \varphi (k)\varphi (pq)\) and hence \(\varphi (k)=1,\) implying \(k=1\) or \(k=2\). Consequently, \(n = pq\) or \(n = 2pq\). From (13) and the equality \(\mathrm {P}_S(x) \equiv \Phi _{n}(x)\,\,(\mathrm{mod ~}x^2),\) we obtain \(\mu (n) = 1\). Therefore \(n = pq\) and \(\mathrm {P}_S = \Phi _{p q}\). By (2) we conclude that \(S =\langle p, q\rangle \). \(\square \)

Theorem 3.2

Let S be a numerical semigroup. Let jh and n be positive integers such that \(\mathrm {P}_S(x)=\Phi _n(x^j)^h\). Then \(S=\langle p,q\rangle \) with \(p \ne q\) primes, \(n=pq\) and \(j=h=1.\)

Proof

On the one hand we have \(\mathrm {P}_S(x) \equiv 1 - x\,(\mathrm{mod}~x^2)\), and on the other \(\Phi _n(x^j)^h\equiv 1 - \mu (n)hx^j\,(\mathrm{mod}~x^{2j}).\) We conclude that \(\mu (n)=j=h=1\), so \(\mathrm {P}_S(x) = \Phi _n(x)\). From \(1=\mathrm {P}_S(1)=\Phi _n(1)\) we infer \(n\ge 2\). Thus n is a product of an even number of distinct primes \(p_1< p_2< \dots < p_{2k},\) that is \(n=p_1\cdots p_{2k}\). From (11) and the fact that if d|n, then \(\mu (n/d)=\mu (d)\), we obtain

$$\begin{aligned} \Phi _n(x) \prod _{\begin{array}{c} d \mid n\\ \mu (d) = -1 \end{array}} (1-x^d) = \prod _{\begin{array}{c} d \mid n\\ \mu (d) = 1 \end{array}} (1-x^d). \end{aligned}$$
(15)

Recall that \(\Phi _n(x) = \mathrm {P}_S(x)=(1-x) \mathrm {H}_S(x)\). On dividing both sides of (15) by \(1-x\) and reducing the resulting identity modulo \(x^{p_2+1}\), we find that

$$\begin{aligned} (1 - x^{p_1}) (1 - x^{p_2}) \mathrm {H}_S(x) \equiv 1\,\,(\mathrm{mod}~x^{p_2+1}), \end{aligned}$$

which can be rewritten as

$$\begin{aligned} \mathrm {H}_S(x) \equiv 1 + x^{p_1}\mathrm {H}_S(x) + x^{p_2}\mathrm {H}_S(x)\,\,(\mathrm{mod}~x^{p_2+1}). \end{aligned}$$

We deduce that both \(p_1\) and \(p_2\) are in S and so \(S = \langle p_1, p_2\rangle \) by Lemma 3.1. \(\square \)

Corollary 3.3

(Part 1 of Theorem 1.2). A cyclotomic numerical semigroup S has irreducible semigroup polynomial if and only if for some distinct primes p and q we have \(S=\langle p,q\rangle \) (and so \(\mathrm {P}_S=\Phi _{pq}\)).

4 Cyclotomic numerical semigroups of polynomial length 2

In this section we classify the cyclotomic numerical semigroups with polynomial length 2, as it was announced in part 2 of Theorem 1.2. As a consequence of this result, it follows that every cyclotomic numerical semigroup with polynomial length 2 is complete intersection. Our proof of part 2 of Theorem 1.2 uses the following three lemmas.

Lemma 4.1

Let S be a cyclotomic numerical semigroup. Hence

$$\begin{aligned} \mathrm {P}_S(x) = \prod _{d \in \mathcal {D}} \Phi _d(x)^{f_d} \end{aligned}$$

for some finite set of positive integers \(\mathcal {D}\) and positive integers \(f_d\). Then we have

$$\begin{aligned} \sum _{d\in {\mathcal D}}f_d\,\mu (d) = 1. \end{aligned}$$

In particular, there exists an integer \(d>1\) such that \(\mu (d) = 1\) and \(\Phi _d \mid \mathrm {P}_S\).

Proof

Since \(\mathrm {P}_S(1) = 1\), we have \(1 \not \in \mathcal {D}\). In view of (13), we obtain

$$\begin{aligned} \mathrm {P}_S(x) \equiv 1-x\sum _{d\in \mathcal D}f_d\,\mu (d) \,\,(\mathrm{mod ~}x^2). \end{aligned}$$

Recalling that \(\mathrm {P}_S(x) \equiv 1 - x\,(\mathrm{mod}~x^2)\), it follows that \(1=\sum _{d\in {\mathcal D}}f_d\,\mu (d)\), and also that there must be some integer \(d>1\) in \(\mathcal {D}\) with \(\mu (d) = 1\). \(\square \)

Lemma 4.2

Let S be a numerical semigroup such that

$$\begin{aligned} \mathrm {P}_S(x) = \Phi _n(x) f(x^q) \end{aligned}$$
(16)

for some integers \(n,q>1\) such that \(\mu (n) = 1\) and \(f(x)\in \mathbb Z[x]\) is of positive degree. Then q is a prime number and \(n = p q\) for some other prime \(p \in S\).

Proof

Since \(\mu (n)=1\) by assumption, we can write \(n=p_1\cdots p_{2k}\) with \(p_1< p_2< \dots < p_{2k}\) primes. Using (11) and reducing the resulting expression modulo \(x^{p_2 + 1}\) we obtain from (16)

$$\begin{aligned} \mathrm {H}_S(x) (1 - x^{p_1})(1 - x^{p_2}) \equiv f(x^q)\,\,(\mathrm{mod}~x^{p_2+1}), \end{aligned}$$

which can be rewritten as

$$\begin{aligned} \mathrm {H}_S(x) \equiv f(x^q) + x^{p_1}\mathrm {H}_S(x) + x^{p_2}\mathrm {H}_S(x)\,\,(\mathrm{mod}~x^{p_2+1}). \end{aligned}$$
(17)

Since \(p_1\) and \(p_2\) can not belong to S at the same time by Lemma 3.1, we see that \(f(x^q)\) contains a monomial with exponent \(p_1\) or \(p_2\). Consequently, q divides \(p_1\) or \(p_2\), that is, \(q \in \{p_1, p_2\}\). Furthermore, if \(p \in \{p_1, p_2\} \setminus \{q\}\), then q does not divide p and we find that \(p \in S\) by (17). Note that \(\{p_1, p_2\} = \{p, q\}.\)

It remains to show that \(n=p_1 p_2=pq\). In order to obtain a contradiction we assume that \(k > 1\). Using (11) and reducing the resulting expression modulo \(x^{p_3 + 1},\) we obtain from (16)

$$\begin{aligned} \mathrm {H}_S(x) (1 - x^{p})(1 - x^q)(1 - x^{p_3}) \equiv f(x^q) (1 - x^{pq})\,\,(\mathrm{mod}~x^{p_3+1}), \end{aligned}$$

which can be simplified to

$$\begin{aligned} \mathrm {H}_S(x) \equiv x^{p}\mathrm {H}_S(x) + x^{p_3} \mathrm {H}_S(x) + f(x^q) \frac{(1-x^{pq})}{(1-x^q)} \pmod {x^{p_3 + 1}}. \end{aligned}$$
(18)

Note that

$$\begin{aligned} f(x^q) \frac{(1-x^{pq})}{(1-x^q)} = g(x^q), \end{aligned}$$

for some \(g(x)\in \mathbb Z[x].\) Since q does not divide \(p_3\), we must have \(p_3 \in S\) in view of (18). Since \(p \in S\) and \(p \cdot p_3\) divides n, we conclude by Lemma 3.1 that \(S = \langle p,p_3 \rangle \) and hence \(\mathrm {P}_S=\Phi _{pp_3}\) is irreducible, whereas by assumption it has at least two irreducible factors. \(\square \)

Lemma 4.3

Let S be a numerical semigroup such that

$$\begin{aligned} \mathrm {P}_S(x) = \Phi _{pq}(x) \Phi _{l}(x^q) \end{aligned}$$

for some distinct prime numbers p and q, and with l a multiple of q. Then either

  1. 1.

    \(S=\langle p,q^2\rangle \) and \(l = pq\); or

  2. 2.

    \(S=\langle p, q^2,qr\rangle \) for some prime number r such that \(r \not \in \{p, q\}\) and \(p \in \langle q, r \rangle \), and \(l= qr\).

Proof

We can write

$$\begin{aligned} \mathrm {H}_S(x) = \Phi _l(x^q) \frac{1 - x^{pq}}{(1 - x^q) (1 - x^p)} = \frac{\Phi _l(x^q)}{1 - x^q} \sum _{i = 0}^{q-1} x^{ip}. \end{aligned}$$
(19)

Note that \(\Phi _l(x) / (1 -x)\in \mathbb {Z}[[x]].\) We write it as \(\sum _{j = 0}^\infty a_j x^j.\) We consider \(S' = \{j \in \mathbb {N} : a_j \ne 0\}\). Since \(\Phi _l(0) = 1\), it follows that \(a_0=1\) and hence \(0 \in S'\). We are going to prove that \(S'\) is a numerical semigroup with \(\mathrm {P}_{S'} = \Phi _l\). Equation (19) can be rewritten in \(\mathbb {Z}[[x]]\) as

$$\begin{aligned} \mathrm {H}_S(x) = \left( \sum _{j = 0}^\infty a_j x^{jq}\right) \left( \sum _{i = 0}^{q-1} x^{ip}\right) = \sum _{j = 0}^\infty a_j \sum _{i = 0}^{q-1} x^{jq+ip}. \end{aligned}$$
(20)

Since p and q are prime numbers, if \(jq+ip = j'q+i'p\) with \(j, j' \in \mathbb {N}\) and \(i, i' \in \{0, 1, \ldots , q-1\}\), then \(i = i'\) and \(j = j'\). Consequently, \(a_j\) is the qj-th coefficient of \(\mathrm {H}_S\) and hence \(a_j \in \{0,1\}\). Note that \(j \in S'\) if and only if \(qj \in S\). Since S is a numerical semigroup, we see that \(S'\) is closed under addition. Furthermore, we have \((1-x)\mathrm {H}_{S'}(x) = \Phi _l(x)\). As a consequence, \(S'\) is a numerical semigroup with polynomial \(\Phi _l\). By Theorem 3.2 and the assumption \(q\mid l,\) we obtain \(l = q r\), where r is a prime number different from q, and \(S' = \langle q,r\rangle \). Summarizing, we have \(\mathrm {P}_S(x) = \Phi _{pq}(x) \Phi _{q r}(x^q) = \Phi _{pq}(x) \Phi _{q^2 r}(x)\), where we used (14), and \(\mathrm {H}_S(x) = \mathrm {H}_{S'}(x^q) \sum _{i = 0}^{q-1} x^{ip}\). From the latter equality, we obtain \(S = qS' + p \mathbb {N}\). There are two possibilities:

  • \(r = p\). Then \(\mathrm {P}_S = \Phi _{pq} \Phi _{pq^2} = \mathrm {P}_{\langle p, q^2 \rangle }\), where in the latter equality we used (9). That is, \(S = \langle p, q^2 \rangle \).

  • \(r \ne p\). Then \(S = q\langle r,q\rangle +_{q p} p \mathbb {N}\) is a gluing and, thus, \(S = \langle p, q^2, qr \rangle \). \(\square \)

Proof of part 2 of Theorem 1.2

By Lemma 4.1, our assumption \(\ell (S)=2\) implies that we can write \( \mathrm {P}_S = \Phi _n \Phi _m\text {~with~}\mu (n) = 1\text {~and~} \mu (m) = 0. \) Let q be the smallest prime such that \(q^2\mid m\) and put \(l=m/q.\) On applying (14) we find

$$\begin{aligned} \mathrm {P}_S(x) = \Phi _n(x) \Phi _l(x^{q}). \end{aligned}$$
(21)

Note that \(n,l>1.\) By Lemma 4.2 it now follows that \(\mathrm {P}_S(x) = \Phi _{pq}(x) \Phi _l(x^{q})\) for some prime \(p\ne q.\) The proof is completed on invoking Lemma 4.3 (note that \(q\mid l\)). \(\square \)

5 Some interconnected conjectures

5.1 Polynomial length of cyclotomic numerical semigroups

Let S be a numerical semigroup. Recall that we define the polynomial length \(\ell (S)\) of S as the number of irreducible factors of \(\mathrm {P}_S\) (with multiplicity). If \(q>p\) are two primes we have \(\mathrm {P}_{\langle p, q \rangle }(x) = \Phi _{pq}(x)\) by (2) and hence the polynomial length of \(\langle p, q \rangle \) is 1. This observation is generalized in Example 5.1. This example involves some more notation that we now introduce. Let \(d(n)=\sum _{d|n}1\) denote the number of positive divisors of n. We have \(d(ab) \le d(a)d(b)\) with equality if a and b are coprime. By ir(f) we denote the number of irreducible prime factors of f,  and so \(\ell (S)=\text {ir}(\mathrm {P}_S).\) A fundamental observation we will use is that

$$\begin{aligned} \text {ir}(x^n-1)=d(n) \end{aligned}$$
(22)

(this is a consequence of (8) and the irreducibility of cyclotomic polynomials). Using this and (10) we obtain the (known) identity

$$\begin{aligned} \text {ir}(\Phi _n)=1=\sum _{\delta \mid n}d(\delta )\,\mu (n/\delta ). \end{aligned}$$

If S is complete intersection with minimal generators \(n_1, \ldots , n_e\), and Betti elements \(b_1, \ldots , b_{e-1}\) (with multiplicity), then from Corollary 2.6 and (22) we have

$$\begin{aligned} \ell (S)= \sum _{j = 1}^{e-1} d(b_j) - \sum _{j = 1}^{e} d(n_j) + 1. \end{aligned}$$
(23)

Example 5.1

Let \(b>a>1\) be coprime integers. The only Betti element of \(\langle a, b \rangle \) is ab, see (7), so we have

$$\begin{aligned} \mathrm {ir}(\mathrm {P}_{\langle a,b\rangle }(x))= d(ab) - d(a) - d(b) + 1. \end{aligned}$$

From (7) and the multiplicativity of the sum of divisors function d we find that

$$\begin{aligned} l(\langle a,b\rangle )=(d(a)-1)(d(b)-1). \end{aligned}$$

If \(S = a_1 S_1 +_{a_1a_2} a_2 S_2\), then from Proposition 2.4 and the latter example, we obtain the inequality

$$\begin{aligned} \ell (S) \ge \ell (S_1) + \ell (S_2) + (d(a_1)-1)(d(a_2)-1). \end{aligned}$$
(24)

Remark 5.2

This lower bound is sharp. Let \(S_1 = \left<2, 3 \right>\) and \(S_2 = \left<5, 7 \right>\). Recall that \(S_1\) and \(S_2\) have length 1 (Corollary 3.3). We consider the following gluing of \(S_1\) and \(S_2\), \(S = 12 \, \langle 2, 3 \rangle + 5 \, \langle 5, 7 \rangle \). Then the polynomial of S is \(\mathrm {P}_{\langle 12, 5 \rangle }(x) \Phi _6(x^{12}) \Phi _{35}(x^5)\). Applying (14) with \(r=5\) and \(n=7\) we see that \(\Phi _{35}(x^5)=\Phi _{175}(x)\). Further, by repeated application of (14) we conclude that \(\Phi _6(x^{12})=\Phi _6((x^4)^3)=\Phi _{18}(x^4)=\Phi _{18}((x^2)^2)=\Phi _{36}(x^2)=\Phi _{72}(x).\) It follows that

$$\begin{aligned} \mathrm {P}_S(x) = \mathrm {P}_{\langle 12, 5 \rangle }(x) \Phi _{72}(x) \Phi _{175}(x), \end{aligned}$$

and \(\ell (S) = (d(12)-1)(d(5) - 1) + \ell (S_1) + \ell (S_2) = 7\).

Proposition 5.3

If S is a complete intersection numerical semigroup, then we have \(\mathrm {e}(S) \le \ell (S) + 1\).

Proof

We proceed by induction on \(\mathrm {e}(S)\). If \(\mathrm {e}(S) = 2\), then the result is trivial. Now let us assume that the result is true for every numerical semigroup with embedding dimension smaller than \(\mathrm {e}(S) > 2\). The numerical semigroup S is a gluing of two complete intersection numerical semigroups \(S_1\) and \(S_2\) by Theorem 2.5. From (5), our induction hypothesis, and (24) we have

$$\begin{aligned} \mathrm {e}(S) = \mathrm {e}(S_1) + \mathrm {e}(S_2) \le \ell (S_1) + \ell (S_2) + 2 \le \ell (S) + 1. \end{aligned}$$

\(\square \)

The next result shows that the inequality in Proposition 5.3 is sharp.

Proposition 5.4

Let \(e \ge 2\) be an integer. For every \(l \ge e-1\) there exists a complete intersection numerical semigroup S such that \(\ell (S) = l\) and \(\mathrm {e}(S) = e\).

Proof

For every \(k \ge 1\), we inductively construct a family of numerical semigroups \(S^{(e)}_k\), such that \(e(S^{(e)}_k) = e\) and \(\ell (S^{(e)}_k) = e+k-2\), as follows:

  • \(S^{(2)}_k = \langle p_1^k,p_2 \rangle \) for some distinct primes \(p_1\) and \(p_2\);

  • \(S^{(e+1)}_k = p_1 S^{(e)}_k +_{p_{e+1}p_1} p_{e+1} \mathbb {N}\) for some prime \(p_{e+1} \in S^{(e)}_k\) that is not a minimal generator.

By (5) we conclude that

$$\begin{aligned} e(S^{(e)}_k) = e(S^{(e-1)}_k) + 1 = \dots = e(S^{(2)}_k) + e-2 = e. \end{aligned}$$

By Proposition 2.4 we have \(\mathrm {P}_{S^{(e)}_k}(x) = \mathrm {P}_{S^{(e-1)}_k}(x^{p_1})\, \Phi _{p_1p_e}(x)\). Applying this formula recursively we obtain

$$\begin{aligned} \mathrm {P}_{S^{(e)}_k}(x) = \mathrm {P}_{S^{(2)}_k}( x^{p_1^{e-2}} )\, \prod _{i=3}^{e} \Phi _{p_1p_i} ( x^{p_1^{e-i}} ). \end{aligned}$$

Now, inserting \(\mathrm {P}_{S^{(2)}_k}(x) = \prod _{j=1}^k \Phi _{p_1^jp_2}(x),\) which follows by (9), and applying (14), we infer that

$$\begin{aligned} \mathrm {P}_{S^{(e)}_k}(x) = \prod _{i=3}^{e} \Phi _{p_1^{e-i+1}p_i}(x) \,\prod _{j=1}^k \Phi _{p_1^{e+j-2} p_2}(x) , \end{aligned}$$

and hence \( \ell (S_k^{(e)}) = e+k-2\). \(\square \)

Conjecture 5.5

Let S be a cyclotomic numerical semigroup. Then

$$\begin{aligned} \mathrm {e}(S) \le \ell (S) + 1. \end{aligned}$$

Using Proposition 5.3 we see that

$$\begin{aligned} \text {Conjecture } 1.1\Longrightarrow \text {Conjecture } 5.5. \end{aligned}$$

Assuming Conjecture 5.5 holds true, the proof of Theorem 1.2 can be greatly simplified. Namely, by assumption \(\ell (S) \le 2\), so we would have \(\mathrm {e}(S) \le \ell (S) + 1 \le 3\) and hence S would be complete intersection by Corollary 2.10.

To conclude this section, we have computed all the cyclotomic numerical semigroups with Frobenius number at most 70, and classified them in terms of their polynomial length. These cyclotomic numerical semigroups are complete intersections, as it was computationally checked in [4], and there are 835 of them. The results are displayed in Table 1. The largest polynomial length found among these semigroups is 8. Recall that Sects. 3 and 4 of the present paper study cyclotomic numerical semigroups of polynomial length at most 2, which add up to 138 semigroups out of the 835 computed.

Table 1 Number of cyclotomic numerical semigroups with Frobenius number at most 70, grouped by their polynomial length

5.2 Cyclotomic exponent sequence

Given \(f(x)\in {\mathbb Z}[x]\) with \(f(0)=1\), there exist unique integers \(f_j\) such that the formal identity \(f(x)= \prod _{j = 1}^\infty \left( 1 - x^j\right) ^{f_j}\) holds, see [10, Lemma 1] or [3, Lemma 3.1]. In particular, since \(\mathrm {P}_S(0) = 1\), there exist unique integers \(e_j\) such that the formal identity

$$\begin{aligned} \mathrm {P}_S(x)= \prod _{j = 1}^\infty \left( 1 - x^j\right) ^{e_j} \end{aligned}$$
(25)

holds. The sequence \(\mathbf {e}=\{e_j\}_{j \in \mathbb {N}}\) is known as the cyclotomic exponent sequence of S. This sequence was introduced in [4, Section 6] and later studied in [3]. From (25) and the uniqueness of the exponents \(\mathbf {e}\), one can show that S is a cyclotomic numerical semigroup if and only if \(\mathbf {e}\) has only a finite number of non-zero elements, see [3, Proposition 2.4] for details. If this is the case, then, by (22), we obtain

$$\begin{aligned} \ell (S)= \sum _{j = 1}^{\infty } e_j \,d(j). \end{aligned}$$

This equality generalizes equation (23), which gives the length of a complete intersection numerical semigroup.

One of the main results of [3] is the following.

Theorem 5.6

[3, Theorem 1.1]. Let \(S\ne \mathbb N\) be a numerical semigroup and let \(\mathbf {e}\) be its cyclotomic exponent sequence. Then

  1. 1.

    \(e_1 = 1;\)

  2. 2.

    \(e_j = 0\) for every \(j \ge 2\) not in S

  3. 3.

    \(e_j = -1\) for every minimal generator j of S;

  4. 4.

    \(e_j = 0\) for every j in S that has only one factorization and is not a minimal generator.

As a consequence of this theorem, the set \(\{n \in \mathbb {N}: e_n < 0\}\) is a system of generators of S. In the case of cyclotomic numerical semigroups, the authors of [3] made the following conjecture.

Conjecture 5.7

[3, Conjecture 7.1]. Let S be a cyclotomic numerical semigroup and let \(\mathbf {e}\) be its cyclotomic exponent sequence. Then \(n \in \mathbb {N}\) is a minimal generator of S if and only if \(e_n < 0\).

The cyclotomic exponent sequence of a complete intersection numerical semigroup can be easily obtained from Corollary 2.6. Note that for these semigroups the only integers with \(e_n < 0\) are the minimal generators. Hence, as already noted in [3, Proposition 7.3], we have

$$\begin{aligned} \text {Conjecture } 1.1\Longrightarrow \text {Conjecture } 5.7. \end{aligned}$$

In the rest of this section we relate Conjectures 5.5 and 5.7. In order to do so, we formulate a further conjecture.

Conjecture 5.8

Let S be a cyclotomic numerical semigroup. Hence

$$\begin{aligned} \mathrm {P}_S(x) = \prod _{d \in \mathcal {D}} \Phi _d(x)^{f_d} \end{aligned}$$

for some finite set of positive integers \(\mathcal {D}\) and positive integers \(f_d\). Let \(\mathbf {e}\) the cyclotomic exponent sequence of S. Then

$$\begin{aligned} \{d \ge 2 : e_d > 0\} \subseteq \mathcal {D}, \end{aligned}$$

and \(e_d \le f_d\) for every \(d \ge 2\) with \(e_d > 0\).

In addition, we will need the following proposition, the proof of which we include for completeness.

Proposition 5.9

[3, Proposition 2.3]. Let S be a numerical semigroup and let \(\mathbf {e}\) be its cyclotomic exponent sequence. If S is cyclotomic, then \(\sum _{j \ge 1} e_j = 0\).

Proof

Let N be the largest index j such that \(e_j\ne 0.\) Then we have

$$\begin{aligned} {\text {P}}_S(x)= (1-x)^{\sum _{j\le N}e_j}G_S(x), \end{aligned}$$

for some rational function \(G_S(x)\) satisfying \(G_S(1)\not \in \{ 0, \infty \}\) (in fact \(G_S(1)=\prod _{j\le N}j^{e_j}\)). Since \({\text {P}}_S(1)=1\), it follows that \(\sum _{j\ge 1}e_j=0\). \(\square \)

Proposition 5.10

The following implications hold:

$$\begin{aligned} \text {Conjecture }1.1 \Longrightarrow \text {Conjecture } 5.7 \Longrightarrow \text {Conjecture } 5.8 \Longrightarrow \text {Conjecture } 5.5. \end{aligned}$$

Proof

The first implication follows from Corollary 2.6. Let S be a cyclotomic numerical semigroup and let \(n_1, \ldots , n_e\) be its minimal generators. Let us assume that S satisfies Conjecture 5.7. Then we have

$$\begin{aligned} \prod _{i = 1}^e (1-x^{n_i}) \,\mathrm {P}_S(x) = \prod _{d \in \mathbb {N}; \, e_d > 0} (1 - x^d)^{e_d} \end{aligned}$$

Let \(d \in \mathbb {N}\) with \(e_d > 0\) and \(d \ge 2\). We are going to prove that \(\Phi _d^{e_d}\) divides \(\mathrm {P}_S\). Recall that \(\Phi _d^{e_d}\) divides \((1-x^d)^{e_d}\) exactly. Now we argue that \(\Phi _d\) does not divide \(\prod _{i = 1}^e (1-x^{n_i})\). Note that \(\Phi _d\) divides \(\prod _{i = 1}^e (1-x^{n_i})\) if and only if there exists \(i \in \{1, 2, \ldots , e\}\) such that d divides \(n_i\). By Theorem 5.6 it follows that \(d \ne n_i\) and \(d \in S.\) Since by assumption \(n_i\) is a minimal generator of S, we conclude that d does not divide \(n_i\). This along with the fact that \(\Phi _d\) is irreducible allows us to conclude that \(\Phi _d^{e_d}\) exactly divides \(\mathrm {P}_S\) and, hence, \(e_d \le f_d\).

Now let us assume that S satisfies Conjecture 5.8. Since \(\{d \in \mathbb {N} : e_d < 0\}\) is a (finite) system of generators of S by Theorem 5.6, we find that

$$\begin{aligned} \mathrm {e}(S) \le \sum _{d \in \mathbb {N}; \, e_d < 0} (-e_d). \end{aligned}$$

From Proposition 5.9, we obtain

$$\begin{aligned} \sum _{d \in \mathbb {N}; \, e_d < 0} (-e_d) = \sum _{d \in \mathbb {N}; \, e_d > 0} e_d. \end{aligned}$$

Finally, because we are assuming that S satisfies Conjecture 5.8, we have

$$\begin{aligned} \mathrm {e}(S)\le \sum _{d \in \mathbb {N}; \, e_d > 0} e_d \le e_1 + \sum _{d \in \mathcal {D}} f_d = 1+\ell (S). \end{aligned}$$

We conclude that \(\mathrm {e}(S) \le \ell (S) + 1\). \(\square \)