COUNTING NUMERICAL SEMIGROUPS BY GENUS AND SOME CASES OF A QUESTION OF WILF

Similar documents
CHOMP ON NUMERICAL SEMIGROUPS

SMT 2013 Power Round Solutions February 2, 2013

Rigid Divisibility Sequences Generated by Polynomial Iteration

Chapter 8. P-adic numbers. 8.1 Absolute values

Final Exam Review. 2. Let A = {, { }}. What is the cardinality of A? Is

RMT 2013 Power Round Solutions February 2, 2013

GENERATING IDEALS IN SUBRINGS OF K[[X]] VIA NUMERICAL SEMIGROUPS

Course 311: Michaelmas Term 2005 Part III: Topics in Commutative Algebra

Formal power series rings, inverse limits, and I-adic completions of rings

8 Primes and Modular Arithmetic

SPRING 2006 PRELIMINARY EXAMINATION SOLUTIONS

INVERSE LIMITS AND PROFINITE GROUPS

NUMERICAL SEMIGROUPS MINI-COURSE CONTENTS

Linear Algebra (part 1) : Vector Spaces (by Evan Dummit, 2017, v. 1.07) 1.1 The Formal Denition of a Vector Space

Part V. 17 Introduction: What are measures and why measurable sets. Lebesgue Integration Theory

Instructor: Bobby Kleinberg Lecture Notes, 25 April The Miller-Rabin Randomized Primality Test

0 Sets and Induction. Sets

The group (Z/nZ) February 17, In these notes we figure out the structure of the unit group (Z/nZ) where n > 1 is an integer.

DR.RUPNATHJI( DR.RUPAK NATH )

Principles of Real Analysis I Fall I. The Real Number System

Sydney University Mathematical Society Problems Competition Solutions.

FINITE GROUP THEORY: SOLUTIONS FALL MORNING 5. Stab G (l) =.

SUMS PROBLEM COMPETITION, 2000

Lecture 6: Finite Fields

PUTNAM TRAINING NUMBER THEORY. Exercises 1. Show that the sum of two consecutive primes is never twice a prime.

Mathematical Reasoning & Proofs

EGYPTIAN FRACTIONS WITH EACH DENOMINATOR HAVING THREE DISTINCT PRIME DIVISORS

GALOIS THEORY BRIAN OSSERMAN

NOTES ON FINITE FIELDS

Nordhaus-Gaddum Theorems for k-decompositions

MAT115A-21 COMPLETE LECTURE NOTES

WORKSHEET ON NUMBERS, MATH 215 FALL. We start our study of numbers with the integers: N = {1, 2, 3,...}

arxiv: v1 [math.gm] 1 Oct 2015

A linear algebra proof of the fundamental theorem of algebra

A linear algebra proof of the fundamental theorem of algebra

FILTERED RINGS AND MODULES. GRADINGS AND COMPLETIONS.

NUMBER SYSTEMS. Number theory is the study of the integers. We denote the set of integers by Z:

On Systems of Diagonal Forms II

MATH FINAL EXAM REVIEW HINTS

Some notes on Coxeter groups

chapter 12 MORE MATRIX ALGEBRA 12.1 Systems of Linear Equations GOALS

AN ALGEBRA PRIMER WITH A VIEW TOWARD CURVES OVER FINITE FIELDS

Bounds on the Number of Irreducible Semigroups of Fixed Frobenius Number

32 Divisibility Theory in Integral Domains

Solving a linear equation in a set of integers II

Generalized Pigeonhole Properties of Graphs and Oriented Graphs

LINEAR EQUATIONS WITH UNKNOWNS FROM A MULTIPLICATIVE GROUP IN A FUNCTION FIELD. To Professor Wolfgang Schmidt on his 75th birthday

A NICE PROOF OF FARKAS LEMMA

Introduction to Real Analysis Alternative Chapter 1

The cocycle lattice of binary matroids

GEOMETRIC CONSTRUCTIONS AND ALGEBRAIC FIELD EXTENSIONS

SUBGROUPS OF CYCLIC GROUPS. 1. Introduction In a group G, we denote the (cyclic) group of powers of some g G by

Notes on Systems of Linear Congruences

Quadratic reciprocity and the Jacobi symbol Stephen McAdam Department of Mathematics University of Texas at Austin

NONABELIAN GROUPS WITH PERFECT ORDER SUBSETS

Part III. 10 Topological Space Basics. Topological Spaces

On the Infinitude of Twin-Primes Bao Qi Feng

COMPLEXITY OF SHORT RECTANGLES AND PERIODICITY

Fermat numbers and integers of the form a k + a l + p α

Review of Linear Algebra

Measures and Measure Spaces

CDM. Recurrences and Fibonacci

ON KRONECKER PRODUCTS OF CHARACTERS OF THE SYMMETRIC GROUPS WITH FEW COMPONENTS

FACTORIZATION OF IDEALS

Factorization in Polynomial Rings

Solutions to odd-numbered exercises Peter J. Cameron, Introduction to Algebra, Chapter 2

Mathematical Induction

Foundations of Mathematics MATH 220 FALL 2017 Lecture Notes

CDM. Recurrences and Fibonacci. 20-fibonacci 2017/12/15 23:16. Terminology 4. Recurrence Equations 3. Solution and Asymptotics 6.

= 1 2x. x 2 a ) 0 (mod p n ), (x 2 + 2a + a2. x a ) 2

SMT 2013 Power Round February 2, 2013

FRACTIONAL FACTORIAL DESIGNS OF STRENGTH 3 AND SMALL RUN SIZES

Definitions. Notations. Injective, Surjective and Bijective. Divides. Cartesian Product. Relations. Equivalence Relations

The Frobenius number in the set of numerical semigroups with fixed multiplicity and genus

Groups. 3.1 Definition of a Group. Introduction. Definition 3.1 Group

Modular Arithmetic Instructor: Marizza Bailey Name:

Math 121 Homework 5: Notes on Selected Problems

* 8 Groups, with Appendix containing Rings and Fields.

Covering Subsets of the Integers and a Result on Digits of Fibonacci Numbers

Local Fields. Chapter Absolute Values and Discrete Valuations Definitions and Comments

HW2 Solutions Problem 1: 2.22 Find the sign and inverse of the permutation shown in the book (and below).

Jeong-Hyun Kang Department of Mathematics, University of West Georgia, Carrollton, GA

Journal of Pure and Applied Algebra

Classification of root systems

Groups of Prime Power Order with Derived Subgroup of Prime Order

LINEAR SPACES. Define a linear space to be a near linear space in which any two points are on a line.

On the Waring problem for polynomial rings

Mathematical Induction

Homework 8 Solutions to Selected Problems

Homework #2 Solutions Due: September 5, for all n N n 3 = n2 (n + 1) 2 4

MAT 570 REAL ANALYSIS LECTURE NOTES. Contents. 1. Sets Functions Countability Axiom of choice Equivalence relations 9

On the mean connected induced subgraph order of cographs

Mathematical Induction

Mathematics Course 111: Algebra I Part I: Algebraic Structures, Sets and Permutations

Chapter 1. Preliminaries

INDISTINGUISHABILITY OF ABSOLUTELY CONTINUOUS AND SINGULAR DISTRIBUTIONS

MAXIMAL PERIODS OF (EHRHART) QUASI-POLYNOMIALS

5 Set Operations, Functions, and Counting

Finite Fields. [Parts from Chapter 16. Also applications of FTGT]

Spanning and Independence Properties of Finite Frames

Transcription:

COUNTING NUMERICAL SEMIGROUPS BY GENUS AND SOME CASES OF A QUESTION OF WILF NATHAN KAPLAN Abstract. The genus of a numerical semigroup is the size of its complement. In this paper we will prove some results about counting numerical semigroups by genus. In 008, Bras-Amorós conjectured that the ratio between the number of semigroups of genus g + and the number of semigroups of genus g approaches φ, the golden ratio, as g gets large. Though several recent papers have provided bounds for counting semigroups, this conjecture is still unsolved. In this paper we will show that a certain class of semigroups, those for which twice the genus is less than three times the smallest nonzero element, grows like the Fibonacci numbers, suggesting a possible reason for this conjecture to hold. We will also verify that a 978 question of Wilf holds for these semigroups and in certain other cases. We will also show that in several situations we can count numerical semigroups of certain genus and multiplicity by counting only semigroups of maximal embedding dimension, and that we can always interpret the number of semigroups of genus g in terms of the number of integer points in a single rational polytope. We also discuss connections with recent work of Blanco, García-Sánchez and Puerto, and mention several further open problems.. Introduction We first recall some important definitions related to numerical semigroups. We will take them from the recently published book of Rosales and García-Sánchez, [0]. This is an excellent reference that discusses the results of many of the other papers in our bibliography. A numerical semigroup is an additive submonoid S of N 0 such that N 0 \S is finite. Let S be a numerical semigroup and A a subset of S. We say that A = {a,..., a n } is a system of generators of S if S = {k a + +k n a n, k,..., k n N}. The set A is a minimal system of generators if no proper subset of A is a system of generators. When A is a system of generators of S we will often write S = A = a,..., a n. It is a standard fact that every numerical semigroup has a unique minimal generating set. It is also straightforward to show that given a submonoid A N 0, A is a numerical semigroup if and only if gcd(a) =. If we divide each element of A by this common factor, then we see that every nontrivial submonoid of N 0 is isomorphic to a unique numerical semigroup. The smallest nonzero element of S is called the multiplicity of S which we will often denote by m(s). The set N \ S is often denoted by H(S) and is known as the gaps of S. The largest element of H(S) is called the Frobenius number of S which Date: October 4, 0. 00 Mathematics Subject Classification. 0M4, 05A5. Key words and phrases. Numerical semigroup, Genus of numerical semigroup, Frobenius number.

NATHAN KAPLAN we will denote F (S), and H(S) is called the genus of S which we will denote g(s). If S = N then by convention we write F (S) =. An element n S is called a minimal generator if it cannot be written as a sum of smaller elements of S. The embedding dimension of a numerical semigroup, denoted by e(s) is the size of its minimal system of generators. When there is no confusion we will write m, F, g and e, for m(s), F (S), g(s) and e(s). This paper will focus on several related questions. How many numerical semigroups have genus g? We call this quantity N(g). How many numerical semigroups have genus g and multiplicity m? We call this N(m, g). In [], Bras-Amorós used an extensive computer analysis to enumerate all of the numerical semigroups with genus at most 50 and noticed a striking pattern in the growth of N(g). Conjecture ([]). We have N(g ) + N(g ) lim =, and lim g N(g) g N(g) N(g ) = + 5. Although there is computational evidence supporting this conjecture, theoretically little is known. These conjectures give a good understanding of the asymptotic behavior of the sequence N(g). Bras-Amorós also conjectures the following. Conjecture ([]). For each g, N(g ) + N(g ) N(g). In fact, a far weaker version of this conjecture is still open. Conjecture 3. For each g, N(g ) N(g). Several recent papers studied gaps in semigroups and used different strategies to give upper and lower bounds for N(g), [,, 3, 4, 5, 9, 7, 5]. Only [] appears to have considered N(m, g). We will most closely follow the approach of [, 6] and [3], which exploits a bijection between the set of numerical semigroups of genus g and the set of integer points in a certain rational polytope. We will use this bijection to show the following. Theorem. Suppose g < 3m. Then N(m, g )+N(m, g ) = N(m, g). This result gives us a way to compute N(m, m + k) for any m > k when k is fixed and not too large. If m(s) = e(s) we say that S has maximal embedding dimension. Let MED(g) be the number of maximal embedding dimension semigroups of genus g, and M ED(m, g) denote the number which also have multiplicity m. We will relate this smaller classes of semigroups to the collection of all semigroups and show that N(k + ) = MED(m, m + k) for all m k +. The other major subject of this paper is the verification of Wilf s question [3], for semigroups with g < 3m or F < m. Although Wilf did not phrase this question as a conjecture, we will state it as a conjecture here, since we believe that it is true. Conjecture 4 ([3]). Let S be a numerical semigroup with embedding dimension e(s), Frobenius number F (S) and genus g(s). Then e(s) F (S) + F (S) + g(s).

COUNTING NUMERICAL SEMIGROUPS 3 Special cases of this conjecture have been verified, [8], and Bras-Amorós has checked it for all semigroups of genus at most 50, [], but a complete solution seems far off. We will discuss the difficulties of extending our arguments to other cases. In the final section of this paper we will relate our work to some recent results of Blanco, García-Sánchez and Puerto [], and Zhao [5], and discuss some conjectures which come from looking at tables of data, and further open problems.. Apéry Sets and Integer Points of Rational Polytopes In this section we will explain our approach to counting numerical semigroups which is closely related to the methods of [, 6] and [3]. This approach relates a numerical semigroup to its Apéry set, a specific generating set, and Apéry sets to the points of a certain rational polytope. We note that the set of gaps of S uniquely determines S. We now define a concept that will be very important throughout this paper. Consider n S. For i n let w(i) be the smallest integer in S which is congruent to i modulo n. The set {0, w(),..., w(n )} is called the Apéry set of S with respect to n. Since the Apéry set with respect to n uniquely determines the gaps of S it also uniquely determines S. We will always consider the Apéry set with respect to the multiplicity m of S since this is the Apéry set of smallest size. We will usually just refer to this set of the Apéry set of S, and will usually omit 0. We will often write this set as {k m +,..., k m m + (m )} where k i. A numerical semigroup with such an Apéry set of size m has multiplicity m. We see that every numerical semigroup has a minimal generating set of size at most m. If this inequality is actually an equality, we say that S has maximal embedding dimension. These semigroups will be the subject of Section 4. It is easy to see that certain sets cannot occur as the Apéry set of a numerical semigroup. For example consider the set {, 5}. If this were the Apéry set of a numerical semigroup S then m = 3 and S but S which is impossible. We note the following observation which is due to Selmer, [0]. Proposition. Let S be a numerical semigroup with Apéry set {k m +,..., k m m + (m )} where k i. Then the genus of S is m i= k i. Proof. We see that the number of gaps of S which are congruent to i modulo m is exactly k i. The key to our approach is to count semigroups by counting Apéry sets. Recall that a composition of a positive integer n is a way of writing n as a sum of positive integers where the order of these integers does matter. Proposition 3. We have that N(m, g) is equal to the number of compositions of g into exactly m parts, {k,..., k m } such that {k m +,..., k m m + (m )} is the Apéry set of a numerical semigroup. Proof. We note that every numerical semigroup of genus g and multiplicity m has a unique Apéry set of the form {k m +,..., k m m + (m )} where k i and g = m i= k i. It is clear that this gives a composition of g into exactly m parts. So N(m, g) is less than or equal to the number of compositions of this form. Suppose we have a composition of g into exactly m parts {k,..., k m } and that {k m +,..., k m m + (m )} is the Apéry set of a numerical semigroup.

4 NATHAN KAPLAN Since two different compositions give two different Apéry sets, we see that the number of such compositions is at most N(m, g). We have to determine when a composition of g into m parts leads to the Apéry set of a numerical semigroup. The following proposition follows directly from the definition of the Apéry set. Proposition 4. Consider the set {k m+,..., k m m+m }. This is the Apéry set of the numerical semigroup S = m, k m +,..., k m m + m if and only if for all i m, (k i )m + i S. We can immediately see that certain conditions need to hold in order for {m, k m+,..., k m m + m } to be a valid Apéry set. For example, for each pair (i, j) such that l = i + j < m we see that (k l )m + l S implies that k i + k j k l. Similarly for each pair (i, j) such that l = i + j > m we must have k i + k j k l. The useful result of Kunz [3], and Rosales et. al., [6], is that these conditions completely determine which compositions lead to valid Apéry sets. Consider the following set of inequalities: x i for all i {,..., m } x i + x j x i+j for all i j m, i + j m x i + x j + x i+j m for all i j m, i + j > m x i Z for all i {,..., m }. Proposition 5 ([6, 3]). There is a one to one correspondence between solutions {k,..., k m } to the above inequalities and the Apéry sets of numerical semigroups with multiplicity m. If we add the condition that m i= k i = g, then there is a one to one correspondence between solutions {k,..., k m } to the above inequalities and the Apéry sets of numerical semigroups with multiplicity m and genus g. Each of the above inequalities defines a half space in R m, so their intersection defines a rational polyhedral cone. If we fix the sum of the k i, then each k i g, and we see that this polyhedron is bounded, and therefore is a rational polytope. Therefore, we can use the theory of integer points in rational polytopes to try to count semigroups. This is discussed extensively in []. We see that adding the extra condition m i= k i = g amounts to taking the intersection of our m dimensional polyhedral cone with a hyperplane defined by g. We point out that there is a very similar result for maximal embedding dimension semigroups, also due to Rosales et. al., [6]. We note that the condition that an Apéry set element gives a minimal generator requires stricter bounds on sums of the other Apéry set elements. Proposition 6 ([6]). We have that MED(m, g) is equal to exactly the number of m tuples {k,..., k m } satisfying the following set of inequalities: x i for all i {,..., m } x i + x j x i+j + for all i j m, i + j m x i + x j x i+j m for all i j m, i + j > m x i Z for all i {,..., m }, m i= x i = g.

COUNTING NUMERICAL SEMIGROUPS 5 We aim to prove a corollary which outlines the general structure of N(m, g). Suppose m 3, since we can easily determine N(, g) and MED(, g). We want to define a function which is eventually a quasipolynomial following the language of [7], that is, functions f(n) such that there is a period s and a collection of polynomials f i (n) for each i s such that for n 0, f(n) = f i (n) for all i n (mod s). The degree of the quasipolynomial is the largest degree of the f i. We denote the set of such functions by QP 0. We will prove the following. Proposition 7. For fixed m and g 0, N(m, g) is eventually a quasipolynomial of degree m with period depending on m. That is, there exists some period s such that for each i s there is a polynomial f i (g) such that N(m, g) = f i (g) whenever g i (mod s) and g 0. For fixed m, and g 0, MED(m, g), is also eventually a quasipolynomial of degree m. We will give this result in a few steps. First we will note that N(m, g) is given by the number of integer points inside a certain polytope of dimension exactly m. A straightforward application of a theorem of Chen, Li and Sam [7], allows us to conclude that N(m, g) is eventually a quasipolynomial in g of degree at most m. We will show that N(m, g) is related to the number of integer points of a related polytope of dimension m for which we can apply a classical theorem of Ehrhart to count integer points. Finally, we give a lower bound for N(m, g) in terms of the number of integer points of this polytope and conclude that N(m, g) is eventually a quasipolynomial of degree exactly m. We will focus on the inequalities giving N(m, g). The argument for MED(m, g) is extremely similar. Recall that N(m, g) is given by the integer points satisfying the following inequalities: x i for all i {,..., m } x i + x j x i+j 0 for all i j m, i + j m x i + x j x i+j m for all i j m, i + j > m, and also satisfying m i= x i = g. The last condition corresponds to taking a hyperplane through the polyhedral cone defined by the above inequalities, giving a polytope P (g). We set x m = g m i= x i and can give our polytope in terms of inequalities which contain only the variables x,..., x m and the parameter g. For each fixed value of g we see that this polytope has dimension at most m. We can see that it has dimension equal to m by noting that it contains the points x = = x m = g m and for any very small ε relative to g, and for any i m it also contains the point x i = g m + ε and x j = g m ε m for all j i. It is easy to see that any convex set containing these points is at least m dimensional, and therefore that for any g > 0, P (g) has dimension exactly m. We now give a result of [7] which implies that the number of integer points inside of P (g) grows as a quasipolynomial in g of degree at most m. Theorem 8 (Theorem. in [7]). For n 0, define a rational polytope P (n) = {x R d V (n)x c(n)}, where V (x) is an r d matrix, and c(x) is an r column vector, both with entries in Z[x]. Then #(P (n) Z d ) QP 0. After substituting for x m, we can represent each of the inequalities defining the sets which count N(m, g) and MED(m, g) in terms of a row of an r (m )

6 NATHAN KAPLAN matrix and r column matrix, for some r. Each x i satisfies x i g, and the value of x m is determined by the values of the other x i, so clearly there are at most g m integer points inside of P (g). Therefore we see that the degree of this quasipolynomial is at most m. We need to do a little work to show that the degree of this quasipolynomial is exactly m and not something smaller. We need only give a lower bound for the number of points inside of P (g) which is a quasipolynomial of degree m minus something which is eventually a quasipolynomial of degree at most m 3. Since we know that the number of points inside of P (g) is eventually a quasipolynomial, we will know that its degree is at least m. We already know that its degree is at most m, and conclude that it must be exactly m. We next consider the polytope P (g) defined by the following related inequalities: x i 0 for all i {,..., m } x i + x j x i+j 0 for all i j m, i + j m x i + x j x i+j m 0 for all i j m, i + j > m, and m i= x i = g. As above, we can see that for each value of g this polytope is m dimensional. In fact, there is a very clear relationship between the polytopes resulting from two different values of g. Let 0 < g < g. We claim that a point p P (g ) if and only if g g p P (g ). Suppose p P (g ). Then clearly g (x i + x j x k ) 0 for all i + j k (mod m) and g g x i 0. Similarly if g g p P (g ), then we can divide each coordinate by g g and see that p P (g ). Therefore, these inequalities define a family of dilations of a single rational polytope of dimension m. We recall the following theorem of Ehrhart which is discussed in [7]. Theorem 9 (Ehrhart). Let P R d be a polytope with rational vertices. Then the function L P (n) which is the number of integer points inside of np is a quasipolynomial of degree dim P. We apply this theorem and see that the number of integer points in P (g) grows as a quasipolynomial in g of dimension exactly m. We will now give a lower bound for the number of points of P (g), completing the proof. Proof. A lower bound on the number of points in P (g) is the number of integer points satisfying the inequalities defining P (g) except that each x i 0 is replaced with x i. This is equal to the number of integer points in P (g) minus the number of integer points for which at least one x i 0 is actually an equality. A lower bound for this is the number of points in P (g) minus the number of points in P (g) for which x = 0, minus the number of points for which x = 0, and so on, for each i m subtracting the number of integer points of P (g) for which x i = 0. We first note that if we consider the inequalities defining the m dimensional polytope P (g) and impose an extra equality condition that x i = 0 for some i, we get a new set linear inequalities which do not involve x i. This gives a polytope of dimension at most m 3. Applying Theorem 8, we know that the number of integer points inside such a polytope is eventually a quasipolynomial of degree at most m 3. For each i, the number of points of P (g) satisfying x i = 0 is eventually a quasipolynomial of degree at most m 3. Since this holds for each i, the sum of the

COUNTING NUMERICAL SEMIGROUPS 7 number of these points for different values of i is also eventually a quasipolynomial in g of dimension at most m 3. Therefore we have a lower bound for the number of points inside of P (g) which is a quasipolynomial of degree m minus something which is eventually a quasipolynomial of degree at most m 3. This completes the proof that for fixed m, N(m, g) is eventually a quasipolynomial in g of degree exactly m. In further work we would like to investigate the properties of these polytopes and their related quasipolynomials, including the coefficients of their leading terms and their periods, and whether they are in fact actual quasipolynomials and not just eventually quasipolynomials. 3. The Fibonacci-Like Behavior of Certain Semigroups We will begin by providing a table of values of N(m, g) so that the reader can get a sense of the type of patterns that emerge in this data. These values were computed using a program written in SAGE based on Proposition 5, []. Our values agree with the values contained in [], and with the values of N(g) given in []. In this section we will prove Theorem, giving some indication of why Bras- Amorós conjecture may hold. We will use two lemmas to set up a bijection between the set of semigroups with multiplicity m and genus g where g < 3m, and the set of semigroups of multiplicity m and genus either g or g. Lemma 0. Suppose g < 3m and that S = m, k m +,..., k m m + m is a semigroup of genus m i= k i = g with each k i. Then k m. Lemma. Suppose g < 3m + and that S = m, k m +,..., k m m + m is a semigroup of genus m i= k i = g with each k i. Then for each i m, k i 3. We will first prove the theorem and then give the proof of the two lemmas. Proof of Theorem. Suppose S = m, k m +,..., k m m+m is a semigroup of genus m i= k i = g with each k i. By the previous two lemmas, k m = or and k i 3 for all i. We claim that S = m, k (m )+,..., k m (m )+m is a numerical semigroup of genus m i= k i = g k m and multiplicity m. We need only check that for all pairs (i, j) with l = i + j < m, we have k i + k j k l and that for all pairs (i, j) with l = i + j > m we have k i + k j + k l (m ). The first condition holds because {k m +,..., k m m + m } is the Apéry set of a numerical semigroup by assumption, and the second condition holds because each k i, so k i + k j + 3 and each k l m 3 by our second lemma. We now consider starting with S = m, k (m )+,..., k m (m )+m, a numerical semigroup of multiplicity m and genus either g or g. We note that g < 3m implies that (g ) = g < 3m = 3(m ) + and therefore by Lemma we see that each k i 3. Now consider S = m, k m+,..., k m m+ m, lm + m, where l is either or depending on whether the genus of S is g or g. We will show that {k m+,..., k m m+m, lm+m } satisfies the inequalities necessary for it to be the Apéry set of a numerical semigroup of multiplicity m and genus g. For each pair (i, j) with l = i + j < m we have

8 NATHAN KAPLAN g\m Table. Number of Numerical Semigroups of Multiplicity m and Genus g 3 4 5 6 7 8 9 0 3 4 5 6 7 8 9 0 3 4 5 6 N(g) 0 3 4 4 3 7 5 4 4 6 3 6 7 5 3 7 3 7 0 6 39 8 3 9 3 7 6 7 67 9 4 6 7 8 8 8 0 4 3 37 44 44 9 9 04 4 5 4 49 64 7 66 37 0 343 5 8 3 66 85 6 6 95 46 59 3 5 0 35 85 7 88 8 3 56 00 4 5 3 43 06 48 39 88 304 77 78 67 3 693 5 6 6 5 33 9 35 409 49 486 409 34 79 4 857 6 6 9 6 63 37 44 559 754 796 763 587 30 9 5 4806 7 6 3 68 96 30 573 750 094 46 8 7 8 380 06 6 8045 8 7 36 80 36 369 737 05 534 84 074 045 759 47 7 3467 9 7 39 89 8 444 945 334 06 60 37 3356 37 580 50 578 37 8 464 0 7 43 04 330 54 93 737 840 356 48 530 540 4976 370 974 699 54 9 37396 8 47 5 390 658 490 3 3793 48 6939 800 87 868 7556 504 55 836 7 0 694 8 5 33 456 784 847 85 4967 6490 975 657 3643 4 3594 58 778 35 990 9 0346 3 8 55 43 55 940 6 358 646 8638 3439 6375 0640 364 740 50 646 9730 4087 6 70963 4 9 60 64 608 4 766 4475 85 355 8309 58 308 345 3664 36334 3408 3640 98 5077 353 3 3 888 5 9 64 8 697 307 3353 55 059 4756 4663 30588 4334 5077 57340 59354 57484 48870 33370 7068 639 564 54 4 4674

COUNTING NUMERICAL SEMIGROUPS 9 k i + k j k l by our assumption on S. For any pair (i, j) with m = i + j we have k i +k j l because l. For any l = i+j > m we have k i +k j + 3 k l (m ), completing the proof. We will now complete this argument by proving our two lemmas. Proof of Lemma 0. We argue by contradiction. Suppose that {k m+,..., k m m+ m } is the Apéry set of a numerical semigroup with genus g = m i= k i, g < 3m, and that k m 3. By the inequalities implying that we have a valid Apéry set, for each i m, we must have k i + k (m ) i 3. We sum over the k i twice and get m g = k m + (k i + k (m ) i ) 3(m ) + 6 = 3m which is a contradiction. i= Proof of Lemma. We argue by contradition. Suppose that {k m+,..., k m m+ m } is the Apéry set of a numerical semigroup with genus g = m i= k i, g < 3m +, and that there exists some i with k i 4. By the inequalities implying that we have a valid Apéry set, for each j i, k j + k i j 4 and for i + j m we have k j + k m+i j 3. We sum over the k i twice and get i g = k i + (k j +k i j )+ j= m j=i+ since i, giving a contradiction. (k j +k m+i j ) 8+4(i )+3(m i ) 3m+, We can use the recursion of Theorem to give exact formulas for N(m, g) for several families of pairs of (m, g). We begin with a trivial base case, which is certainly already known. Proposition. For any m, N(m, m ) =. Proof. It is clear that any semigroup with smallest element m contains the m gaps,,..., m. If there are no more gaps in the semigroup then it contains the elements m, m +,..., m. Therefore there is exactly one semigroup with multiplicity m and genus m, and minimal generating set {m, m +,..., m }. Proposition 3. For all k 0 there exists a monic polynomial of degree k +, f k (x) such that for all m > k, N(m, m + k) = (k+)! f k(m). Proof. We will prove this by induction on k. First consider k = 0. We will show that for any m we have N(m, m) = m. For m = we see that N(, ) = 0. Suppose the formula holds for all i m. We consider N(m, m). Since 3m > m we can apply Theorem and see that N(m, m) = N(m, m ) + N(m, m ) = m + = m by the induction hypothesis and the previous proposition. This completes the k = 0 case. Now suppose that this proposition holds for each nonnegative integer less than k. That is, for each 0 i < k we have a monic polynomial f i (x) of degree i + such that for all m > i we have N(m, m + i) = (i+)! f i(m).

0 NATHAN KAPLAN Consider some m > k. Then by Theorem we have N(m, m + k) N(m, m + k ) = N(m, m + k ) = k! f k (m ), by induction since m > (k ). Suppose we find a monic polynomial f k (x) of degree k + such that (k + )! (f k(m) f k (m )) = k! f k (m ) for all m > k, and (k+)! f k(k+) = N(k+, 3k+). We claim that (k+)! f k(m) = N(m, m + k) for all m > k. We argue by contradiction. Consider the minimal m > k such that (k+)! f k(m) N(m, m + k). Since we have assumed (k+)! f k(k + ) = N(k +, 3k + ), we see that m k +. We have N(m, m + k) N(m, m + k ) = k! f k (m ) by Theorem and the induction hypothesis, and N(m, m+k ) = (k+)! f k(m ) by the minimality of m. We see that (k+)! f k(m )+ k! f k (m ) = k+! f k(m), also by our assumptions about f k (x). This contradicts the claim that N(m, m+k) k+! f k(m). Therefore, we need only show that there exists a monic polynomial f k (x) of degree k + such that (k+)! (f k(m) f k (m )) = k! f k (m ) for all m > k and (k+)! f k(k + ) = N(k +, 3k + ). We substitute m + for m. We will show that for each constant C, there is a monic polynomial f k (x) such that (k + )! (f k(m + ) f k (m)) = k! f k (m) for all m k with constant term C. We can then choose C such that (k+)! f k(k+ ) = N(k +, 3k + ), giving our desired polynomial and completing the proof. We let f k (x) = k+ i=0 a ix i with a k+ = and f k (x) = k j=0 b jx j with b k =. We will show that there exist choices {a 0,..., a k } satisfying our desired properties. We have k+ k+ f k (x+) f k (x) = a i ((x+) i x i ) = i=0 For all 0 j k we want k+ i=j+ i=0 a i 0 j<i ( ) i a i = (k + )b j. j ( ) i x j = j k+ j=0 k+ i=j+ a i ( i j) x j. We label these equations by the value of j from 0 to k. Equation k is automatically verified since ( ) k+ k ak+ = (k + )b k = k +. Now suppose we have chosen {a k, a k,..., a l+ } such that equations k, k,..., l are verified. We will show that there is a unique choice of a l so that equation l holds. We want k+ ( ) i a i = (k + )b l, l i=l

COUNTING NUMERICAL SEMIGROUPS which implies a l = (k + )b l k+ i=l+ a ( i ) ) i l = (k + )bl k+ l ( l l i=l+ a ( i i We see that the value of a l is determined by the values {a k+, a k,..., a l+, b k, b k,..., b l }. In this way, the set {a k+, a k,..., a } is determined by the set {b k, b k,..., b 0 }. We see that we have constructed f k (x) so that for all m k, (k + )! (f k(m + ) f k (m)) = k! f k (m). We note that we are still free to choose the value of a 0. We choose it such that (k+)! f k(k + ) = N(k +, 3k + ). This completes the proof. We can compute some of these f k (m) explicitly using the method described in this proof. Corollary 4. For m, N(m, m ) =. For m, N(m, m) = m. For m, N(m, m + ) = m 3m+4. For m 4, N(m, m + ) = m3 6m +7m 6. For m 6, N(m, m + 3) = m4 0m 3 +47m 38m+48 4. For m 8, N(m, m + 4) = m5 5m 4 +05m 3 5m +374m+40 0. For m 0, N(m, m + 5) = m6 m 5 +05m 4 795m 3 +954m +96m+880 70. For m, N(m, m+6) = m7 8m 6 +364m 5 70m 4 +789m 3 788m +056m+0080 5040. For m 4, N(m, m + 7) = m8 36m 7 +60m 6 5040m 5 +559m 4 58044m 3 +3548m 750m+887040 4030. We point out that the method of proof described above does not explain why our formula holds for N(k, 3k) for each listed value of k. We include these cases because the explicit computation agrees. We next point out how Theorem can fail in cases where g 3m. First consider the example of N(5, 0) = compared to N(4, 8) + N(4, 9) = 9 + = 0. We see that the list of {k, k, k 3, k 4 } leading to valid Apéry sets of semigroups {5k +,..., 5k 4 + 4} with multiplicity 5 and genus 0 is: {,, 3, 4}, {3,, 3, }, {3,,, 4}, {3, 3,, 3}, {3, 4,, }, {4,, 3, }, {4,, 3, }, {4, 3,, }, {, 4,, }, {3, 4,, }, {3,,, 3}, {,, 3, 4}, {,, 3, 3}, {,, 4, }, {3,, 4, }, {, 3,, 3}, {, 3, 3, }, {, 4,, 3}, {4,,, }, {, 4, 3, }, {3, 3,, }, {3, 3, 3, }. We also consider the set Apéry sets {k, k, k 3 } leading a semigroup of multiplicity 4 and genus either 8 or 9: {, 3, 4}, {, 4, 3}, {3,, 4}, {3, 3, 3}, {3, 4, }, {4,, 4}, {4,, 3}, {4, 3, }, {5,, 3}, {5,, }, {5, 3, }, {,, 4}, {, 3, 3}, {, 4, }, {3,, 4}, {3,, 3}, {3, 3, }, {4,, 3}, {4,, }, {4, 3, }. We notice that not only does Theorem not hold, but neither Lemma 0 nor Lemma holds, as there are semigroups in these sets with k m equal to 3 and 4, and with other k i equal to 3, 4 and 5. We also note that it is not always the case that N(m, g )+N(m, g ) N(m, g). For example, 85 = N(7, ) < N(6, ) + N(6, 0) = 86. l ).

NATHAN KAPLAN It seems that the growth behavior of N(m, g) for g 3m is much more complicated than in the g < 3m case. 4. Maximal Embedding Dimension Semigroups In this section we will discuss some connections between general numerical semigroups and maximal embedding dimension semigroups. Let M ED(m, g) be the number of maximal embedding dimension numerical semigroups of multiplicity m and genus g. We begin this section with a table analogous to the table appearing in the previous section. These values were computed using a very similar SAGE program to the one used to compute N(m, g), []. We will now work towards showing that N(k + ) = MED(m, m + k) for any m k +. This allows us to represent N(g) as the number of integer points inside a single polytope, instead of a union of several polytopes. The key to our argument will be Proposition 6. Theorem 5. Fix k 0 and suppose m k +. Then MED(k +, 3k + ) = MED(m, m + k). Proof. We will prove this result by showing that MED(m, m + k) is equal to the number of k + tuples {k,..., k k+ } satisfying the following set of inequalities: x i Z for all i {,..., k + } x i for all i {,..., k + } x i + x j x i+j + for all i j k +, i + j k + k+ i= x i = 3k +. We have omitted the third set of inequalities from Proposition 6, because when x i, for all i k + then it is automatically the case that x i + x j x k for all (i, j, k). We argue by contradiction. Suppose there exists some m k + 3 for which MED(m, m + k) MED(k +, 3k + ). First, suppose there exists a maximal embedding dimension semigroup given by {k,..., k m } where some k r 3. For each pair i r i, we must have k i + k r i 3 by Proposition 6. If i r modulo m then k i. We sum over the k i twice, noting that k r = 3 and get g = m + k 3(m ) + 6 = m + m > m + k. This is a contradiction, so we assume that k i for i k +. We next show that there cannot exist an r k + with k r =. We argue by contradiction and suppose there exists such an r. Then for each pair i, r i with i < r, we must have k i + k r i 3. If i r modulo m then k i. We sum over the k i twice, noting that k r = and get g (m ) + (r ) + 4 > m + k, which is a contradiction. We have seen that k r = for all r k + and that k r = or for all r. We conclude that MED(m, m + k) is given by the size of the solution set of the inequalities given above.

COUNTING NUMERICAL SEMIGROUPS 3 g\m 3 4 5 6 7 8 9 0 3 4 5 6 7 8 9 0 3 4 5 6 N(g) 0 3 3 4 4 5 7 6 3 0 7 4 3 8 3 5 4 4 9 3 7 5 6 4 30 0 3 8 8 9 4 4 4 4 0 0 4 7 7 4 6 4 3 9 0 7 4 86 3 4 4 6 5 8 7 9 7 4 9 4 5 6 35 5 6 6 7 4 73 5 5 9 4 45 37 39 4 0 7 4 4 6 5 3 56 50 58 37 30 7 7 4 334 7 6 4 35 74 68 8 59 48 7 3 7 4 474 8 6 7 43 93 89 90 75 4 37 3 7 4 663 9 6 30 5 4 4 56 7 7 67 58 3 3 7 4 9 0 7 33 6 4 49 84 7 07 93 48 39 3 7 4 97 7 37 68 7 9 8 5 54 67 48 78 6 39 3 7 4 807 7 40 80 05 37 368 349 357 56 6 5 99 60 39 3 7 4 499 3 8 44 89 46 30 485 468 500 384 355 94 57 96 67 39 3 7 4 3484 4 8 48 04 9 369 69 69 699 557 540 35 47 50 67 39 3 7 4 4835 5 8 5 5 340 444 786 805 967 797 798 495 395 35 79 03 67 39 3 7 4 6676 Table. Number of Maximal Embedding Dimension Numerical Semigroups of Multiplicity m and Genus g

4 NATHAN KAPLAN It is easy to check that this number is equal to MED(k +, 3k + ). We need only note that no numerical semigroup with maximal embedding dimension and this multiplicity and genus can have any k r 3 since this would imply that g m + + m > m + k. We note that this is the optimal value of m for the statement to hold. example MED(m, m + ) = 4 if and only if m 6 = k +. We next state a simple observation as a lemma. Lemma 6. Suppose S N 0 is a numerical semigroup of genus k. Then x k implies x S. Proof. We first recall that a set S N with finite complement is a numerical semigroup if and only if it satisfies 0 S and i, j S, implies i + j S. Suppose x k and x S. Consider the pairs {(, x ), (, x ),..., ( x, x )}. For each pair (i, x i) at least one of i or x i is not in S. Since there are at least k such pairs, we get a contradiction. We can now relate N(g) and MED(m, g). Theorem 7. For each k 0 we have N(k + ) = MED(k +, 3k + ). Proof. We recall from Proposition 6 and the proof of Theorem 5 that there is a bijective correspondence between maximal embedding dimension numerical semigroups of multiplicity k + and genus 3k + and solutions {k,..., k k+ } to the inequalities x i Z for all i {,..., k + } x i for all i {,..., k + } x i + x j x i+j + for all i j k +, i + j k + k+ i= x i = 3k +. We note that whenever x i for all i k +, it automatically holds that for any triple i, i, i 3 k + we have x i + x i x i3. We claim that there is a bijection between this set and the set of numerical semigroups S N of genus k +. We associate each set {k,..., k k+ } with k w = = k wk+ = satisfying these inequalities, to the set S = N \ {w,..., w k+ }. We will show that this is a bijection in two steps. First we will show that each set {k,..., k k+ } leads to a unique semigroup of genus k +, and then we will show that each semigroup of genus k + gives a unique solution {k,..., k k+ } to the above inequalities. First consider some set {k,..., k k+ } with k w = = k wk+ = giving a maximal embedding dimension semigroup of multiplicity k + and genus 3k +. Let S = N \ {w,..., w k+ }. We need only show that for any i, j S, we have i + j S. We will show the contrapositive. Suppose z S. We consider every way of writing z as a sum of two positive integers, {(, z ), (, z ),..., ( z, z )}. Choose some pair (i, j). We must show that either i or j is not in S. We see that k z = and that for each i + j = z we have k i + k j > k z =. Therefore, either k i = or k j =, and we conclude that either i or j is not in S. Therefore S is a numerical semigroup of genus k +. For

COUNTING NUMERICAL SEMIGROUPS 5 Since a semigroup is determined by its complement, is clear that different solutions {k,..., k k+ } lead to different semigroups S. Next suppose S is a numerical semigroup of genus k+ with gap set {w,..., w k+ }. By Lemma 6 we see that each w i k +. Consider the set {k,..., k k+ } where k i is equal to if i is equal to some w j, and equals otherwise. In order to check that this k + -tuple gives a solution to the above inequalities, we need only check that for each k z equal to, we cannot write z = i + j with k i and k j equal to. Suppose that there were some triple (z, i, j) for which this was possible. Then we would have i, j S, but z {w,..., w k+ } implying z S, and giving a contradiction. This completes the proof. Corollary 8. For each g 0, 0 k g we have N(g k) = MED(g + k, 3g ). Proof. This is a direct application of the previous Theorem, noting that N(g) = MED(g, 3g ) and using Theorem 5. We now see that we can read off values of N(g), by examining values of MED(m, g), where we either consider one relatively large value of m and vary g, or one large value of g and vary m. It is not so surprising that a strong connection exists between numerical semigroups of genus g and a particular set of numerical semigroups of maximal embedding dimension. The following result of Rosales [8], indicates that the semigroups of maximal embedding dimension can model the entire set of numerical semigroups. Proposition 9 ([8]). There is a one to one correspondence between the set of numerical semigroups with multiplicity m and Frobenius number F, and the set of numerical semigroups with maximal embedding dimension, Frobenius number F +m, multiplicity m, and each other minimal generator greater than m. We note that the bijection comes from adding m to each element of the Apéry set of the original numerical semigroup except the multiplicity, leading to a semigroup of the same multiplicity but with maximal embedding dimension. If we start with a maximal embedding dimension semigroup of multiplicity m where each nonzero Apéry set element is greater than m, then we get a numerical semigroup of the same multiplicity if we subtract m from each of them. Either by applying this proposition or using the same argument that leads to it, we can prove the following. Proposition 0. There is a one to one correspondence between the set of numerical semigroups with multiplicity m and genus g, and the set of numerical semigroups with maximal embedding dimension, genus g + m, multiplicity m, and every other minimal generator greater than m. The following bound follows directly from this proposition. Corollary. We have N(m, g) MED(m, g + m ). This result leads us naturally to consider how many semigroups of maximal embedding dimension, genus g and multiplicity m also have some other minimal generator less than m. We first point out that if this is not the case, then each Apéry set element must be of the form k i m+i with k i and therefore g m. For the first time we are forced to consider the prime factorization of the multiplicity.

6 NATHAN KAPLAN Proposition. Suppose g 0 and m. Then N(m, g) = MED(m, g +m ) if and only if m is prime and g > (m )(m ). Proof. Our main tool is Proposition 0. We need to show that if m is not prime, or m is prime and g (m )(m ), we can find a semigroup of maximal embedding dimension, multiplicity m, genus g and with some generator other than the multiplicity less than m. In the case that m is prime and g > (m )(m ) we must show that no such semigroups exist. We will consider the cases with m prime and m composite separately. First suppose that m is composite. Then we can write it as m = pm where p is the smallest prime dividing m. Given any g m, we can write g = m + (m m )k + r where 0 r < m m and k in a unique way. We will consider our Apéry set elements in two groups. Let i < i < < i m m be an enumeration of the elements of to m which are not divisible by p. Consider the Apéry set with elements {m + p,..., m + (m )p, (k + )m + i, (k + )m + i,..., (k + )m + i r, km + i r+,..., km + i m m }. Once we show that this is a numerical semigroup of maximal embedding dimension, we see easily that the genus is m + (k + )r + k(m m r) = m + (m m )k + r = g. Suppose that this set does not give a numerical semigroup of maximal embedding dimension. We will use Proposition 6. There must be three elements k a m+a, k b m+ b, k c m+c such that either k a +k b k c, a < b < c, and a+b = c, or k a +k b k c and a + b = m + c. Clearly this implies that k c > k a, k b, and so k c >. This shows that c is not divisible by p, and that it is not possible for both a and b to be divisible by p. So at least one of k a and k b is equal to k or k +, and so k a + k b k +. Since k c k +, we see that k a + k b > k c, and therefore we must have a + b = c and k a + k b = k c = k +. Since a, b < c and max{k a, k b } k, then max{k a, k b } k c. So, we cannot have k a + k b = k c = k +. This is a contradiction, showing that this set gives a valid maximal embedding dimension numerical semigroup, and that it has genus g, multiplicity m and and another Apéry set element of size less than m. From now on we suppose that m is prime. We will first show that if g (m )(m ) then there is a maximal embedding dimension semigroup of multiplicity m, genus g+m, and with some minimal generator other than the multiplicity less than m. We write the elements of our Apéry set as {k m+,..., k m m+m }. Consider the Apéry set given by the following k i values: {k +,..., k +, k,..., k, k, k,...,, }. We increase terms with k i = k to k i = k + from left to right until we have {k +,..., k +, k, k,..., }, at which point we increase terms k i = k + to k i = k + from left to right. This process can begin with the semigroup with each k i = and continues until we reach the semigroup with {k,..., k m } given by {m, m,..., }, which has genus m(m ) = (m )(m ) + m. Now we need only show that at each step our set leads to a maximal embedding dimension numerical semigroup. Suppose that it does not. We again use Proposition 6. There must be three elements k a m + a, k b m + b, k c m + c such that either k a + k b k c, a < b < c and

COUNTING NUMERICAL SEMIGROUPS 7 a + b = c, or k a + k b k c and a + b = m + c. In the first case we see that a, b < c implies that k a > k c, so this is not possible. Therefore, we can suppose that the second case holds. We have k c > k a, k b and therefore, c < a, b. We write c = (a + b) m. We want to consider all pairs a, b such that a + b is constant. We see that one of the pairs which always has the smallest value of k a + k b is given by a = m, b = c +. However, since k c k c+, it is not possible for k a + k b k c. Therefore, this Apéry set gives a numerical semigroup of maximal embedding dimension. Now we consider the other direction. Suppose that m is prime and g > (m )(m ). We must show that there are no maximal embedding dimension semigroups of multiplicity m, genus g + m and with a generator other than the multiplicity of size less than m. We recall a result of Sylvester from 884, that if S = a, b is a numerical semigroup generated by two elements it has genus ab a b+, [0]. Since m is prime, each m + i with i m is relatively prime to m. Therefore m, m + i is a semigroup with genus m(m+i) m i+. Any semigroup of multiplicity m containing m + i must contain this semigroup. We want to see how adding the condition of maximal embedding dimension changes this bound on the genus. We use Proposition 6 again. If we write our Apéry set elements as {k m +,..., k m m + (m )}, then we see that k i =. Maximal embedding dimension implies that k i +k i k i, where we take i modulo m. So k i k i and similarly we see that k i +k i k i +k i k 3i. Continuing in this way, we see that k li lk i. Since m is prime, i is a generator of Z/mZ of order m. Since k i =, summing over l we see that the genus of such a semigroup is at most m l= l = m(m ) = (m )(m ) + m. This shows that for any maximal embedding dimension semigroup with multiplicity m and any other generator less than m, we have g (m )(m ) + m, completing the proof. We have shown that in most circumstances the inequality N(m, g) MED(m, g+m ) is not an equality, however we should be able to show that these quantities are closely related. That is, for large values of g relative to some fixed composite m, the number of maximal embedding dimension semigroups of multiplicity m and genus g and which contain another generator other than the multiplicity less than m, should be small relative to M ED(m, g). More formally, we conjecture the following. Conjecture 5. Fix m. Then lim inf g N(m,g (m )) MED(m,g) =. This should not be difficult to verify in simple cases, for example m = 4. It will become more complicated as m has more prime factors, and therefore there are more nontrivial subgroups of Z/mZ. 5. Some Cases of Wilf s Question In this section we will consider the relationship between the Apéry set of a semigroup, its genus, and its number of minimal generators. First recall that F (S), the Frobenius number of S is the largest natural number not in S and that e(s), the embedding dimension of S, is the number of minimal generators of S. Where it will not cause confusion we will often omit the S. Wilf s question, Conjecture 4,

8 NATHAN KAPLAN asks whether e(s) F (S)+ F (S)+ g(s). We recall some results of Dobbs and Matthews [8], establishing certain special cases. Proposition 3 (Dobbs, Matthews). If S is a semigroup with e 3 or equal to 3(F +) m, F + g 4, or g 4, then Conjecture 4 holds. We note that for any m there is a unique semigroup with multiplicity m and F < m, which has minimal generating set {m, m+,..., m }, and that equality holds for Conjecture 4 in this case. Our main result is the following. Theorem 4. Let S be a semigroup such that g < 3m or such that F < m. Then Conjecture 4 holds. We first note that given the Apéry set of a numerical semigroup {k m+,..., k m m+ m }, it is trivial to find F, the Frobenius number. Let K = max k i, and let i m j be the largest i such that k i = K. Then we have (K )m + j = F. We recall that Lemma implies that if g < 3m then K 3. In fact, Lemma 0 implies that k m < 3 and we see that F 3m. We will prove Theorem 4 in two parts. The first part is easy. Lemma 5. Suppose S is a semigroup with g < 3m and F > m. Then Conjecture 4 holds. Proof. Note that g < 3m directly from Proposition 3. < 3(m+) 3(F +) 4 < 4, since F m +, so this follows We now consider the case where F < m. Note that it is possible for this to hold but g > 3m. For example, consider S = m, m +,..., 3m, which satisfies g = m which is at least 3m whenever m 4, but F = m. We will prove Conjecture 4 for these cases as well. Proposition 6. Suppose S is a semigroup with F < m. Then Conjecture 4 holds. Moreover, equality holds if and only if S = m, m +,..., m, or S = 3, 4. Proof. We can suppose that m < F < m, and correspondingly there is an element of the Apéry set of S of the form m + i for some i m. Let m + c be the maximal such generator. Therefore F (S) + = m + c +. The idea of the proof is to first reduce to the particular case where c = m, and then to use the fact that both e(s) and F (S) + g(s) are related to the number of Apéry set elements of the form m + i. The Apéry set of S must be of the form {k m +, k m +,..., k c m + (c ), m + c, m + (c + ),..., m + (m )}, where each k i {, } because m + i S for all i and we know that m + c S and m + i S for all c + i m. Let S be the semigroup with multiplicity c + and Apéry set given by {k (c + ) +,..., k c (c + ) + c, (c + ) + c}. It is clear that this Apéry set gives a numerical semigroup since each k i. We see that F (S ) = c +. Let R be the number of k i = with i c. If c = we set R = 0. Now by counting the number of terms of the Apéry set which are m + i and the number which are m + i, we see that g(s) = (m c ) + + (c R) + R = m + c R,

COUNTING NUMERICAL SEMIGROUPS 9 and that Therefore and g(s ) = R + (c R) = c R. F (S) + g(s) = m + c + (m + c R ) = R +, F (S ) + g(s ) = (c + ) (c R) = R +. We see that an Apéry set element of the form k i m + i with i c is a minimal generator of S if and only if k i (c + ) + i is a minimal generator of S. Therefore, we see that e(s ) = e(s) (m c), since there are no minimal generators corresponding to m + j for c + j m, and since every generator of S of the form m + j for some c + j m is minimal. Now suppose that e(s) F (S)+ F (S)+ g(s). We claim that unless c = m, e(s ) < F (S )+ F (S )+ g(s ). This follows from the fact that ( ) ( ) F (S )+ F (S )+ g(s ) e(s F (S)+ ) F (S)+ g(s) e(s) (c+) (m+(c+)) R+ (e(s) (m (c + )) + e(s) = (c+) m R+ + (m (c + )). Since c + m, we see that this is positive unless c = m. Therefore, if there exists a semigroup with c m in which Conjecture 4 is violated, or equality holds, then there exists a related semigroup with c = m in which Conjecture 4 does not hold. We will show that this does not happen, completing the proof. Consider S = m, k m +,..., k m m + m, m + m. We see that m is always a minimal generator and each Apéry set element of the form m + i is minimal, so e R +. Suppose e F + F + g. Then (R + )(R + ) m. Each nonminimal Apéry set element is of the form (m + i) + (m + j) where m + i and m + j are Apéry set elements with i, j m. Since there are R elements of the form m + i, we see that there are at most R +R nonminimal Apéry set elements. Therefore e m R +R. This implies (m R +R )(R + ) m. We have ( ) m m R + R R(R + )(R + ) (R + ) = mr, which is at least 0 if and only if (R + )(R + ) m. Therefore, Conjecture 4 is never violated for these semigroups, and equality holds if and only if e = m R +R and (R + )(R + ) = m. We see that m = R +R + (R + ), and therefore, every Apéry set element not of the form m or m + i, must be the sum of two Apéry set elements m + i, m + j, and all such sums must lead to distinct nonminimal Apéry set elements. Suppose equality holds in the Conjecture 4. Clearly m + must be an Apéry set element, and therefore m + must be an Apéry set element. If m = 3, we have the semigroup with Apéry set {3, 4, 8}, where F + = 6, g = 3, R = and e =. Equality holds in Conjecture 4 for this case. If m > 3, we can continue as above and see that m + 3 is an Apéry set element, as is m + 4. If m + 5 is an Apéry set element, then there are two distinct ways to write m + 6 as a sum of =

0 NATHAN KAPLAN Apéry set elements: (m + 3) + (m + 3), (m + ) + (m + 5). However, if m + 5 is an Apéry set element, then it is also a minimal generator since there is no way to write 5 as a sum of two elements of {0,, 3}. Therefore, there are no other cases where m < F < m and equality holds. We have tried quite hard to extend these arguments to other cases, in particular where m < F < 3m but g 3m. A very slight variation of the above argument works for F = m + and F = m +. We can write our Apéry set as, {3m+, k m+,..., k m m+m }, {k m+, 3m+, k 3 m+3,..., k m m+m }, in the first and second cases, respectively. If the number of Apéry set elements with k i = is R, then in the first case, we see again that the number of nonminimal elements is at most R +R. In the second case, k must be or 3 since m + S, and so the number of nonminimal elements is at most R +R. In the first case, F + g = R + 3, and in the second F + g is R + 3 if k = 3, and R + 4 if k =. The argument proceeds as above. As soon as F = m + 3, the situation changes somewhat. For example, if m + is an Apéry set element, then both m + and 3m + 3 can be nonminimal Apéry set elements. It is no longer true that the only way to have a nonminimal Apéry set element is to add two minimal generators (m + i), (m + j). While we can deal with this case with some effort, it seems that when F = m + c with c not very small, the situation becomes much more complicated. One of the issues that is relevant in this analysis is whether we can find large sets of generators of the form m +i such that all of their pairwise sums are distinct. Given a semigroup, we identify the minimal generator m + i with i Z/mZ and let A be the set of all such i. We recall the following definition. Let G be a group, usually either Z or Z/nZ, and S G be a subset. We say that S is a Sidon set if there is no solution to s + s = s 3 + s 4 with s, s, s 3, s 4 S aside from the trivial solutions {s, s } = {s 3, s 4 }. We see that we are asking for relatively large Sidon sets of Z/mZ, or at least sets where there are not too many solutions to the above equality. It turns out that there are ways to find such sets. We give a construction of Ruzsa from [4]. Suppose p is a prime and θ a generator of Z/pZ. For i < p let a t,i be the element of Z/(p p)z defined by a t,i t (mod p ), and a t,i iθ t (mod p). Let Ruzsa(p, θ, k) = {a t,k : t < p} Z p p. Ruzsa [9], showed that this gives a Sidon set of p elements of Z/(p p)z, leading to p +p distinct sums. In [4], several other approaches to constructing Sidon sets, and other sets with few overlaps in pairwise sums, are discussed. We also point out that it is not enough in general to find a small set A Z/mZ such that A + A is very large or all of Z/mZ. Two generators m + i and m + i such that i + i > F (S) m cannot add together to give a nonminimal Apéry set element, since our largest Apéry set element must be F (S) + m. We are therefore asking for A + A to be very large, and for almost all of the sums to be less than F (S). This is related to the postage stamp problem and the problem of finding small -bases of the set [, m], [, 4].