Factorizations in Numerical Semigroups Denumerants, sets of factorizations, R-classes, and L-shapes are described in this section. ls is a list of integers and n an integer. The output is the set of factorizations of n in terms of the elements in the list ls. This function uses .
gap> FactorizationsIntegerWRTList(100,[11,13,15,19]); [ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ]
S is a numerical semigroup and n an element of S. The output is the set of factorizations of n in terms of the minimal generating set of S.
gap> s:=NumericalSemigroup(101,113,196,272,278,286);; gap> Factorizations(1100,s); [ [ 0, 8, 1, 0, 0, 0 ], [ 0, 0, 0, 2, 2, 0 ], [ 5, 1, 1, 0, 0, 1 ], [ 0, 2, 3, 0, 0, 1 ] ] gap> Factorizations(s,1100)=Factorizations(1100,s); true gap> FactorizationsElementWRTNumericalSemigroup(1100,s)=Factorizations(1100,s); true
S is a numerical semigroup and l a list of elements of S.

Computes the factorizations of all the elements in l.
gap> s:=NumericalSemigroup(10,11,13); <Numerical semigroup with 3 generators> gap> FactorizationsElementListWRTNumericalSemigroup([100,101,103],s); [ [ [ 0, 2, 6 ], [ 1, 7, 1 ], [ 3, 4, 2 ], [ 5, 1, 3 ], [ 10, 0, 0 ] ], [ [ 0, 8, 1 ], [ 1, 0, 7 ], [ 2, 5, 2 ], [ 4, 2, 3 ], [ 9, 1, 0 ] ], [ [ 0, 7, 2 ], [ 2, 4, 3 ], [ 4, 1, 4 ], [ 7, 3, 0 ], [ 9, 0, 1 ] ] ]
ls is a set of factorizations (a list of lists of nonnegative integers with the same length). The output is the set of \mathcal R-classes of this set of factorizations as defined in Chapter 7 of .
gap> s:=NumericalSemigroup(10,11,19,23);; gap> BettiElements(s); [ 30, 33, 42, 57, 69 ] gap> Factorizations(69,s); [ [ 5, 0, 1, 0 ], [ 2, 1, 2, 0 ], [ 0, 0, 0, 3 ] ] gap> RClassesOfSetOfFactorizations(last); [ [ [ 2, 1, 2, 0 ], [ 5, 0, 1, 0 ] ], [ [ 0, 0, 0, 3 ] ] ]
S is a numerical semigroup. The output is the number of LShapes associated to S. These are ways of arranging the set of factorizations of the elements in the Apéry set of the largest generator, so that if one factorization x is chosen for w and w-w'\in S, then only the factorization of x' of w' with x'\le x can be in the LShape (and if there is no such a factorization, then we have no LShape with x in it), see .
gap> s:=NumericalSemigroup(4,6,9);; gap> LShapes(s); [ [ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ], [ 2, 0 ], [ 1, 1 ], [ 0, 2 ], [ 2, 1 ], [ 1, 2 ], [ 2, 2 ] ], [ [ 0, 0 ], [ 1, 0 ], [ 0, 1 ], [ 2, 0 ], [ 1, 1 ], [ 3, 0 ], [ 2, 1 ], [ 4, 0 ], [ 5, 0 ] ] ] gap> LShapesOfNumericalSemigroup(s) = LShapes(s); true
S is a numerical semigroup, and f is a pseudo-Frobenius number of S.

The output is the list of RF-matrices associated to f. The ith row of each matrix contains the coefficients of a combination of f in terms of the minimal generators of the semigroup, obtained by substraction the ith generator to the factorizations of f plus the ith generator of S, see .
gap> s:=NumericalSemigroup(6, 7, 9, 10);; gap> RFMatrices(8,s); [ [ [ -1, 2, 0, 0 ], [ 1, -1, 1, 0 ], [ 0, 1, -1, 1 ], [ 3, 0, 0, -1 ] ], [ [ -1, 2, 0, 0 ], [ 1, -1, 1, 0 ], [ 0, 1, -1, 1 ], [ 0, 0, 2, -1 ] ] ]
S is a numerical semigroup and n a positive integer. The output is the number of factorizations of n in terms of the minimal generating set of S.
gap> s:=NumericalSemigroup(101,113,195,272,278,286);; gap> DenumerantOfElementInNumericalSemigroup(1311,s); 6
S is a numerical semigroup. The output is a function that for a given n computes the number of factorizations of n in terms of the minimal generating set of S.
gap> s:=NumericalSemigroup(101,113,195,272,278,286);; gap> DenumerantFunction(s)(1311); 6
S is a numerical semigroup and n a nonnegative integer. The output is the ideal of elements in S with more than n factorizations. If we add zero to this set, we obtain what is is called in an n-semigroup.
gap> s:=NumericalSemigroup(101,113,195,272,278,286);; gap> 1311 in DenumerantIdeal(6,s); false gap> 1311 in DenumerantIdeal(5,s); true
Invariants based on lengths This section is devoted to nonunique factorization invariants based on lengths of factorizations. There are some families of numerical semigroups related to maximal denumerantes; membership tests for these families are provede here. ls is a list of integers and n an integer. The output is the set of lengths of the factorizations of n in terms of the elements in ls.
gap> LengthsOfFactorizationsIntegerWRTList(100,[11,13,15,19]); [ 6, 8 ]
S is a numerical semigroup and n an element of S. The output is the set of lengths of the factorizations of n in terms of the minimal generating set of S.
gap> s:=NumericalSemigroup(101,113,196,272,278,286); <Numerical semigroup with 6 generators> gap> LengthsOfFactorizationsElementWRTNumericalSemigroup(1100,s); [ 4, 6, 8, 9 ]
S is a numerical semigroup and n an element of S. The output is the maximum length divided by the minimum length of the factorizations of n in terms of the minimal generating set of S.
gap> s:=NumericalSemigroup(101,113,196,272,278,286);; gap> e := Elasticity(1100,s); 9/4 gap> Elasticity(1100,s) = Elasticity(s,1100); true gap> ElasticityOfFactorizationsElementWRTNumericalSemigroup(1100,s)= e; true
S is a numerical semigroup. The output is the elasticity of S.
gap> s:=NumericalSemigroup(101,113,196,272,278,286);; gap> Elasticity(s); 286/101 gap> ElasticityOfNumericalSemigroup(s); 286/101
ls is list of integers. The output is the Delta set of the elements in ls, that is, the set of differences of consecutive elements in the list.
gap> LengthsOfFactorizationsIntegerWRTList(100,[11,13,15,19]); [ 6, 8 ] gap> DeltaSet(last); [ 2 ] gap> DeltaSetOfSetOfIntegers(last2); [ 2 ]
S is a numerical semigroup and n an element of S. The output is the Delta set of the factorizations of n in terms of the minimal generating set of S.
gap> s:=NumericalSemigroup(101,113,196,272,278,286);; gap> d := DeltaSet(1100,s); [ 1, 2 ] gap> DeltaSet(s,1100) = d; true gap> DeltaSetOfFactorizationsElementWRTNumericalSemigroup(1100,s) = d; true
S is a numerical semigroup. Computes the bound were the periodicity starts for Delta sets of the elements in S; see .
gap> s:=NumericalSemigroup(5,7,11);; gap> DeltaSetPeriodicityBoundForNumericalSemigroup(s); 60
S is a numerical semigroup.

Computes the element were the periodicity starts for Delta sets of the elements in S.
gap> s:=NumericalSemigroup(5,7,11);; gap> DeltaSetPeriodicityStartForNumericalSemigroup(s); 21
S is a numerical semigroup, n an integer.

Computes the Delta sets of the integers up to (and including) n, if an integer is not in S, the corresponding Delta set is empty.
gap> s:=NumericalSemigroup(5,7,11);; gap> DeltaSetListUpToElementWRTNumericalSemigroup(31,s); [ [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ ], [ 2 ], [ ], [ ], [ 2 ], [ ], [ 2 ], [ ], [ 2 ], [ 2 ], [ ] ]
S is a numerical semigroup, n a nonnegative integer.

Computes the union of the delta sets of the elements of S up to and including n, using a ring buffer to conserve memory.
gap> s:=NumericalSemigroup(5,7,11);; gap> DeltaSetUnionUpToElementWRTNumericalSemigroup(60,s); [ 2 ]
S is a numerical semigroup.

Computes the Delta set of S.
gap> s:=NumericalSemigroup(5,7,11);; gap> DeltaSet(s); [ 2 ] gap> DeltaSetOfNumericalSemigroup(s); [ 2 ]
S is a numerical semigroup and n a nonnegative integer. The output is the maximum length of the factorizations of n in terms of the minimal generating set of S.
gap> s:=NumericalSemigroup(101,113,196,272,278,286); <Numerical semigroup with 6 generators> gap> MaximumDegree(1100,s); 9 gap> MaximumDegreeOfElementWRTNumericalSemigroup(1100,s); 9
S is a numerical semigroup. Detects if S is additive, that is, \textrm{ord}(m+x)=\textrm{ord}(x)+1 for all x in S, where m is the multiplicity of S (\textrm{ord} corresponds to ; see Section for an alternate definition). For these semigroups \textrm{gr}_\mathfrak{m}(K[\![S]\!]) is Cohen-Macaulay (see ).
gap> l:=IrreducibleNumericalSemigroupsWithFrobeniusNumber(31);; gap> Length(l); 109 gap> Length(Filtered(l,IsAdditiveNumericalSemigroup)); 20
S is a numerical semigroup and n an element of S. The output is the number of factorizations of n in terms of the minimal generating set of S with maximal length.
gap> s:=NumericalSemigroup(101,113,196,272,278,286);; gap> MaximalDenumerant(1100,s); 1 gap> MaximalDenumerant(s,1311); 2 gap> MaximalDenumerantOfElementInNumericalSemigroup(1311,s); 2
ls is list of factorizations (a list of lists of nonnegative integers with the same length). The output is number of elements in ls with maximal length.
gap> FactorizationsIntegerWRTList(100,[11,13,15,19]); [ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ] gap> MaximalDenumerantOfSetOfFactorizations(last); 6
S is a numerical semigroup. The output is the maximal denumerant of S, that is, the maximum of the maximal denumerants of the elements in S (see ).
gap> s:=NumericalSemigroup(101,113,196,272,278,286);; gap> MaximalDenumerant(s); 4 gap> MaximalDenumerantOfNumericalSemigroup(s); 4
S is a numerical semigroup. The output is the adjustment of S as defined in .
gap> s:=NumericalSemigroup(101,113,196,272,278,286);; gap> a := Adjustment(s); [ 0, 12, 24, 36, 48, 60, 72, 84, 95, 96, 107, 108, 119, 120, 131, 132, 143, 144, 155, 156, 167, 168, 171, 177, 179, 180, 183, 185, 189, 190, 191, 192, 195, 197, 201, 203, 204, 207, 209, 213, 215, 216, 219, 221, 225, 227, 228, 231, 233, 237, 239, 240, 243, 245, 249, 251, 252, 255, 257, 261, 263, 264, 266, 267, 269, 273, 275, 276, 279, 280, 281, 285, 287, 288, 292, 293, 299, 300, 304, 305, 311, 312, 316, 317, 323, 324, 328, 329, 335, 336, 340, 341, 342, 347, 348, 352, 353, 354, 356, 359, 360, 361, 362, 364, 365, 366, 368, 370, 371, 372, 374, 376, 377, 378, 380, 382, 383, 384, 388, 389, 390, 394, 395, 396, 400, 401, 402, 406, 407, 408, 412, 413, 414, 418, 419, 420, 424, 425, 426, 430, 431, 432, 436, 437, 438, 442, 444, 448, 450, 451, 454, 456, 460, 465, 466, 472, 477, 478, 484, 489, 490, 496, 501, 502, 508, 513, 514, 519, 520, 525, 526, 527, 531, 532, 533, 537, 539, 543, 545, 549, 551, 555, 561, 567, 573, 579, 585, 591, 597, 603, 609, 615, 621, 622, 627, 698, 704, 710, 716, 722 ] gap> AdjustmentOfNumericalSemigroup(s) = a; true
Invariants based on distances This section is devoted to invariants that rely on the concept of distance between two factorizations. ls is a set of factorizations (a list of lists of nonnegative integers with the same length). The output is the catenary degree of this set of factorizations.
gap> FactorizationsIntegerWRTList(100,[11,13,15,19]); [ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ] gap> CatenaryDegree(last); 5 gap> CatenaryDegreeOfSetOfFactorizations(last2); 5
ls is a set of factorizations. The output is the adjacent catenary degree of this set of factorizations, that is, the supremum of the distance between to sets of factorizations with adjacent lengths. More precisely, if l_1,\ldots,l_t are the lengths of the factorizations of the elements in ls, and Z_{l_i} is the set of factorizations in ls with length l_i, then the adjacent catenary degree is the maximum of the distances \mathrm d (Z_{l_i},Z_{l_{i+1}}).
gap> FactorizationsIntegerWRTList(100,[11,13,15,19]); [ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ] gap> AdjacentCatenaryDegreeOfSetOfFactorizations(last); 5
ls is a set of factorizations. The same as CatenaryDegreeOfSetOfFactorizations, but now the factorizations joined by the chain must have the same length, and the elements in the chain also. Equivalently, if l_1,\ldots,l_t are the lengths of the factorizations of the elements in ls, and Z_{l_i} is the set of factorizations in ls with length l_i, then the equal catenary degree is the maximum of the CatenaryDegreeOfSetOfFactorizations of \mathrm d (Z_{l_i},Z_{l_{i+1}}).
gap> FactorizationsIntegerWRTList(100,[11,13,15,19]); [ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ] gap> EqualCatenaryDegreeOfSetOfFactorizations(last); 2
ls is a set of factorizations. The same as CatenaryDegreeOfSetOfFactorizations, but now the factorizations are joined by a chain with nondecreasing lengths. Equivalently, it is the maximum of the AdjacentCatenaryDegreeOfSetOfFactorizations and the EqualCatenaryDegreeOfSetOfFactorizations.
gap> FactorizationsIntegerWRTList(100,[11,13,15,19]); [ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ] gap> MonotoneCatenaryDegreeOfSetOfFactorizations(last); 5
n is a nonnegative integer and S is a numerical semigroup. The output is the catenary degree of n relative to S.
gap> CatenaryDegree(157,NumericalSemigroup(13,18)); 0 gap> CatenaryDegree(NumericalSemigroup(13,18),1157); 18 gap> CatenaryDegreeOfElementInNumericalSemigroup(1157,NumericalSemigroup(13,18)); 18
ls is a set of factorizations (a list of lists of nonnegative integers with the same length). The output is the tame degree of this set of factorizations.
gap> FactorizationsIntegerWRTList(100,[11,13,15,19]); [ [ 2, 6, 0, 0 ], [ 3, 4, 1, 0 ], [ 4, 2, 2, 0 ], [ 5, 0, 3, 0 ], [ 5, 2, 0, 1 ], [ 6, 0, 1, 1 ], [ 0, 1, 2, 3 ], [ 1, 1, 0, 4 ] ] gap> TameDegree(last); 4 gap> TameDegreeOfSetOfFactorizations(last2); 4
S is a numerical semigroup. The output is the catenary degree of S.
gap> s:=NumericalSemigroup(101,113,196,272,278,286); <Numerical semigroup with 6 generators> gap> CatenaryDegree(s); 8 gap> CatenaryDegreeOfNumericalSemigroup(s); 8
S is a numerical semigroup.

The output is the set of elements s in S such that there exists a minimal solution to msg\cdot x-msg\cdot y = 0, such that x,y are factorizations with the same length of s, and msg is the minimal generating system of S. These elements are used to compute the equal catenary degree of S.
gap> s:=NumericalSemigroup(3,5,7);; gap> DegreesOfEqualPrimitiveElementsOfNumericalSemigroup(s); [ 3, 5, 7, 10 ]
S is a numerical semigroup. The output is the equal catenary degree of S.
gap> s:=NumericalSemigroup(3,5,7);; gap> EqualCatenaryDegreeOfNumericalSemigroup(s); 2
S is a numerical semigroup.

The output is the set of elements s in S such that there exists a minimal solution to msg\cdot x-msg\cdot y = 0, such that x,y are factorizations of s, with |x|\le |y|; msg stands the minimal generating system of S. These elements are used to compute the monotone catenary degree of S.
gap> s:=NumericalSemigroup(3,5,7);; gap> DegreesOfMonotonePrimitiveElementsOfNumericalSemigroup(s); [ 3, 5, 7, 10, 12, 14, 15, 21, 28, 35 ]
S is a numerical semigroup. The output is the monotone catenary degree of S.
gap> s:=NumericalSemigroup(10,23,31,44);; gap> CatenaryDegreeOfNumericalSemigroup(s); 9 gap> MonotoneCatenaryDegreeOfNumericalSemigroup(s); 21
S is a numerical semigroup. The output is the tame degree of S.
gap> s:=NumericalSemigroup(101,113,196,272,278,286); <Numerical semigroup with 6 generators> gap> TameDegree(s); 14 gap> TameDegreeOfNumericalSemigroup(s); 14
n is an element of the numerical semigroup S. The output is the tame degree of n in S.
gap> s:=NumericalSemigroup(10,11,13);; gap> TameDegree(100,s); 5 gap> TameDegree(s,100); 5 gap> TameDegreeOfElementInNumericalSemigroup(100,s); 5
Primality There are no primes among the irreducible elements (minimal generators) of a numerical semigroup. However, there is a way to measure how far an element is frome being prime: the \omega-primality. n is an element of the numerical semigroup S. The output is the \omega-primality of n in S as explained in . The current implementation is due to Chris O'Neill based on a work in progress with Pelayo and Thomas.
gap> s:=NumericalSemigroup(10,11,13);; gap> OmegaPrimality(100,s); 13 gap> OmegaPrimality(s,100); 13 gap> OmegaPrimalityOfElementInNumericalSemigroup(100,s); 13
S is a numerical semigroup and l a list of elements of S.

Computes the omega-values of all the elements in l.
gap> s:=NumericalSemigroup(10,11,13);; gap> l:=FirstElementsOfNumericalSemigroup(100,s);; gap> List(l,x->OmegaPrimalityOfElementInNumericalSemigroup(x,s)); time; [ 0, 4, 5, 5, 4, 6, 7, 6, 6, 6, 6, 7, 8, 7, 7, 7, 7, 7, 8, 7, 8, 9, 8, 8, 8, 8, 8, 8, 8, 9, 9, 10, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 12, 12, 12, 12, 12, 12, 12, 12, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 15, 15, 15, 15, 15, 15, 15 ] 218 gap> OmegaPrimalityOfElementListInNumericalSemigroup(l,s);time; [ 0, 4, 5, 5, 4, 6, 7, 6, 6, 6, 6, 7, 8, 7, 7, 7, 7, 7, 8, 7, 8, 9, 8, 8, 8, 8, 8, 8, 8, 9, 9, 10, 9, 9, 9, 9, 9, 9, 9, 9, 10, 11, 10, 10, 10, 10, 10, 10, 10, 10, 11, 12, 11, 11, 11, 11, 11, 11, 11, 11, 12, 13, 12, 12, 12, 12, 12, 12, 12, 12, 13, 14, 13, 13, 13, 13, 13, 13, 13, 13, 14, 15, 14, 14, 14, 14, 14, 14, 14, 14, 15, 16, 15, 15, 15, 15, 15, 15, 15, 15 ] 10
S is a numerical semigroup. The output is the maximum of the \omega-primalities of the minimal generators of S.
gap> s:=NumericalSemigroup(10,11,13); <Numerical semigroup with 3 generators> gap> OmegaPrimality(s); 5 gap> OmegaPrimalityOfNumericalSemigroup(s); 5
Homogenization of Numerical Semigroups Let S be a numerical semigroup minimally generated by \{m_1,\ldots,m_n\} . The homogenization of S, S^\mathrm{hom} is the semigroup generated by \{(1,0),(1,m_1),\ldots, (1,m_n)\}. The catenary degree of S^\mathrm{hom} coincides with the homogeneous catenary degree of S, and it is between the catenary and the monotone catenary degree of S. The advantage of this catenary degree is that is less costly to compute than the monotone catenary degree, and has some nice interpretations (). This section contains the auxiliary functions needed to compute the homogeneous catenary degree. S is a numerical semigroup and n a list with two entries (a pair). The output is true if the n belongs to the homogenization of S.
gap> s:=NumericalSemigroup(10,11,13);; gap> BelongsToHomogenizationOfNumericalSemigroup([10,23],s); true gap> BelongsToHomogenizationOfNumericalSemigroup([1,23],s); false
S is a numerical semigroup and n a list with two entries (a pair). The output is the set of factorizations n in terms of the minimal generating system of the homogenization of S.
gap> s:=NumericalSemigroup(10,11,13);; gap> FactorizationsInHomogenizationOfNumericalSemigroup([20,230],s); [ [ 0, 0, 15, 5 ], [ 0, 2, 12, 6 ], [ 0, 4, 9, 7 ], [ 0, 6, 6, 8 ], [ 0, 8, 3, 9 ], [ 0, 10, 0, 10 ], [ 1, 1, 7, 11 ], [ 1, 3, 4, 12 ], [ 1, 5, 1, 13 ], [ 2, 0, 2, 16 ] ] gap> FactorizationsElementWRTNumericalSemigroup(230,s); [ [ 23, 0, 0 ], [ 12, 10, 0 ], [ 1, 20, 0 ], [ 14, 7, 1 ], [ 3, 17, 1 ], [ 16, 4, 2 ], [ 5, 14, 2 ], [ 18, 1, 3 ], [ 7, 11, 3 ], [ 9, 8, 4 ], [ 11, 5, 5 ], [ 0, 15, 5 ], [ 13, 2, 6 ], [ 2, 12, 6 ], [ 4, 9, 7 ], [ 6, 6, 8 ], [ 8, 3, 9 ], [ 10, 0, 10 ], [ 1, 7, 11 ], [ 3, 4, 12 ], [ 5, 1, 13 ], [ 0, 2, 16 ] ]
S is a numerical semigroup. The output is the set of Betti elements of the homogenization of S.
gap> s:=NumericalSemigroup(10,17,19);; gap> BettiElements(s); [ 57, 68, 70 ] gap> HomogeneousBettiElementsOfNumericalSemigroup(s); [ [ 5, 57 ], [ 5, 68 ], [ 6, 95 ], [ 7, 70 ], [ 9, 153 ] ]
S is a numerical semigroup. The output is the homogeneous catenary degree of S. Observe that for a single element in the homogenization of S, its catenary degree can be computed with CatenaryDegreeOfSetOfFactorizations and FactorizationsInHomogenizationOfNumericalSemigroup.
gap> s:=NumericalSemigroup(10,17,19);; gap> CatenaryDegree(s); 7 gap> HomogeneousCatenaryDegreeOfNumericalSemigroup(s); 9
Divisors, posets Given a numerical semigroup S and two integers a,b, we write a\le_S b if b-a\in S. We also say that a divides b (with respect to S). The semigroup S with this binary relation is a poset.

The set of divisors of n in S will be denoted by \mathrm{D}_S(n). If we are given n_1,\ldots,n_r\in S, the set of the divisors of these elements is \mathrm{D}(n_1,\ldots, n_r)= \bigcup_{i=1}^r \mathrm{D}(n_i).

For a numerical semigroup S, we can define the sequence \{\nu_i\}_{i\ge 1}, with \nu_i the number of divisors of the ith element in S. It can be shown that the first 2g-c elements of the sequence uniquely determine the semigroup (with c the conductor of S and g its genus), see .

There is another sequence associated to divisors that also determines the semigroup. Let S=\{\lambda_0=0 < \lambda_1 \dots\} be a numerical semigroup. We can define the following binary operation on \mathbb{N}: i\oplus_S i=k, where k is such that \lambda_i+\lambda_j=\lambda_k. Set \tau_i=\max\{ j\in \mathbb{N}: \hbox{ exists } k\in\{j,\ldots,i\} \hbox{ with } j\oplus_S k=i\}. The first 2c-g+1 determine uniquely S (see ).

Translated to code, the definition of \tau_i could be as follows.
TauNS := function(i,S) local d, D, si; D:=DivisorsOfElementInNumericalSemigroup(S[i+1],S); si:=S[i+1]; d:=Maximum(Intersection(D,[0..Int(si/2)])); return NumberElement_NumericalSemigroup(S,d)-1; end;
S is a numerical semigroup and n is an integer. As (S,\le_S) is a poset, we can define the Möbius function associated to it as in . The output is the value of the Möbius function in the integer n, that is, the alternate sum of the number of chains from 0 to n.
gap> s:=NumericalSemigroup(3,5,7);; gap> MoebiusFunctionAssociatedToNumericalSemigroup(s,10); 2 gap> MoebiusFunctionAssociatedToNumericalSemigroup(s,34); 25
S is a numerical semigroup. As (S,\le_S) is a poset, we can define the Möbius function associated to it as in . The output is the Möbius function associated to S.
gap> s:=NumericalSemigroup(3,5,7);; gap> List([1..10],MoebiusFunction(s)); [ 0, 0, -1, 0, -1, 0, -1, 1, 0, 2 ]
S is a numerical semigroup and n is an integer. The arguments can also be given as n, S. The output is the set of divisors of n in S.
gap> s:=NumericalSemigroup(5,7,11);; gap> DivisorsOfElementInNumericalSemigroup(s,20); [ 0, 5, 10, 15, 20 ] gap> DivisorsOfElementInNumericalSemigroup(20,s); [ 0, 5, 10, 15, 20 ]
nuseq is a list of integers that represents a \nu-sequence, that is, the ith element in the sequence is the number of divisors of the ith element in a certain numerical semigroup. Though the sequence is finite, it is understood that from the last element every entry increases exactly by one.

The output is the only numerical semigroup whose \nu-sequence is nusec\cup \{k,k+1, \ldots\} (with k the last element of nusec).

The implementation is inspired in Theorem 1.54 in .
gap> NuSequence:=S->List([1..2*Conductor(S)-Genus(S)], i->Length(DivisorsOfElementInNumericalSemigroup(S[i],S)));; gap> s:=NumericalSemigroup(5,7,11);; gap> NuSequence(s); [ 1, 2, 2, 3, 2, 4, 3, 4, 4, 6, 4, 6, 5, 8, 9, 8, 9, 10, 12, 12 ] gap> s=NumericalSemigroupByNuSequence(last); true
tauseq is a list of integers that represents a \tau-sequence. Though the sequence is finite, it is understood that \tau_{k+2i} = \tau_{k+2i+1}, with k the length of the list, and this amount increases by one as i increases.

The output is the only numerical semigroup whose \tau-sequence is tausec\cup \{l+1,l+1,l+2,l+2, \ldots\} (with l the last element of tausec).

The implementation is inspired in Theorem 1.60 in .
gap> tau:=[ 0, 0, 0, 0, 1, 1, 2, 2, 3, 0, 1, 2, 3, 3, 3, 3, 4, 4 ]; [ 0, 0, 0, 0, 1, 1, 2, 2, 3, 0, 1, 2, 3, 3, 3, 3, 4, 4 ] gap> MinimalGenerators(NumericalSemigroupByTauSequence(tau)); [ 6, 7, 8, 17 ]
Feng-Rao distances and numbers Let S be a numerical semigroup and let n\in S. The Feng-Rao distance of n is then defined as \delta_S(n)=\min\{ \#\mathrm{D}(x)\mid n\le x,\ x\in S\}.

The rth generalized distance is \delta_S^r(n)=\{ \#\mathrm{D}(n_1,\ldots,n_r) \mid n\le n_1 < \cdots < n_r,\ n_i\in S\}. S is a numerical semigroup, r and m integers. The output is the r-th Feng-Rao distance of the element m in the numerical semigroup S.
gap> S := NumericalSemigroup(7,9,17);; gap> FengRaoDistance(S,6,100); 86
S is a numerical semigroup and r is an integer. The output is the r-th Feng-Rao number of the numerical semigroup S.
gap> S := NumericalSemigroup(7,8,17);; gap> FengRaoNumber(S,209); 224 gap> FengRaoNumber(209,S); 224
Numerical semigroups with Apéry sets having special factorization properties Let S be a numerical semigroup with maximal ideal M, and let x\in S. The order of x, denoted \textrm{ord}(x) is the largest positive integer k such that x\in kM\setminus(k+1)M. Notice that the order of an element corresponds with .

Recall that for x,y\in \mathbb{Z}, we write x\le_S y if y-x\in S. Define the relation \preceq_S on S as x\preceq_S y if x\le_S y and \textrm{ord}(y)=\textrm{ord}(x)+\textrm{ord}(y-x).

A numerical semigroup S with multiplicity m is said to be pure if the maximal elements of \textrm{Ap}(S,m) with respect to \le_S have all the same order. The semigroup S is M-pure if the maximal elements of \textrm{Ap}(S,m) with respect to \preceq_S have all the same order, .

The numerical semigroup S is said to be homogeneous if for every element in \textrm{Ap}(S,m), its set of lengths is a singleton (that is, all its a factorizations have the same length), .

A numerical semigroup S is supersymmetric if it is symmetric, additive, and whenever w+w'=f+m for some w,w'\in \textrm{Ap}(S,m) (with m the multiplicity and f the Frobenius number), we have \textrm{ord}(w+w')=\textrm{ord}(w)+\textrm{ord}(w'), see ). S is a numerical semigroup.

Test for the purity of the numerical semigroup S S. This test is based on .
gap> s:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193);; gap> IsPure(s); false gap> s:=NumericalSemigroup(4,6,11);; gap> IsPureNumericalSemigroup(s); true
S is a numerical semigroup.

Test for the M-Purity of the numerical semigroup S S. This test is based on .

This filter implies .
gap> s:=NumericalSemigroup(30, 35, 42, 47, 148, 153, 157, 169, 181, 193);; gap> IsMpure(s); false gap> s:=NumericalSemigroup(4,6,11);; gap> IsMpureNumericalSemigroup(s); true
S is a numerical semigroup.

Detects if S is homogeneous.

gap> s:=NumericalSemigroup(10,11,12,25);; gap> IsHomogeneousNumericalSemigroup(s); false gap> s:=NumericalSemigroup(3,5,7);; gap> IsHomogeneousNumericalSemigroup(s); true
S is a numerical semigroup. Detects if S is supersymmetric.
gap> l:=IrreducibleNumericalSemigroupsWithFrobeniusNumber(31);; gap> Length(l); 109 gap> Length(Filtered(l,IsSuperSymmetricNumericalSemigroup)); 7