The Frobenius problem asks, given two positive, relatively prime integers a and b, what is the maximum integer that cannot be expressed as a linear combination of a,b using non-negative coefficients? This problem is resolved. However, if we add the restriction that the coefficients themselves must also be relatively prime, we create an open problem with connections to the Stern and Farey sequences and the Jacobsthal function. We prove that under this new restriction, a maximum inexpressible integer still always exists, and explore its values and properties as functions of a,b.
Introduction
In 1850, Eisenstein wrote to Stern concerning which denominators appear between at, bs consecutive in some Farey sequence, and how often [1]. This inspired Stern to devise his diatomic array. In this paper, we use this and techniques of analytic number theory to show that if gcd(a,b)=1, then there is a computable function g(a,b), so that if n>g(a,b), then a fraction nm eventually appears between at and bs. This translates into a variation on the Frobenius problem: suppose a and b are positive, relatively prime integers. If n>g(a,b), then there exist positive, relatively prime integers x and y so that n=ax+by.
Recall that the Farey sequence of order n, denoted Fn, is defined as “the ascending series of irreducible fractions between 0 and 1 whose denominators do not exceed n” [2]. The Farey sequences have a rich structure, including the fact that if at,bs are consecutive terms in a Farey sequence of any order, then as−bt=1. Furthermore, the first term to appear between these terms will be a+bt+s, in the Farey sequence of order a+b.
The diatomic array is defined as having first row a,b and each subsequent row a repetition of the previous row with the sum of consecutive terms inserted between them, as shown in Figure 1. We will borrow the notation of [3] in denoting the entire diatomic array with first row a,b by Z(a,b). It is convenient to classify the general recurrence in terms of rows and positions within the diatomic array: let a term Z(r,k;a,b) occur in the kth position from the left in the rth row down of the diatomic array Z(a,b), where the counts for both k and r start at 0 [3]. Under this system, the first row (consisting of an a and a b and no other entries) is row 0, and has an a in position 0 and a b in position 1. Rewriting the recurrence in this language, we see that each entry in an even position, say position 2k, is equal to the entry in position k in the row immediately above, and each entry in an odd position, say position 2k+1, is equal to the sum of the entries in positions k and k+1 in the row immediately above.
Figure 1. Rows 0–3 of the diatomic array Z(a,b).
We define the Stern sequence by
s(0)=0,s(1)=1;s(2n)=s(n),s(2n+1)=s(n)+s(n+1) for n≥1.
The Stern sequence satisfies a number of interesting properties that relate to the diatomic array [4], including:
If 0≤k≤2r, then Z(r,k;0,1)=s(n).
Z(r,k;a,b)=s(2r−k)a+s(k)b.
s(2rn+k)=s(2r−k)s(n)+s(k)s(n+1) for 0≤k≤2r.
s(2r)=1 and s(2r−1)=r.
Eisenstein wrote Stern that he had a proof that every denominator between at,bs in some Farey sequence must appear in the diatomic array Z(a,b)[1].
It is not difficult to show that s:Z≥0→Z≥0 is surjective. In particular, we emphasize the point that every positive integer appears at least once somewhere within the diatomic array Z(0,1). This will not hold if we use the same recurrence relation but with a different choice of initial conditions, i.e. a different choice of a,b. One trivial way this condition can fail is if gcd(a,b)>1. It follows from the above that Z(r,k;a,b) must be divisible by gcd(a,b) for all r,k. Then any natural number not divisible by gcd(a,b) cannot be expressed as Z(r,k;a,b) and equivalently does not appear in Z(a,b). However, adding in the condition that gcd(a,b)=1 is not sufficient to conclude that every positive integer will appear in Z(a,b). Suppose, for example, that we choose a=5,b=7. Then gcd(a,b)=1, but we still cannot express every natural number as Z(r,k;5,7) for some r,k. A cursory examination of Z(5,7) makes clear that each “new” entry past row 0 must be at least 12:
55551217221217⋯1929777123119267
Then 1,2,3,4,6,8,9,10,11∈/Z(5,7). Our chief goals here are to explore, for a general a,b∈Z+, which non-negative integers can be expressed as Z(r,k;a,b) for some r,k, which cannot, and why. This work is drawn from my thesis, Topics in Analytic Number Theory. In later sections, we will define g(a,b) as the largest integer that cannot be expressed as Z(r,k;a,b) and show not only that g(a,b) always exists but also give an upper bound of N(a,b)=p1p2⋯pr for the minimum r satisfying 2ab<2p3−1⋅2p4−1⋯2pr−1 where pi is the ith prime (see Theorem 4.3). We will note g(a,b) is bounded below by f(a,b), the Frobenius number of a and b, in Section 3. We will focus on building better upper bounds in Theorem 6.5 and Corollary 6.6, and study patterns in the values of g(a,b) in Sections 5 and 7. First, we return our attention to the diatomic array at large.
Definitions and Preliminary Results
For any choice of a,b, we set
S(a,b)={n∈Z≥0:∃r,k∈Z≥0 s.t. n=Z(r,k;a,b) and k≤2r}.
Then S(a,b) is the set of exactly those non-negative integers appearing in the diatomic array Z(a,b).
For gcd(a,b)=d>1, if d∣n, we can verify
n∈S(a,b)⟺dn∈S(da,db)⟺n∈dS(da,db).
If d∤n, then dn∈/Z≥0 and so dn∈/S(da,db); it follows from the above that n∈/S(a,b). Then S(a,b)=dS(da,db), which justifies restricting our consideration to cases where gcd(a,b)=1.
We note that Z(r,2r−k;a,b)=Z(r,k;b,a)[4], and it follows that S(a,b)=S(b,a), so we may treat the two interchangeably.
Theorem 2.1. There exist x,y∈Z≥0 such that n=ax+by and gcd(x,y)=1 if and only if n∈S(a,b).
We make several smaller claims before proceeding to the proof of Theorem 2.1.
Proposition 2.2. Let r≥1, 0≤k≤2r, and a<b. Then each new element in Z(a,b) (i.e. every element in an odd position) is at least ra+b.
This can be proven by inducting on r, and less formally, follows intuitively from Figure 1. It follows as a result that every odd element in row (m+1) of Z(a,b) is greater than at least one odd element in row m of Z(a,b).
Proposition 2.3. If a<b, n<ra+b, and n does not appear in the first r rows of Z(a,b), then n∈/Z(a,b).
This time, the proof considers the (r+t)th row of Z(a,b) for t≥1 and proceeds by induction on t.
Theorem 2.4. Let r≥0 and 0≤k≤2r. Then gcd(s(k),s(2r−k))=1.
Proof. We proceed by induction on r. Given that {s(0),s(1),s(2),s(3),s(4)}={0,1,1,2,1}, it is easy to verify that the claim holds for r=0,1,2. Suppose now that the claim holds for some r≥2 and consider gcd(s(k),s(2r+1−k)) for 0≤k≤2r+1. It suffices to consider 0≤k≤2r, for if k≥2r, then by letting l=2r+1−k, we have
where the last equality follows directly from Theorem 2.4.
Remark 2.6. Let a,b∈Z≥0 with gcd(a,b)=1. Then there exists a unique odd k and r such that a=s(k) and b=s(2r+k).
This follows immediately from the fact that “we can...regard the Stern-Brocot tree as a number system for representing rational numbers, because each positive, reduced fraction occurs exactly once” [5 pg. 119].
We now have all the ingredients needed to prove our earlier claim.
Proof of Theorem 2.1.(⟸) Let n∈S(a,b). Then there exists some r≥0, 0≤k≤2r such that
n=Z(r,k;a,b)=s(2r−k)a+s(k)b.
By Theorem 2.4, gcd(s(k),s(2r−k))=1, so we may take x=s(k) and y=s(2r−k), which guarantees x,y∈Z≥0, gcd(x,y)=1, and n=ax+by.
(⟹) Let there exist x,y∈Z≥0 such that n=ax+by and gcd(x,y)=1. Because gcd(x,y)=1, we also know gcd(y,x+y)=1, and so there exists a unique odd k and r such that y=s(k) and x+y=s(2r+k) by Remark 2.6. As we have seen above, s(2r+k)=s(2r−k)+s(k), and since y=s(k),
x+y=s(2r+k)=s(2r−k)+s(k)⟹x=s(2r−k).
Then n=ax+by=s(2r−k)a+s(k)b which implies n∈S(a,b).
Interpreted through the lens of Theorem 2.1, the problem begins to bear a strong resemblance to the Frobenius problem.
The Frobenius Connection
For a finite set of positive integers {a1,a2,…,an} such that gcd(a1,a2,…,an)=1, the Frobenius numberf(a1,a2,…,an) is the largest integer that cannot be expressed as a sum of the form k1a1+k2a2+…+knan for non-negative integers k1,k2,…,kn[6]. The Frobenius problem is to find the Frobenius number given information about the set {a1,a2,…,an}. We note that f(a,b)=ab−a−b was proven by James Joseph Sylvester in 1882 [6].
For positive integers a,b such that gcd(a,b)=1, we define g(a,b) to be the largest integer that cannot be expressed as ax+by for relatively prime, non-negative integers x,y; if no such integer exists, we will say g(a,b)=∞. This is essentially a variation of the Frobenius problem in which weไทยฟรี set n=2 and place restrictions on the coefficients k1,k2 in addition to those on the set elements a1,a2. Note that by the previous section, g(a,b) is equivalently defined as sup(Z∖S(a,b)).
Certainly g(a,b)≥f(a,b), as there cannot be a relatively prime integral solution to ax+by=N unless there is already an integral solution. However, the existence of an integral solution, or of several integral solutions, is not sufficient; consider again our example in which a=5,b=7. By Section 1, we already know g(5,7)≥11, and invoking the Frobenius problem, we can further conclude g(5,7)≥f(5,7)=5⋅7−5−7=23. We now use the FrobeniusSolve function in Mathematica to generate all non-negative integral solutions to 5x+7y=156 in Figure 2. Although we have four possible solutions, none of them satisfy the condition that gcd(x,y)=1. Our choice of 156 was not accidental; in the next sections, we will develop the tools necessary to show g(5,7)=156, and thus that for every integer N>156, we can guarantee the existence of a relatively prime integral solution to 5x+7y=N. For now, we return our attention to a general choice of a,b and begin to build the results necessary to prove that g(a,b) always exists (that is, it is always finite).
Figure 2. All non-negative integral solutions (x,y) to 5x+7y=156 have gcd(x,y)>1.
The Existence of g(a,b)
So far, we have been able to offer an alternate definition and a lower bound for g(a,b). We now prove that g(a,b)<∞ for any choice of relatively prime a,b using techniques from analytic number theory.
Lemma 4.1. For any choice of positive integers a,b, there exists a positive integer r0 such that if r≥r0, then ab⋅2r<(p1−1)(p2−1)⋯(pr−1), where pi represents the ith prime.
Proof. Note that
ab⋅2r<(p1−1)(p2−1)⋯(pr−1)
⟺ab<2p1−1⋅2p2−1⋅2p3−1⋯2pr−1
⟺ab<22−1⋅23−1⋅2p3−1⋯2pr−1
⟺2ab<2p3−1⋅2p4−1⋯2pr−1.
Because a,b are fixed, we know 2ab is fixed, whereas the right-hand side of the last inequality grows without bound. Then there is certainly a minimum r0 such that 2ab<2p3−1⋅2p4−1⋯2pr0−1, and for all r≥r0, we have
By the above, we may conclude ab⋅2r<(p1−1)(p2−1)⋯(pr−1) for all r≥r0.
Lemma 4.2. Let ϕ(n) be Euler’s phi function and ω(n) be the number of distinct primes dividing n. Then for any choice of positive integers a,b and all sufficiently large n, we have ab⋅2ω(n)<ϕ(n).
Proof. Because a,b are positive integers, it follows by Lemma 4.1 that there exists r0∈Z+ such that if r≥r0, then ab⋅2r<(p1−1)(p2−1)⋯(pr−1). We set N=p1p2⋯pr0 and note by computing ϕ(N) and ω(N) directly that ab⋅2r0<(p1−1)(p2−1)⋯(pr0−1) if and only if ab⋅2ω(N)<ϕ(N).
Let m>N. We divide into two cases.
Case 1: ω(m)>ω(N). We set m=q1l1q2l2⋯qklk, with q1<q2<⋯<qk all prime and each li a positive integer. Since k:=ω(m)>ω(N)=r0, it follows from Lemma 4.1 that ab⋅2k<(p1−1)(p2−1)⋯(pk−1). We also observe qi≥pi for i≤k to obtain the following:
Case 2: ω(m)≤ω(N). Again set m=q1l1q2l2⋯qklk, with q1<q2<⋯<qk all prime and each li a positive integer. It is still true that qi≥pi for i≤k, and qi≥pi implies that 1−qi1≥1−pi1. We also know that 1−pj1≤1 for j≤r0, and together with an alternate formula for ϕ, we see
We now turn our attention to {(u,v)∈Z≥0×Z≥0:au+bv=dn}. Because we know that gcd(a,b)=1 and 1∣dn for all divisors d of n, it follows that there always exists some solution to au0+bv0=dn for integers u0,v0 (not necessarily non-negative). All other integer solutions must be of the form u=u0+kb,v=v0−ka for some k∈Z. Since we want to count only those solutions for which u,v≥0, we count only those integers k for which u0+kb≥0 and v0−ka≥0. Solving each for k, we obtain −bu0≤k and k≤av0. The number of integers k satisfying both inequalities is then
By definition, {x}, the fractional part of any number x, always satisfies {x}∈[0,1), so
1−{bu0}−{av0}≤1−0−0=1
and
1−{bu0}−{av0}>1−1−1=−1.
It follows that
{(u,v)∈Z≥0×Z≥0:au+bv=dn}=dabn+E(dn)
where E(dn) represents an error as a function of n,d and E(dn)≤1 for all n,d. We are justified in treating the error as a function of dn because a,b are fixed, and u0,v0 depend on a,b,dn. With this result, we may write
and since ∣{(x,y)∈Z≥0×Z≥0:ax+by=n&gcd(x,y)=1}∣ is necessarily an integer, it follows that for sufficiently large n,
∣{(x,y)∈Z≥0×Z≥0:ax+by=n&gcd(x,y)=1}∣≥1.
Then there exists N∈Z such that for all n≥N, there is at least one solution to ax+by=n such that x,y∈Z≥0 and gcd(x,y)=1; hence, g(a,b)<N, which concludes the proof.
The above lemma and theorem also yield an upper bound for g(a,b): define N(a,b) to be p1p2⋯pr for the minimum r satisfying 2ab<2p3−1⋅2p4−1⋯2pr−1. By the above, this N has the property that if n≥N, then abϕ(n)−2ω(n)>0, and hence g(a,b)<N(a,b). We now have enough tools to begin computing exact values of g(a,b).
Exact Values
We first note that we can solve for g(a,b) precisely if a=1 or a=2.
Proposition 5.1. We have g(1,b)=b−1 if b=2 and g(1,2)=0.
This is easily proven directly, but also follows intuitively from writing the first several rows of Z(1,b).
Proposition 5.2. If b>1 is odd, then g(2,b)=4b−2.
Proof. We first claim 4b−2∈/S(2,b) for any b∈Z≥0. Suppose for contradiction that 4b−2∈S(2,b). It follows from Theorem 2.1 that 4b−2=2x+by for some x,y∈Z≥0 such that gcd(x,y)=1. We divide into four cases based on the possible values of y.
Case 1: y is odd. Then 2x+by is odd, but since 4b−2 is even, this contradicts 4b−2=2x+by.
Case 2: y=2. Then 4b−2=2x+2b⟹x=b−1, which implies x is even. This contradicts gcd(x,y)=1.
Case 3: y≥4. Then 2x+by≥2x+4b≥4b>4b−2; this contradicts 4b−2=2x+by.
Case 4: y=0. Then
4b−2=2x⟹x=2b−1⟹1=gcd(x,y)=gcd(2b−1,0)=2b−1⟹b=1.
This contradicts the assumption that b>1.
These cases account for all possible values of y, so it follows that there is no solution to 4b−2=2x+by such that x,y∈Z≥0 and gcd(x,y)=1. Then g(2,b)≥4b−2 for b>1 odd.
We now claim that g(2,b)<4b−1 by arguing that for all n≥4b−1, we have n∈S(2,b).
First, 4b−1=b+3b−1 where 3b−1 is even, so 4b−1=2⋅23b−1+b⋅1 where 23b−1,1∈Z≥0 and gcd(23b−1,1)=1. Then 4b−1∈S(2,b). Next, 4b=2b+2b=2⋅b+b⋅2 where b,2∈Z≥0 and gcd(b,2)=1 because b is odd, so 4b∈S(2,b) as well.
We now consider 4b+k for k∈Z+. We divide again into cases, this time based on kmod4, but will only argue the first explicitly.
Case 1: k≡1mod4. Then $4b + k = b + 3b + kwhere$3b+k is even because 3,b,k are odd, so 4b+k=2⋅23b+k+b⋅1 where 23b+k,1∈Z≥0 and gcd(23b+k,1)=1.
Cases 2, 3, and 4, where k≡2,3, or 0mod4 respectively, follow similar arguments.
Then for all k∈Z+, 4b+k is expressible as 2x+by where x,y∈Z≥0 and gcd(x,y)=1. Therefore g(2,b)<4b−1 for all odd b>1, and together with the above, this proves g(2,b)=4b−2 for all odd b>1.
We do not have closed formulae for g(a,b) outside of these cases, but can still compute exact values by testing down from the upper bound defined in the previous section. We define the function UpperBound in Mathematica, with exact code given in Figure 3. Given a choice of a,b, UpperBound first finds those r, beginning at r=3, for which
Figure 3. The Mathematica code of UpperBound, which computes the value N(a,b).
2ab≥2p3−1⋅2p4−1⋯2pr−1;
we know that at most finitely many of these r exist, and that the right-hand side of this inequality is strictly increasing as a function of r. If we then isolate the last r for which the inequality holds and add one, we obtain the minimum r satisfying 2ab<2p3−1⋅2p4−1⋯2pr−1, at which point we set UpperBound(a,b) equal to p1p2⋯pr for this r. This returns N(a,b) precisely.
We now wish to compare our upper bound to our known exact values. We note that by Proposition 5.1, g(1,999)=998; by Proposition 5.2, g(2,999)=3994; and that by direct computation,
N(1,999)=N(2,999)=9699690. It is natural to ask next, is this the best possible upper bound, or can we build a better one?
Computing an Alternate Upper Bound
To answer this question, we return to the original problem posed in terms of the Farey sequence. We first show that for gcd(a,b)=1, a and b will appear as neighboring denominators in some Farey sequence.
Proposition 6.1. For any choice of a,b≥2 such that gcd(a,b)=1, there exist some s,t such that at,bs are consecutive terms in some Farey sequence.
Proof. Let gcd(a,b)=1 with a,b≥2. Because a,b are relatively prime, there necessarily exists some s satisfying as≡1(modb) and 1≤s≤b−1. Let t=(as−1)/b; then t≥1, and
bt=as−1≤a(b−1)−1=ab−a−1<ab,
so t<a. Therefore at,bs∈(0,1). Additionally, it follows from t=(as−1)/b that as−bt=1 and thus that gcd(a,t)=gcd(b,s)=1, so at,bs are irreducible. It also follows from as−bt=1 that bs−at=ab1 and thus that at,bs are consecutive terms in Fmax(a,b):=Fk by [8]. □
We now consider the denominators that appear in terms between at,bs in Farey sequence of sufficiently high order.
Proposition 6.2. If at,bs are consecutive terms in the Farey sequence of order k:=max(a,b), then d appears as a denominator between at,bs in some Fm with m>k if and only if d=ax+by for some x,y∈N with gcd(x,y)=1.
Proof. Let at,bs be consecutive terms in the Farey sequence of order k:=max(a,b).
(⟹) This direction was proved by Edward Sang in 1879 [9]. Essentially, every term between at,bs must be of the form ax+bytx+sy for x,y∈N, and if gcd(x,y)>1, we find ax+bytx+sy is not in lowest terms. Thus every possible denominator d appearing between at,bs must be of the form ax+by with gcd(x,y)=1. (⟸) Let x,y∈N with gcd(x,y)=1 and d=ax+by. Since gcd(x,y)=1, there exist j,k∈Z such that jx+ky=1. We know that “if kh and k′h′ are two successive terms of Fn, then kh′−hk′=1” [2], so as−bt=1. Observe (ak−bj),(js−kt)∈Z and that
Corollary 6.4. If all n>N appear as denominators between at and bs in some Fm with m>max(a,b), then g(a,b)≤N.
Proof. This follows immediately from Corollary 6.3 and the fact that g(a,b)=sup(Z∖S(a,b)).
We note that n does not appear as a denominator between at,bs in any Farey sequence if and only if for every i satisfying at<ni<bs, we have gcd(i,n)>1. We further note
at<ni<bs⟺atn<i<bsn,
and it follows that the number of i that must satisfy gcd(i,n)>1 in order for n not to appear as a denominator between at,bs is ⌊bsn⌋−⌈atn⌉+1. We observe
This expression has the benefit of not depending on s,t.
It now becomes expedient to invoke the Jacobsthal function j(n), which is defined for n≥1 as the smallest integer such that any sequence of j(n) consecutive integers contains an element relatively prime to n[10]. Then j(n)−1 is the maximum length of a string of consecutive integers not relatively prime to n, and if j(n)−1<abn−1 or equivalently, j(n)<abn, it follows by the above that n is a denominator appearing between at,bs in Farey sequences of sufficiently high order. For
h(r):=j(p1p2⋯pr)
and
H(r):=ω(n)=rmaxj(n),
Hajdu and Saradha have shown H(r)=h(r) for r≤23 and H(24)>h(24)[10]. Additionally, h(r) is strictly increasing for r≤63[11]. We note that for all cases we have considered thus far, N(a,b)<p1p2⋯p23=267064515689275851355624017992790.
We combine these facts with our previous upper bound N(a,b) defined in § 4 to obtain an improved upper bound:
Theorem 6.5. For N(a,b)≤p1p2⋯p23, we have g(a,b)≤ab⋅j(N(a,b))<N(a,b).
Proof. Recall N(a,b) is defined as p1p2⋯pr for the minimum r satisfying 2ab<2p3−1⋅2p4−1⋯2pr−1, so ω(N(a,b))=r. For m≤N(a,b), we know j(m)≤H(r), and so the maximum length of any string of consecutive integers not relatively prime to m, that is, j(m)−1, is bounded above by H(r)−1=h(r)−1=j(N(a,b))−1. Since
j(N(a,b))−1<abm−1⟺m>ab⋅j(N(a,b)),
it follows that if m≤N(a,b) and m>ab⋅j(N(a,b)), then j(m)≤j(N(a,b))<abm and so m appears as a denominator between at,bs in Farey sequences of sufficiently high order.
It follows that all m satisfying ab⋅j(N(a,b))<m≤N(a,b) appear as denominators between at,bs in Farey sequences of sufficiently high order, and thus that g(a,b)≤ab⋅j(N(a,b))<N(a,b) by Corollary 6.4.
We include Table 1 as an illustration of the growth rate of the product of the first r primes compared to the Jacobsthal function applied to the product of the first r primes. We can further refine the upper bound derived using the latter as follows:
r
1
2
3
4
5
6
7
8
9
p1p2⋯pr
2
6
30
210
2310
30030
510510
9699690
223092870
j(p1p2⋯pr)
2
4
6
10
14
22
26
34
40
Table 1. For each r≤9, the product of the first r primes is given as well as the Jacobsthal function applied to these products. For 2≤r≤23, if p1p2⋯pr is an upper bound for g(a,b), then ab⋅j(p1p2⋯pr) is an improved upper bound.
Corollary 6.6. For N(a,b)≤p1p2⋯p23, we have
g(a,b)≤ab⋅j(pq+1⋅pq+2⋯prN(a,b))
for q the maximum integer such that p1p2⋯pq≤ab⋅j(N(a,b)).
Proof. We know by Theorem 6.5 that ab⋅j(N(a,b))<N(a,b). Then ω(ab⋅j(N(a,b)))<r, as N(a,b) is the smallest positive integer satisfying ω(N(a,b))=r. Then for m≤ab⋅j(N(a,b)), the maximum length of any string of consecutive integers not relatively prime to m is
H(q)−1=h(q)−1=j(N(a,b)/(pq+1⋅pq+2⋯pr))−1
where q is the maximum integer such that p1⋅p2⋯pq<ab⋅j(N(a,b)). Repeating the logic of Theorem 6.5, it follows that all m satisfying
ab⋅j(N(a,b)/(pq+1⋅pq+2⋯pr))<m<ab⋅j(N(a,b))
appear as denominators between at,bs in Farey sequences of sufficiently high order, and thus that
We may be able to iterate Corollary 6.6 to further improve the upper bound, and we may be able to improve the upper bound via another method as well:
Remark 6.7. If we can show g(a,b)=n for all n≤ab⋅j(N(a,b)/(pq+1⋅pq+2⋯pr)) satisfying ω(n)=q in Corollary 6.6, we may replace q with q−1 in the process above. It may be possible to iterate this step.
We examine the case of a=5,b=7 to better illustrate the process of determining this upper bound as well as its strength. We first calculate N(5,7)=30030, our previous best known upper bound for g(5,7). By Theorem 6.5, we now know g(5,7)≤5⋅7⋅j(30030)=35⋅22=770, and by Corollary 6.6, we may replace 30030 with 210 to obtain g(5,7)≤5⋅7⋅j(210)=350. It takes Mathematica less than a second to determine that 210 and 330 are the only integers n such that ω(n)=4 and n≤350, and less than a second to verify that 5x+7y=210,5x+7y=330 both have solutions where gcd(x,y)=1. It follows that g(5,7)≤5⋅7⋅j(30)=5⋅7⋅6=210. We cannot further refine the bound, as there are multiple integers n≤210 with ω(n)=3 such that 5x+7y=n has no solutions satisfying gcd(x,y)=1. By starting at n=210 and counting down to the first n′≤210 such that 5x+7y=n′ has no solutions satisfying gcd(x,y)=1, we obtain g(5,7)=156.
For the above case, we note that 156 was both the maximum integer satisfying ω(n)=3 with no suitable solutions to 5x+7y=156 and the exact value of g(5,7). However, this is not always the case: the maximum integer satisfying ω(n)=5 with no relatively prime integer solutions to 49x+93y=n is 33930, but we find g(49,93)=40080 and ω(40080)=4. In other words, we can use this method to derive an improved upper bound, but not an exact value of g(a,b). However, with an improved upper bound, we can find exact values of g(a,b) more quickly through the process referenced in § 5 and indicated by the code shown in Figure 4. Mathematica runs this code as follows: it starts with a given upper bound N on g(a,b). FrobeniusSolve then gives all pairs of non-negative integers (x,y) that are solutions to ax+by=N, and GCDs computes gcd(x,y) for each pair. AnyOnes determines if gcd(x,y)=1 for any pair, and the exclamation point in front means we determine if gcd(x,y)=1 for all pairs. When this condition is not true, that is, when there is at least one pair satisfying gcd(x,y)=1, we rule out N as the possible value of g(a,b) and the while loop moves on to N−1 to try again. The first time we reach an n such that ax+by=n has no non-negative integer solutions satisfying gcd(x,y)=1, the condition that gcd(x,y)=1 for all pairs is true, we know we have found g(a,b), and the loop terminates. Using this code with the computing power of the University of Illinois Campus Cluster, we can derive exact values of g(a,b) for all pairs a,b≤200 with gcd(a,b)=1, as shown in Figure 5.
Figure 4. Mathematica code that computes g(a,b), given an upper bound, utilizing custom functions GCDs and AnyOnes.
Figure 5. A plot of g(a,b) for all pairs a,b≤200 with gcd(a,b)=1.
Future Directions
With the glut of new data generated in the previous section, we can search for patterns to tell us more about the behavior of g(a,b). In particular, one new theorem and two new conjectures arise.
Theorem 7.1. For all gcd(ua,b)=gcd(a,b)=1 and u>1, we have g(ua,b)≥u⋅g(a,b).
This is not difficult to prove by contradiction. The following conjectures hold for all data points generated thus far:
Conjecture 7.2. For all a,b≥2 relatively prime, we have g(a,b)≥4f(a,b).
Conjecture 7.3. For all a,b≥3 relatively prime and for c(a,b) the minimum integer satisfying both c(a,b)>b and gcd(c(a,b),a)=1, we have g(a,c(a,b))/g(a,b)≤5.
One natural future direction is to see if these conjectures can be proved or disproved. We also encounter a pattern that is somewhat too subtle to propose as a formal conjecture: define K to be the set of all data points (a,b,g(a,b)) with 3≤a<b≤200. Then ∣K∣=11933, and by comparing 11933 divided by a prime p to the number of data points for which p divides g(a,b), we observe that g(a,b) seems to be disproportionately divisible by small primes: see Figure 6. What exactly is this pattern telling us, and how might we prove what we see is true?
Figure 6. Along the x-axis, primes p between 2 and 97 are plotted. In the yellow/leftmost of each pair of bars, the number of points in K for which g(a,b) is divisible by p is plotted, and in the blue/rightmost of each pair of bars, 11933/p, that is, the size of K divided by p, is plotted.
Another avenue for future study concerns focusing on the cases where b=3,4,6, as there appears to be a rich but puzzling structure here. We focus on b=3, a≡1mod3 to illustrate our point in Figure 7. At each stage, g(a,b) appears to be a roughly linear step function of a, with some aberrations in step size, but interestingly, we find different typical step sizes when we consider a≤100, a≤1000, a≤10000, and a≤100000 separately. What causes the step sizes to vary? Can we extrapolate what would happen if we consider a≤1000000 from the graphs given? How do we account for the atypical steps?
Figure 7. For b=3 and a≡1(mod3), g(a,b) is graphed as a function of a for a≤100, a≤1000, a≤10000, and a≤100000.
Our focus thus far has been limited to finding g(a,b), the greatest integer inexpressible as ax+by under the given conditions, but what of the other inexpressible integers less than g(a,b)? Is there structure lurking in their distribution? This is another puzzle for which further study may prove fruitful.
References
[1]Eisenstein, G. (1975). Personal letters to Stern. Mathematische Werke. pp. 818-819. Chelsea Pub. Co.
[2]Hardy, G.H. and E.M. Wright. (1979). An Introduction to the Theory of Numbers, pp. 23-24. Oxford University Press.
[3]Reznick, Bruce. (2012). Stern Notes. Math 595, University of Illinois, Urbana-Champaign. Spring 2012.
[4]Reznick, Bruce. (2008). Regularity properties of the Stern enumeration of the rationals. Journal of Integer Sequences, Volume 11 (2008), Article 08.4.1, 17 pp., (MR2447843, 2009g:11016, arXiv – math/0610601).
[5]Graham, R.L., D.E. Knuth, and O. Patashnik. (1990). Concrete Mathematics. pp. 115-123. Reading, MA: Addison-Wesley.
[6]Tripathi, Amitabha. (2016). Formulae for the Frobenius number in three variables. Journal of Number Theory, Volume 170 (January 2017), pp. 368-389. https://doi.org/10.1016/j.jnt.2016.05.027.
[7]Apostol, Tom M. (1976). Introduction to Analytic Number Theory, pp. 26-27. New York, NY: Springer.
[8]Apostol, Tom. (1976). Modular Functions and Dirichlet Series in Number Theory, pp. 97-99. New York, NY: Springer.
[9]Sang, Edward. (1879). On the Tabulation of all Fractions having their Values between Two Prescribed Limits. Transactions of the Royal Society of Edinburgh, Volume 28 (1879), pp. 287-298.DOI
[10]Hajdu, L. and Saradha, N. (2012). Disproof of a Conjecture of Jacobsthal. Mathematics of Computation, Volume 81, Number 280 (October 2012), pp. 2461-2471. https://doi.org/10.1090/S0025-5718-2012-02581-6.
[11]OEIS Foundation Inc. (2020). The On-Line Encyclopedia of Integer Sequences. https://oeis.org/.
[12]Costello, Fintan and Paul Watts. (2015). An Upper Bound on Jacobsthal’s Function. Mathematics of Computation, Volume 84, Number 293 (May 2015), pp. 1389-1399. https://www.jstor.org/stable/24488894.DOI