Extremal functions for bases of order h for n
Let N0={0,1,2,3,…} be the set of nonnegative integers and Z the set of all integers. Define the interval of integers [u,v]={n∈Z:u≤n≤v}. Let
(k+1N0)={A⊆N0:∣A∣=k+1}
and
(k+1Z)={A⊆Z:∣A∣=k+1}.
Then
(k+1Z)∖(k+1N0)={A⊆Z:∣A∣=k+1 and a<0 for some a∈A}.
Let A be a set of integers. For every positive integer h, the h-fold sumset of A, denoted hA, is the set of all sums of h not necessarily distinct elements of A. The set A is a basis of order h for n (or an h-basis for n) if [0,n]⊆hA. Let nh(A) be the largest integer n such that A is a basis of order h for n, that is,
nh(A)=max{n:[0,n]⊆hA}.
If 0∈/hA, then nh(A) is undefined.
For example, if
A={−1,0,2}
then
hA=[−h,2h−2]∪{2h}
and
nh(A)=2h−2.
If A is a set of nonnegative integers, then nh(A)≥0 if and only if 0∈A and nh(A)≥1 if and only if 0,1∈A if and only if nh(A)≥h. The classical postage stamp problem for sets of nonnegative integers (introduced by Hans Rohrbach [3, 4] in 1937) is to compute the extremal function
nh(k)=max{nh(A):A∈(k+1N0)}.
An extremal basis for nh(k) is a set A of k+1 nonnegative integers such that nh(A)=nh(k). If A is an extremal basis for nh(2), then A={0,1,c} for some integer c>1.
Alfred Stöhr [5] solved the postage stamp problem for k=2 in 1955. A proof is included in [2]. In Theorem 3.1 we give a new proof of Stöhr’s formula for nh(2).
Let [u] denote the integer part of the real number u, that is, the unique integer n such that n≤u<n+1.
Theorem 1.1 (Stöhr). For all positive integers h,
nh(2)=⌊4h2+6h+1⌋. For odd h, there is one extremal basis:
{0,1,2h+3}. For even h, there are two extremal bases:
{0,1,2h+1}and{0,1,2h+2}.
Nathanson [2] asked how the extremal problem changes if we consider sets that include at least one negative integer, that is, how does the extremal function
nhb(k)=max{nh(A):A∈(k+1Z)∖(k+1N0)}.
compare with the extremal function nh(k)? An extremal basis for nhb(k) is a set A of k+1 integers such that nh(A)=nhb(k) and there exists a∈A with a<0. To compute nhb(k) and to construct the extremal bases for nhb(k) is much harder than the analogous problems for nh(k), even for k=2.
The AI system Aristotle [1] answered a “negativity” question for k=2, that is, for sets A={a,b,c} with a<b<c and a<0. Aristotle showed that nhb(2)<nh(2) for all odd h and for h=4, and that nhb(2)=nh(2) for all even h=4. In this paper we give (revised and improved) proofs of these results. In a follow-up paper we aim to compute the exact value of nhb(2) for all h.
Three lemmas
Lemma 2.1. Let A={a<b<c} be a set of integers and let x=b−a and y=c−a. Then n∈hA if and only if there exist nonnegative integers sn and tn such that
sn+tn≤h(1) and
n=ha+snx+tny.(2)
Proof. We have n∈hA if and only if there exist nonnegative integers rn, sn, and tn such that
rn+sn+tn=h
and
n=rna+snb+tnc.
Then sn+tn≤h and
n=rna+snb+tnc=(rn+sn+tn)a+sn(b−a)+tn(c−a)=ha+snx+tny.
Thus, n∈hA implies (1) and (2).
Conversely, if conditions (1) and (2) are satisfied, then
rn=h−sn−tn∈N0
and
n=ha+snx+tny=(rn+sn+tn)a+sn(b−a)+tn(c−a)=rna+snb+tnc∈hA.
Thus, (1) and (2) imply n∈hA. This completes the proof. □
Lemma 2.2. Let A={a<b<c} be a set of integers and let x=b−a and y=c−a. If [0,h+1]⊆hA, then
1≤x<y≤h+1(3) and
gcd(x,y)=1(4) and
a>−h.(5) Proof. We have [0,h+1]⊆hA. By Lemma 2.1, for all n∈[0,h+1] there exist sn,tn∈[0,h] such that sn+tn≤h and
n=ha+snx+tny. By the pigeonhole principle, there exist n1,n2 with 0≤n1<n2≤h+1 and sn1=sn2. Then tn1<tn2 and
h+1≥n2−n1=(tn2−tn1)y≥y. This proves (3).
We have
0=ha+s0x+t0y∈hA and
1=ha+s1x+t1y∈hA. Subtracting, we obtain
1=(s1−s0)x+(t1−t0)y and so
gcd(x,y)=1. This proves (4).
Because h+1∈hA and y≤h+1, we have
h+1=ha+sh+1x+th+1y≤ha+(sh+1+th+1)y≤ha+h(h+1) and so
a≥−h−1+hh+1>−h, proving (5). □
Let φ be the Euler phi-function.
Lemma 2.3. Let h≥3. Then nhb(2) is the maximum of nh(A) for all sets A={a,a+x,a+y} such that
1≤x<y≤h+1,gcd(x,y)=1and−h<a<0. The number of sets A satisfying these conditions is
(h−1)y=2∑h+1φ(y)≤(h−1)(2h+1).
Proof. Let h≥3 and A={−1,0,2}. Then
nhb(2)≥nh(A)≥2h−2≥h+1.
Thus, to compute nhb(2), it suffices to compute nh(A) only for sets A such that [0,h+1]⊆hA. The result now follows directly from Lemma 2.2.
A general upper bound
Theorem 3.1. For all positive integers h,
nhb(2)≤nh(2)=⌊4h2+6h+1⌋.
Proof. For even h, consider the sets
A1={0,1,2h+1}andA2={0,1,2h+2}.
The sumset hA1 contains the set
[0,4h2+6h]={(2h+1)q+r:q∈[0,2h] and r∈[0,2h]}
∪{(2h+1)2+r:r∈[0,2h−1]}
and
4h2+6h+1∈/hA1.
Therefore,
nh(A1)=4h2+6h.
The sumset hA2 contains the set
[0,4h2+6h]={(2h+2)q+r:q∈[0,2h−1] and r∈[0,2h+1]}
∪{(2h+2)2h+r:r∈[0,2h]}
and
4h2+6h+1∈/hA2.
Therefore,
nh(A2)=4h2+6h.
For odd h, consider the set
A3={0,1,2h+3}.
The sumset hA3 contains the set
[0,4h2+6h+1]={(2h+3)q+r:q∈[0,2h−1] and r∈[0,2h+1]}∪{(2h+3)(2h+1)+r:r∈[0,2h−1]}.
and
4h2+6h+1+1∈/hA3.
Therefore,
nh(A3)=4h2+6h+1.
It follows that
nh(2)≥⌈4h2+6h+1⌉(6)
for all positive integers h. We shall prove that, for all sets A∈(3Z),
nh(A)≤⌊4h2+6h+1⌋.(7)
Let A={a,b,c} with a<b<c and let x=b−a and y=c−a. Inequality (7) holds if nh(A)≤h. Thus, we can assume that
N=nh(A)≥h+1.
By Lemma 2.2,
y≤h+1andgcd(x,y)=1.
Consider the congruence class ha−x(mody). There exist unique integers
n3∈[0,y−1]andn4∈[N−y+1,N]
such that
n3≡n4≡ha−x(mody).
Then n3,n4∈hA and
n4−n3≥(N−y+1)−(y−1)=N−2y+2.(8)
The congruence
n3=ha+sn3x+tn3y≡ha+sn3x≡ha−x(mody)
implies
(sn3+1)x≡0(mody).
From gcd(x,y)=1, we obtain
sn3≡−1(mody).
Then sn3≥0 implies
sn3≥y−1
and
n3≥ha+sn3x≥ha+(y−1)x.
Similarly,
sn4≥y−1.
The inequality tn4≤h−sn4 implies
n4=ha+sn4x+tn4y≤ha+sn4x+(h−sn4)y=ha+hy−sn4(y−x)≤ha+hy−(y−1)(y−x).
Therefore,
n4−n3≤(ha+hy−(y−1)(y−x))−(ha+(y−1)x)=hy−y2+y.
Applying inequality (8) gives
N−2y+2≤n4−n3≤hy−y2+y
and so
nh(A)=N≤−y2+(h+3)y−2=4h2+6h+1−(y−2h+3)2≤4h2+6h+1.
Combining the latter with inequality (6), we deduce
nhb(2)=⌊4h2+6h+1⌋
and
nhb(2)≤nh(2).
This completes the proof.
Computing nhb(2) for even h
In this section we match the upper bound from the previous section for all even h=4. We thereby show that nhb(2)=nh(2) holds for all even h=4, and we first consider the exceptional case.
Theorem 4.1. For h=4,
n4b(2)=8<10=n4(2). The extremal bases for n4b(2) are
{−3,1,2},{−2,1,2},{−2,1,3},{−1,1,2},{−1,1,4}. Proof. From Theorem 1.1 we obtain n4(2)=10. As for n4b(2), let A={a,b,c} be a set of integers with a<b<c and a<0. Setting x=b−a and y=c−a, we have A={a,a+x,a+y}. If [0,5]⊆4A, then inequalities (3) and (5) from Lemma 2.2 with h=4 give
1≤x<y≤5 and
There are (23)(25)=30 sets A={a,a+x,a+y} with a<0 that satisfy these conditions. One can check either by hand or by computer that n4(A)≤8 for each of these 30 sets, with equality for the five sets listed. □
For the even values of h=4, we need to separately consider whether h≡0(mod4) or h≡2(mod4). Let us start with the latter.
Theorem 4.2. If h≡2(mod4), then
nhb(2)=nh(2). Proof. Writing
we have
nh(2)=4h2+6h=(w+1)h. Let
A={−w,w,w+1}=−w+{0,2w,2w+1}. By Lemma 2.1,
hA=−hw+{2ws+(2w+1)t:s,t∈N0 and s+t≤h}=−hw+ℓ=0⋃h{2ws+(2w+1)t:s,t∈N0 and s+t=ℓ}=−hw+ℓ=0⋃h{2wℓ+t:t∈[0,ℓ]}=−hw+ℓ=0⋃h[2wℓ,(2w+1)ℓ]. We have
2w(ℓ+1)≤2wℓ+ℓ+1 if and only if
and so
hA=(−hw+ℓ=0⋃2w−2[2wℓ,(2w+1)ℓ])∪(−hw+ℓ=2w−1⋃h[2wℓ,(2w+1)ℓ])=(−hw+ℓ=0⋃2w−2[2wℓ,(2w+1)ℓ])∪(−hw+[2w(2w−1),(2w+1)h])=(−hw+ℓ=0⋃2w−2[2wℓ,(2w+1)ℓ])∪[0,(w+1)h]⊇[0,nh(2)], and so nh(2)=nh(A)≤nhb(2)≤nh(2). This completes the proof. □
For the proof of the remaining even case we introduce the notation
Sℓ(modm)={n∈S:n≡ℓ(modm)}.
Theorem 4.3. If h≥8 and h≡0(mod4), then
nhb(2)=nh(2).
Proof. Writing
we have w≥2 and
nh(2)=4h2+6h=w(4w+6).
Let
A={−(w−1),w,w+2}=−(w−1)+{0,2w−1,2w+1}.
Note that if h=4, then w=1 and the set A={0,1,3} contains no negative integer. By Lemma 2.1,
hA=−h(w−1)+{(2w−1)s+(2w+1)t:s,t∈N0 and s+t≤h}=−h(w−1)+ℓ=0⋃h{(2w−1)s+(2w+1)t:s,t∈N0 and s+t=ℓ}=−h(w−1)+ℓ=0⋃h{(2w−1)ℓ+2t:t∈[0,ℓ]}=−h(w−1)+ℓ=0⋃h[(2w−1)ℓ,(2w+1)ℓ]ℓ(mod2).
The set [(2w−1)ℓ,(2w+1)ℓ]ℓ(mod2) is a sequence of ℓ+1 consecutive even integers if ℓ is even and a sequence of ℓ+1 consecutive odd integers if ℓ is odd. We have
(2w−1)(ℓ+2)≤(2w+1)ℓ+2
if and only if
2w−2≤ℓ.
Because h is even, we have
−h(w−1)+ℓ=2w−2ℓ≡0(mod2)⋃h[(2w−1)ℓ,(2w+1)ℓ]0=−h(w−1)+[(2w−1)(2w−2),(2w+1)h]even=[−2(w−1),(w+2)h]even
⊇[−2(w−1),nh(2)]even
and
−h(w−1)+ℓ=2w−1ℓ≡1(mod2)⋃h−1[(2w−1)ℓ,(2w+1)ℓ]1=−h(w−1)+[(2w−1)(2w−1),(2w+1)(h−1)]odd=[1,−h(w−1)+(2w+1)(h−1)]odd=[1,nh(2)−1]odd.
Therefore,
hA⊇[0,nh(2)]
and nh(2)≥nhb(2)≥nh(A). This completes the proof.
Bounding nhb(2) for odd h
Theorem 5.1. For all positive odd integers h,
nhb(2)<nh(2)
Proof. It is straightforward to check that
n1b(2)=1<2=n1(2)
and that {0,1,2} is the unique extremal set for n1(2). The extremal sets for n1b(2) are the sets {a,0,1} for all integers a<0.
Let h=2m+1≥3. By Theorem 3.1,
nhb(2)≤nh(2)=4h2+6h+1=m2+4m+2=N
and h+1≤N. If nhb(2)=nh(2), then there is a set A={a,b,c} with a<b<c and a<0 such that
[0,h+1]⊆[0,N]⊆hA
With x=b−a and y=c−a, we define n3 and n4 in the exact same way as in the proof of Theorem 3.1. We then still have
y−1≥n3≥ha+(y−1)x,
which, on the one hand, gives
ha≤(y−1)(1−x)=U.
On the other hand, we also still have
N−y+1≤n4≤ha+hy−(y−1)(y−x),
implying
ha≥N−hy+(y−1)(y−x−1)=L.
In other words,
0≥L−U=N−hy+(y−1)(y−2).
Recalling that h=2m+1 and N=m2+4m+2, we obtain
0≥L−U=N−hy+(y−1)(y−2)=(m2+4m+2)−(2m+1)y+y2−3y+2=(m−y)2+4(m−y)+4=(m−y+2)2≥0.
Therefore,
and
ha=L=U,
so that
ha=(y−1)(1−x)=(m+1)(1−x)<0.
It follows that 1−x<0 and so
1≤x−1≤y−2=m.
Also,
2ha=2(m+1)(1−x)=(h+1)(1−x)=h(1−x)+1−x
implies
(2m+1)(2a+x−1)=h(2a+x−1)=−(x−1)
and so 2m+1 divides the integer x−1 in [1,m], which is absurd. Therefore, nhb(2)<nh(2), completing the proof.
AI usage
The first proofs of the comparison results for the extremal functions nh(2) and nhb(2) were autonomously discovered and formally verified in Lean by Aristotle, a formal reasoning agent developed by Harmonic [1]. WvD and PM used Aristotle to obtain these original proofs. Aristotle is available at aristotle.harmonic.fun.
MBN studied Aristotle’s arguments and used its conversational interface to clarify the reasoning. He then developed the new proofs presented in this paper, incorporating some of Aristotle’s methods, and wrote the original manuscript.
Groningen, The Netherlands
Email address: [email protected]
Harmonic, London, UK
Email address: [email protected]
Lehman College (CUNY), Bronx, NY 10468
Email address: [email protected]