Almost-symmetric numerical semigroups A numerical semigroup is almost-symmetric () if its genus is the arithmetic mean of its Frobenius number and type. We use a procedure presented in to determine the set of all almost-symmetric numerical semigroups with given Frobenius number. In order to do this, we first calculate the set of all almost-symmetric numerical semigroups that can be constructed from an irreducible numerical semigroup.

s is an irreducible numerical semigroup. The output is the set of almost-symmetric numerical semigroups that can be constructed from s by removing some of its generators (as explained in ).
gap> ns := NumericalSemigroup(5,8,9,11);; gap> AlmostSymmetricNumericalSemigroupsFromIrreducible(ns); [ <Numerical semigroup with 4 generators>, <Numerical semigroup with 5 generators>, <Numerical semigroup with 5 generators> ] gap> List(last,MinimalGeneratingSystemOfNumericalSemigroup); [ [ 5, 8, 9, 11 ], [ 5, 8, 11, 14, 17 ], [ 5, 9, 11, 13, 17 ] ]
s is an irreducible numerical semigroup and t is a positive integer. The output is the set of almost-symmetric numerical semigroups with type t that can be constructed from s by removing some of its generators (as explained in ).
gap> ns := NumericalSemigroup(5,8,9,11);; gap> AlmostSymmetricNumericalSemigroupsFromIrreducibleAndGivenType(ns,4); [ <Numerical semigroup with 5 generators>, <Numerical semigroup with 5 generators> ] gap> List(last,MinimalGenerators); [ [ 5, 8, 11, 14, 17 ], [ 5, 9, 11, 13, 17 ] ]
s is a numerical semigroup. The output is true if the numerical semigroup is almost symmetric.
gap> IsAlmostSymmetric(NumericalSemigroup(5,8,11,14,17)); true gap> IsAlmostSymmetricNumericalSemigroup(NumericalSemigroup(5,8,11,14,17)); true
f is an integer, and so is ts. The output is the set of all almost symmetric numerical semigroups with Frobenius number f, and type greater than or equal to ts. If ts is not specified, then it is considered to be equal to one, and so the output is the set of all almost symmetric numerical semigroups with Frobenius number f.
gap> Length(AlmostSymmetricNumericalSemigroupsWithFrobeniusNumber(12)); 15 gap> Length(IrreducibleNumericalSemigroupsWithFrobeniusNumber(12)); 2 gap> List(AlmostSymmetricNumericalSemigroupsWithFrobeniusNumber(12,4),Type); [ 12, 10, 8, 8, 6, 6, 6, 6, 4, 4, 4, 4, 4 ]
f is an integer and so is t. The output is the set of all almost symmetric numerical semigroups with Frobenius number f and type t.
gap> Length(AlmostSymmetricNumericalSemigroupsWithFrobeniusNumberAndType(12,4)); 5