HAL Id: hal-00477408
https://hal.archives-ouvertes.fr/hal-00477408
Submitted on 30 Apr 2010
HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-entific research documents, whether they are pub-lished or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers.
L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d’enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.
COMPUTING THE FROBENIUS NUMBER
Abdallah Badra
To cite this version:
Abdallah Badra. COMPUTING THE FROBENIUS NUMBER. International Journal of Pure and Applied Mathematics, Academic Publishing Ltd, 2010, 60 (1), pp.89-105. �hal-00477408�
COMPUTING THE FROBENIUS NUMBER
Abdallah Badra
Laboratoire de Math´ematiques, Universit´e Blaise Pascal, Les C´ezeaux,
63177 Aubi`ere Cedex, France
E-mail : abdallah.badra@math.univ-bpclermont.fr
Abstract. The Frobenius number g(A) of a finite subset A ⊂ IN such that gcd(A) = 1 is the largest integer which cannot be expressed as P
a∈Aaxa with non-negative integers xa. We present
an algorithm for the computation of g(A). Without loss of general-ity we suppose that there exist a, b ∈ A such that gcd(a, b) = 1. We give a formula for g(A) in the particular case that for all c, d ∈ A, c + d can be written in the form c + d = xa + yb with x, y ≥ 0 (e.g. c + d > ab − a − b). Using Euler polynomials we give a formula for g(A) in the case that A = {a, b, c}.
AMS subj. Classification: 11D04
Key Words: Frobenius number, linear diophantine equation.
1. Introduction and Statement of Results
Throughout this paper, small letters denote integers. We will set IN = {1, 2, 3 . . . } and IN0 = IN ∪ {0}. We consider a finite subset
A ⊂ IN such that gcd(A) = 1. We define S(A) the additive semi-group of IN0 generated by A i.e. S(A) = {Pa∈Axaa | xa ∈ IN0}.
The Frobenius number g(A) is defined as the largest integer which does not belong to S(A). We are interested in computing g(A) and equivalently f (A) = g(A) +P
a∈Aa the largest integer which
can-not be expressed as P
a∈Aaxa with positive integers xa. It is well
and only if 1 ∈ A.
For card(A) ≥ 3, no general formula for g(A) is known, except in particular cases, see [6] and [8]. Algorithms are developed in [4] and [7] in the case A = {a, b, c}.
Without loss of generality, we can consider only sets A containing two coprime integers a, b (see section 2). We fix two integers a > 1 and b > 1 such that gcd(a, b) = 1, and c = (c1, . . . , cn) ∈ INn. Let
A = {a, b, c1, . . . , cn}.
For all t = (t1. . . , tn) ∈ INn0, we set t.c =
Pn
1tici.
For every m ∈ ∠Z, there exist unique integers ˆm and ˇm such that m = ˆma − ˇmb with 0 ≤ ˆm < b. We write t.c = b(t)a − a(t)b where b(t) =t.c and a(t) =∧ t.c.∨
A finite subset T of INn0 is said to be appropriate if S(A) = [
t∈T
(S(a, b) + t.c). (1)
It is said to be pruned if 0 ∈ T and for t ∈ T \ {0}, we have b(t) > 0 and a(t) > 0.
Let T be an appropriate and pruned subset of INn0. We can write T = {0 = t0, t1, . . . , tl} with 0 = b(t0) < b(t1) ≤ b(t2) ≤ · · · ≤
b(tl) < b. We set bi = b(ti), ai = a(ti) for 0 ≤ i ≤ l, bl+1 = b and
al+1 = a.
We obtain the sequences
0 = b0 < b1 ≤ b2 ≤ · · · ≤ bl < bl+1 = b
and
0 = a0 < a1, a2, . . . , al < al+1 = a.
For 0 ≤ i ≤ l, we set mi = max{aj | 0 ≤ j ≤ i} and
gi = (bi+1− 1)a − (mi+ 1)b.
Theorem 1.
g(A) = max{gi | 0 ≤ i ≤ l}.
(2)
A subset M ⊂ IN0 is said to be trimmed if for all m ∈ M \
{0}, ˇm > 0 and for all m, d ∈ M, ˆ
m < ˆd ⇔ ˇm < ˇd. (3)
We show that there exists an appropriate set T such that T.c = {t.c | t ∈ T } is trimmed.
Theorem 2. Let T be an appropriate set. If T.c is trimmed then g(A) = max{a(bi+1− bi) + ti.c | 0 ≤ i ≤ l} − (a + b)
(4)
where t0 = 0.
We give an algorithm for computing g(A). We use Theorem 1 if we start with an arbitrary appropriate set T . And we use Theorem 2 if we start with an appropriate set T such that T.c is trimmed. In a particular case we derive a formula for g(A) from Theorem 2: Theorem 3. If {c1, . . . , cn} is trimmed and for all 1 ≤ i, j ≤ n,we
have ci+ cj ∈ S(a, b) (e.g. ci+ cj > ab − a − b) then
g(A) = max{a(bi+1− bi) + ci | 0 ≤ i ≤ n} − (a + b)
(5)
where bn+1 = b, b0 = 0, c0 = 0 and for all 1 ≤ i ≤ n, bi = ˆci.
In the case n = 1, i.e. A = {a, b, c}, we take c 6∈ S(a, b) and we write c = au0− bv0 with 0 < u0 < b and 0 < v0 < a.
By successive Euclidean divisions we get: (
a = u−1 = p0v0+ u1, . . . , un−1 = pnvn+ un+1, . . .
b = v−1 = q0u0+ v1, . . . , vn−1= qnun+ vn+1, . . .
The triplet (a, b, c) is said to be of level n = n(a, b, c) if p0 = q0, p1 = q1, · · · , pn−1= qn−1
and (pn6= qn or vn+1 = 0).
Let (a, b, c) a triplet of level n. For all 0 ≤ i ≤ n, we set wi+1 =
ui−1− qivi so for i ≤ n, wi = ui and wn+1 = (pn− qn)vn+ un+1.
We denote by L(a, b, c) = (L0, L1) = ( (bvn, bwn+1) if n is even (avn, awn+1) if n is odd , l(a, b, c) = (l0, l1) = ( (awn, avn+1) if n is even (bwn, bvn+1) if n is odd .
For an integer n we denote by k(n) = k = bn2c and h(n) = h = bn+1
2 c where bxc is the greatest integer such that bxc ≤ x.
Theorem 4.
f (a, b, c) = aw2h+ bw2k+1− min{bv2h, av2k+1}
= l0+ L1− min{l1, L0}.
(7)
In particular, when pn = qn and vn+1 = 0,
f (a, b, c) = (
a gcd(b, c) + lcm(b, c) if n is even b gcd(a, c) + lcm(a, c) if n is odd. (8)
Theorem 5. Let (x−1, x0, . . . , xl+1), (y−1, y0, . . . , ym+1), (d0, d1, . . . , dl)
and (e0, e1, . . . , em) be sequences such that the following conditions
( x−1 = d0x0 − x1, . . . , xl−1 = dlxl− xl+1, y−1 = e0y0− y1, . . . , ym−1 = emym− ym+1, (9) ( a = x−1 > x0 > x1 > · · · > xl > xl+1 = 0, b = y−1 > y0 > y1 > · · · > ym > ym+1 = 0 (10)
hold. Let n be an integer such that ( d0 = e0, d1 = e1, · · · , dn−1 = en−1 and (dn 6= en or xn+1 = 0). (11) Then, f (a, b, c) = ayn+1+ b(xn−1− enxn) + max{a(yn− yn+1), bxn}. (12)
As a consequence of Theorem 5 we prove the following theorem see [7].
Theorem 6(Rodseth). Let Ri polynomials defined by induction
as follows: R−1 = 0, R0 = 1 and for all i > 0,
Ri+1= eiRi− Ri−1.
(13)
Let n be the unique integer such that yn+1 Rn+1 ≤ c a < yi Ri for all 0 ≤ i ≤ n. (14) Then, f (a, b, c) = cRn+1+ ayn− min{ayn+1, cRn}. (15)
2. Reduction to the case gcd(a, b) = 1
Let A = {b, c1, . . . , cn} be a subset of IN such that gcd(A) = 1.
We recall the following classical result: It is always possible to choose integers x, x1. . . , xn such that 1 = xb + x1c1+ · · · + xncn.
Then, for k an integer sufficiently large, we get
Hence, g(A) = g(A ∪ {a}) and gcd(a, b) = 1. In the particular case that
A = {a, b, c1, . . . , cn} such that gcd(a, b) = gcd(a, b, c1, . . . , cn−1) =
d ≥ 1 we observe that gcd(ad,bd) = 1. Therefore, to compute g(A) we can use Brauer’s formula
f (A) = df (a d, b d, c1 d, . . . , cn−1 d , cn), (16) see [3].
From now on we suppose that gcd(a, b) = 1. 3. Case n ≥ 1 We need some remarks.
R. If m ≥ 0 then a > ˇm.
Proof. Since m = ˆma − ˇmb ≥ 0 we have ba > ˆma ≥ ˇmb hence a > ˇm 2
R2. Let m = xa − yb. Then,
0 ≤ x < b ⇔ ˆm = x ⇔ ˇm = y and
−b ≤ x < 0 ⇔ ˆm = x + b ⇔ ˇm = y + a.
Proof. To prove the second claim we write m = xa − yb = (x + b)a − (y + a)b and we use the uniqueness of ˆm and ˇm 2 R. Let m = xa − yb. Then, there exists a unique integer p ∈ ∠Z such that x = pb + ˆm and y = pa + ˇm.
Proof. We write m = xa−yb = ˆma− ˇmb thus (x− ˆm)a = (y − ˇm)b. Since gcd(a, b) = 1, p = x− ˆbm = y− ˇam is an integer 2
R4. We have m ∈ S(a, b) if and only if ˇm ≤ 0.
Proof. Clearly ˇm ≤ 0 ⇒ m = ˆma − ˇmb ∈ S(a, b). Conversely, if m ∈ S(a, b) then m = xa + yb with x ≥ 0 and y ≥ 0. By R3 there exists p ∈ ∠Z such that x = pb + ˆm ≥ 0 thus p ≥ 0. We also have
−y = pa + ˇm ≤ 0 and so ˇm = −y − pa ≤ 0 2 R5. For d ≥ 0 we set G(d) = S(a, b)S(S(a, b) + d). Then, we have
m 6∈ G(d) ⇔ ˇm > 0 and ( ˆm < ˆd or ˇm > ˇd).
Proof. Let n = m − d. Since d ≥ 0, R1 shows that a > ˇd. Hence, ˇ
m − ˇd + a > ˇm. Moreover, we have n = ( ˆm − ˆd)a − ( ˇm − ˇd)b and −b < ˆm − ˆd < b. It follows from R2 that ˇn = ˇm − ˇd if ˆm − ˆd ≥ 0 and ˇn = ˇm − ˇd + a > ˇm if ˆm − ˆd < 0. We deduce that
ˇ m > 0 and ( ˆm < ˆd or ˇm > ˇd) ⇔ ˇ m > 0 and ( ˆm − ˆd ≥ 0 ⇒ ˇm − ˇd > 0) ⇔ ˇ m > 0 and ˇn > 0 ⇔
m 6∈ S(a, b) and n = m − d 6∈ S(a, b) ⇔
m 6∈ G(d)2 As a consequence of R5 we obtain R6. If T is appropriate then
m 6∈ S(A) ⇔ ˇm > 0 and ∀t ∈ T, ˆm < b(t) or ˇm > a(t). Proof of Theorem 1. For 0 ≤ i ≤ l, we set
F (i) = {m ∈ ∠Z | ˆm < bi+1 and ˇm > mi}.
Step 1. ∠Z \ S(A) = l [ i=0 F (i). (17)
Let m ∈ F (i). For every 0 ≤ j ≤ l, ˆm < bi+1 ≤ bj if j ≥ i + 1 and
ˇ
m > mi ≥ aj if j ≤ i. Hence, R6 shows that m 6∈ S(A).
Conversely, let m 6∈ S(A) then ˇm > 0 by R4. Since b0 = 0 ≤ ˆm <
b = bl+1 and 0 = b0 < b1 ≤ b1 ≤ · · · ≤ bl ≤ bl+1 = b, there exists
0 ≤ j ≤ l such that ˆm < bj+1. We put i = min{j | ˆm < bj+1}. We
thus get for 0 ≤ j ≤ i, bj ≤ bi ≤ ˆm < bi+1 and ˇm > aj by R6.
Hence, ˇm > mi. We conclude that m ∈ F (i).
Step 2. For 0 ≤ i ≤ l, gi = max F (i).
Since 0 ≤ bi+1− 1 < b, we have ˆgi = bi+1− 1 and ˇgi = mi+ 1 > mi.
We thus get gi ∈ F (i). Moreover, for all m ∈ F (i), m = ˆma − ˇmb ≤
(bi+1− 1)a − (mi + 1)b then gi = max F (i)2
In particular, when T = {0} i.e. when all ci ∈ S(a, b) we have
b0 = 0 < b1 = b, a0 = 0 and m0 = 0. Therefore, g(A) = g0 =
(b1− 1)a − (m0+ 1)b = ab − a − b = g(a, b).
Proof of Theorem 2. If T .c is trimmed then 0 = b0 < b1 < b1 <
· · · < bl < bl+1 = b and thus 0 = a0 < a1 < a1 < · · · < al < al+1 =
a. In particular, T is pruned and for all 0 ≤ i ≤ l, mi = ai. We can
write gi = a(bi+1−bi)+abi−bai−(a+b) = a(bi+1−bi)+ti.c−(a+b)
2
Algorithm.
1. For every i, we choose λi > 0 such that λici ∈ S(a, b).
Num-bers λi exist. Indeed, it is sufficient to take λi > g(a,b)
ci =
ab−a−b
ci . The following set
U = {t = (t1, . . . , tn) ∈ INn0 | ti < λi, 1 ≤ i ≤ n}
is thus appropriate.
We remove from U all elements t 6= 0 such that b(t) = 0 or a(t) ≤ 0. The set T of all remainding elements is pruned and still appropriate.
way that 0 = b(t0) < b(t1) ≤ b(t2) ≤ · · · ≤ b(tl). We compute
mi = max{aj | 0 ≤ j ≤ i}, gi = (bi+1− 1)a − (mi + 1)b and
g(A) = max{gi | 0 ≤ i ≤ l} where bi = b(ti), ai = a(ti) for
0 ≤ i ≤ l, bl+1 = b and al+1= a.
2. The algorithm can be modified as follows: For every 1 ≤ i ≤ n, we start removing from A all elements cj such that ˆci ≤ ˆcj
and ˇcj ≤ ˇci. We choose an appropriate and pruned set T =
{0 = t0, t1, . . . , tl}. We can suppose that 0 = b(t0) < b(t1) ≤
b(t2) ≤ · · · ≤ b(tl) < b. For all 0 ≤ i ≤ l, we remove from T
all tj such that (b(ti) ≤ b(tj) and a(tj) ≤ a(ti)). Considering
the set of the remainding elements we can suppose that T.c is trimmed. The Frobenius number can therefore be computed using Theorem 2.
Proof.
1. For all t ∈ INn0, we have G(t.c) = S(a, b)S(S(a, b) + t.c) ⊂ S(A) thus S
t∈UG(t.c) ⊂ S(A). Conversely, let m ∈ S(A),
then m = xa + yb +Pn
i=1xici with x ≥ 0, y ≥ 0 and xi ≥ 0.
By Euclidean division we write xi = qiλi + ti. We thus get
t = (t1, . . . , tn) ∈ U and m = xa + yb +
Pn
i=1qiλici + t.c.
Since λici ∈ S(a, b), we have m ∈ G(t.c). The equality
S(A) = [
t∈U
G(t.c) (18)
follows. Therefore, U is appropriate.
By construction T is pruned and it is still appropriate. Indeed, for t 6= 0, t.c 6∈ S(a, b)} if and only if a(t) > 0 by R4. Therefore,
T = {t ∈ U | t = 0 or t.c 6∈ S(a, b)} (19)
and S(A) = [ t∈T G(t.c). (20) 2. If ˆci ≤ ˆcj and ˇcj ≤ ˇci then cj = ci+ (ˆcj − ˆci)a + (ˇci− ˇcj)b ∈
S(ci, a, b). Therefore, g(A) = g(A \ {cj}). If b(ti) ≤ b(tj)
and a(tj) ≤ a(ti) then tj.c = ti.c + (b(tj) − b(ti))a + (a(ti) −
a(tj))b ∈ G(ti.c) thus G(tj.c) ⊂ G(ti.c). We see that (20) is
not altered by removing tj from T 2
Proof of Theorem 3. Since 2ci ∈ S(a, b) for all 1 ≤ i ≤ n,
U = {t = (t1, . . . , tn) ∈ INn0 | 0 ≤ ti ≤ 1, 1 ≤ i ≤ n} is appropriate.
Furthermore, for t = (t1, . . . , tn) ∈ U , if t.c 6∈ S(a, b) then there
exists ci and y ∈ S(a, b) such that t.c = ci + y ∈ G(ci).
There-fore, the set T = {0 = t0, t1, . . . , tn} where ti = (0, . . . , ti, . . . , 0)
and ti = 1 is also appropriate. Moreover, T .c = {0, c1, . . . , cn} is
trimmed and b(ti) = ˆci for all 1 ≤ i ≤ n 2
4. Case n = 1
Let E be a totally ordered set and x ∈ E. We call successor of x in E, and we denote x+, the smallest element of E (if there exists
any) such that x < x+.
For an appropriate set T , we put b(T ) = {b(t) | t ∈ T } and B = b(T ) ∪ {b}. We equip B with the natural order ≤.
To apply Theorem 2, in the case that n = 1, it is convenient to formulate it as follows:
Theorem 20. Let T be an appropriate set such that T .c is trimmed. Then,
g(A) = max{a(b(t)+− b(t)) + t.c | t ∈ T } − (a + b) (21)
where b(t)+ is the successor of b(t) in B.
Suppose that there exists integers α1, . . . , αqand a partition E1, . . . , Eq
of T such that b(t)+− b(t) = α
i for all t ∈ Ei and for all 1 ≤ i ≤ q.
Then,
g(A) = max{aαi+ βi | 1 ≤ i ≤ q} − (a + b)
(22)
where we put βi = max Ei.c.
To compute such a partition, we are led to introduce what we call Euler order on T . We will use Euler polynomials.
Euler polynomials
Let (q0, q1, . . . , qi, . . . ) be a sequence of positive integers. We define
Euler polynomials Qi by induction as follows: Q−1 = 0, Q0 = 1 and
for i ≥ 0,
Qi+1(q0, . . . , qi) = qiQi(q0, . . . , qi−1) + Qi−1(q0, . . . , qi−2).
(23)
We set Qi+1 = Qi+1(q0, . . . , qi), Q1i = Qi(q1, . . . , qi), Pi+1 = Qi +
Qi+1 and Pi+11 = Q1i + Q1i+1.
We deduce immediately that
Qn+1 = qnQn+ qn−2Qn−2+ . . . + qn−2iQn−2i+ Qn−2i−1
(24)
for 0 ≤ 2i ≤ n. Euler order ≤e
Proposition 1. Every integer t ∈ IN0 can be written uniquely in
the form t = t0Q0+ t1Q1+ · · · + tnQn (25) where min{i | ti > 0} is even , (26)
0 ≤ ti ≤ qi for 0 ≤ i ≤ n
(27) and
ti = qi ⇒ ti−1 = 0 for 1 ≤ i ≤ n.
(28)
Equality (25) is called Euler expansion of t.
Proof. There exists n ∈ IN0 such that t < Qn+1. By successive
Euclidean divisions we can write t = tnQn+ sn with 0 ≤ sn < Qn, sn = tn−1Qn−1+ sn−1 with 0 ≤ sn−1 < Qn−1, .. . s2 = t1Q1+ s1 with 0 ≤ s1 < Q1, s1 = t0Q0 with t0 = s1.
We put i = min{j | tj > 0}. If i = 2e then t = t2eQ2e+t2e+1Q2e+1+
· · · + tnQn is Euler expansion of t. If i = 2e + 1, using (24)
we take t = q0Q0 + · · · + q2eQ2e + (t2e+1 − 1)Q2e+1 + · · · + tnQn
as Euler expansion of t. Conditions (27) and (28) follow from si+1 < Qi+1= Qi−1+qiQi. The uniqueness follows from the
unique-ness of the Euclidean division and the fact that P2e
i=0tiQi < Q2e+1
if and only if there exists 0 ≤ j ≤ e such that t2j < q2j 2
For t, x ∈ IN0, let n ∈ IN0 such that t, x ≤ Qn+1. We consider
Euler expansions of t and x respectively
t = t0Q0+ t1Q1+ · · · + tnQn and x = x0Q0+ x1Q1+ · · · + xnQn.
We define Euler order ≤e as follows: t ≤ex if
(t0, −t1, . . . , (−1)iti, . . . , (−1)ntn) ≤l (x0, −x1, . . . , (−1)ixi, . . . , (−1)nxn)
where ≤l is the lexicographic order on ∠Zn.
Lemma. Let n ∈ IN0. We consider Un = {0, 1, . . . , Qn+1− 1} and
1. We define a partition of Un= F1∪ F2 as follows: F1 = ( {0, 1, . . . , Q2k+1− Q2k− 1} if n = 2k {Q2k+1, . . . , Q2k+2− 1} if n = 2k + 1 F2 = ( {Q2k+1− Q2k, . . . , Q2k+1− 1} if n = 2k {0, 1, . . . , Q2k+1− 1} if n = 2k + 1 .
Then, the successor, in Un, of all t ∈ F1 (resp. t ∈ F2) is t+ =
t + (−1)nQn (resp. t+= t + (−1)n[Qn− Qn+1]). In particular,
if qn= 1 then for all t ∈ F2, t+= t + (−1)n−1Qn−1.
2. We define a partition of Vn = E1 ∪ E2 as follows: E1 =
{0, . . . , Q2h−1 − 1}, E2 = {Q2h−1, . . . , Pn − 1}. Then, the
successor, in Vn, of all t ∈ E1 (resp. t ∈ E2) is t+ = t + Q2k
(resp. t+= t − Q 2h−1).
Proof. Let t = t0Q0+ t1Q1 + · · · + tnQn be Euler expansion
of t.
1. (a) Suppose that t ∈ F1. It is easily seen that tn > 0 if
n = 2k + 1 and tn < qn− 1 or (tn = qn− 1 and tn−1 = 0)
if n = 2k. Therefore, t+= t + (−1)nQ n.
(b) Suppose that t ∈ F2, then t = t0Q0+ t1Q1+ · · · + t2kQ2k.
Since t < Q2k+1, there exists j ≤ k such that t2j <
q2j. Taking i = max{j | t2j < q2j} we can write t =
t0Q0+ t1Q1+ · · · + t2iQ2i+ [q2i+2Q2i+2+ · · · + q2kQ2k] =
t0Q0+ t1Q1+ · · · + t2iQ2i− Q2i+1+ Q2k+1.
If t2i < q2i− 1 or (t2i = q2i − 1 and t2i−1 = 0) then
t+ = t0Q0+ t1Q1+ · · · + (t2i+ 1)Q2i+ (q2i+1− 1)Q2i+1+
· · · + q2h−1Q2h−1 = t + Q2h− Q2k+1.
If t2i = q2i− 1 and t2i−1 > 0 then t+ = t0Q0 + t1Q1 +
· · · + (t2i−1− 1)Q2i−1+ q2i+1Q2i+1+ · · · + q2h−1Q2h−1 =
2. It is a particular case: Taking qn= 1 we get Pn = Qn−1+Qn =
Qn+1 and Vn = Un. Moreover, in this case we have E1 = F2
and E2 = F1 if n = 2k and E1 = F1and E2 = F2 if n = 2k + 1
2
Let (r = r−1, r0, . . . , rn) and (q0, q1, . . . , qn) be sequences of
positive integers and rn+1 ≥ 0. We suppose that
ri−1 = qiri+ ri+1
(29)
for 0 ≤ i ≤ n.
We thus have r > r0 > r1 > · · · > rn > 0 and rn−1 > rn+1 ≥ 0.
We prove by induction the following identities: r = riQi+1+ ri+1Qi
(30) and
r0Qi = (−1)iri+ rQ1i−1.
(31)
It follows from (31) that
r0Pi+1 = (−1)i(ri − ri+1) + rPi1.
(32)
Let t ∈ IN0. Given t = t0Q0+ t1Q1+ · · · + tnQnits Euler expansion,
we associate with t the following numbers: r(t) = Pn
i=0(−1) it iri and E(t) =Pn i=0tiQ 1
i−1. It follows from (31) that
tr0 = r(t) + rE(t). (33) Moreover, if 0 < t < Qn+1 then rn ≤ r(t) ≤ r − rn (34) and if 0 < t < Pn then r2k ≤ r(t) ≤ r − r2h−1 (35)
Indeed, for 0 < t < Qn+1, let t = t0Q0 + · · · + tnQn be Euler
expansion of t. We can write t = Pk
i=et2iQ2i +
Ph−1
i=e t2i+1Q2i+1
with t2e > 0. Hence, r(t) = Pki=et2ir2i−Ph−1i=e t2i+1r2i+1.
Using r2e =
Ph−1
i=e q2i+1r2i+1+ r2h we get
r(t) = (t2e− 1)r2e+
Pk
i=e+1t2ir2i
+Ph−1
i=e(q2i+1− t2i+1)r2i+1+ r2h.
Now if n = 2k + 1 we get r2h+ r2k+1 ≤ r(t) ≤ k X i=0 q2ir2i= r − r2k+1= r − rn. (36)
If n = 2k there exists j ≤ k such that t2j < q2j since otherwise
t = Qn+1. We then get
rn≤ r(e) ≤ r(t) ≤ r − r2j− r2k+1 ≤ r − r2k− r2k+1.
(37)
Hence, assumption (34) follows. In the particular case that qn = 1
we have Pn = Qn+1 and rn−1 = rn+ rn+1. In this case if n = 2k
we get rn−1 ≤ r(t) ≤ r − rn by (36) and if n = 2k + 1 we get
rn≤ r(t) ≤ r − rn−1 by (37) thus assumption (35) follows 2
Proposition 2. We suppose that rn+1= 0. We equip {0, 1, . . . , r−
1} with the natural order ≤ and Un = {0, 1, . . . , Qn+1− 1} with
Eu-ler order ≤e. Then, the mapping (Un, ≤e) → ({0, 1, . . . , r − 1}, ≤
), t 7→ r(t) is strictly increasing. Proof. Given t ≤e x in Un we have
(t0, −t1, . . . , (−1)jtj, . . . , (−1)ntn) ≤l (x0, −x1, . . . , (−1)jxj, . . . , (−1)nxn)
and r(x)−r(t) = (−1)j(x
j−tj)rj+Pni=j+1(−1)ixiri−Pni=j+1(−1)itiri
1. When j = 2i we get x2i> t2i≥ 0 and x2i+1≤ q2i+1−1. Then,
r(x) − r(t) = (x2i− t2i)r2i+ [−x2i+1r2i+1+ · · · + (−1)nxnrn] −
[−t2i+1r2i+1 + · · · + (−1)ntnrn] ≥ (x2i − t2i)r2i − [(q2i+1 −
1)r2i+1+ · · · + q2h−1r2h−1] − [q2i+2r2i+2+ · · · + q2kr2k] ≥ (x2i−
t2i)r2i− r2i+ r2h+ r2k+1> 0.
2. When j = 2i − 1 we get t2i−1 > x2i−1 ≥ 0 and t2i ≤ q2i−
1. Then, r(x) − r(t) = (t2i−1 − x2i−1)r2i−1+ [x2ir2i+ · · · +
(−1)nx
nrn] − [t2ir2i+ · · · + (−)ntnrn] ≥ (t2i−1− x2i−1)r2i−1−
[q2i+1r2i+1+ · · · + q2h−1r2h−1] − [(q2i− 1)r2i+ · · · + q2kr2k] ≥
(t2i−1− x2i−1)r2i−1+ r2h− r2i−1+ r2k+1> 0 2
Now we consider another sequence of positive integers (s = s−1, s0, s1, . . . , sn) and sn+1 ≥ 0 such that si−1 = qisi + si+1 for
0 ≤ i ≤ n.
We also define s(t) =Pn
i=0(−1) it
isi.
Using (31) we prove the following identity
(rs0− sr0)Qi = (−1)i(rsi− sri).
(38) We derive
(rs0− sr0)Pi+1= (−1)i[r(si− si+1) + s(ri+1− ri)]
(39) from (32) and t(rs0− sr0) = rs(t) − sr(t) (40) from (33). Proof of Theorem 4.
First step : Reduction to the case n = 2k. Suppose that n = n(a, b, c) = 2k + 1.
Since g(a, b, c) = g(b, a, c), it suffices to show that n(b, a, c) is even, L(a, b, c) = L(b, a, c) and l(a, b, c) = l(b, a, c).
We write c = b(a − v0) − a(b − u0). We consider two cases:
If p0 = q0 > 1 then we can write a = (a − v0) + v0, a − v0 =
(q0− 1)v0+ v1, b = (b − u0) + u0, b − u0 = (q0− 1)u0+ u1.
There-fore, n(b, a, c) = n(a, b, c) + 1, L(b, a, c) = L(a, b, c) and l(b, a, c) = l(a, b, c).
If p0 = q0 = 1 we get a − v0 = u1 and b − u0 = v1. We therefore get
a = (q1+ 1)(a − v0) + v2 and b = (p1+ 1)(b − u0) + u2. It follows that
n(b, a, c) = n(a, b, c)−1. Furthermore, we observe that if n(a, b, c) > 1 then we have obviously L(a, b, c) = L(b, a, c) and l(a, b, c) = l(b, a, c). If n(a, b, c) = 1 we have L(b, a, c) = (av1, a(b − (q1 +
1)v1)) = (av1, a(u0− q1v1)) = L(a, b, c) and l(b, a, c) = (bu1, bv2)) =
l(a, b, c). In both cases, n(b, a, c) is even. Therefore, the assumption follows.
Moreover, we can write
c = wnwn+1− vnvn+1.
(41)
Since c > 0, we get wn+1 = (pn− qn)vn+ un+1 > 0 thus pn > qn or
(pn= qn and vn+1 = 0). When pn = qn and vn+1 = 0 we then have
c = wnwn+1 = unun+1.
(42)
In the following steps we suppose that n = 2k. Second step: Case pn > qn.
Taking a = r, v0 = r0, b = s and u0 = w0 = s0 it follows from
(39) that cPn+1 = a(wn− vn+1) + b(wn+1 − vn) ∈ S(a, b) because
wn+1> vn and wn> vn+1. Moreover, it follows from (40) and (35)
that s(t) = b(t) and r(t) = a(t). Hence, for all 0 < t < Pn+1,
tc = ab(t) − ba(t) 6∈ S(a, b) by R4. We conclude that Pn+1 = min{t > 0 | tc ∈ S(a, b)}
(43)
and by (19)-(20), that Vn= {0, 1, . . . , Pn+1− 1} is appropriate. Let
x−t < Pn+1, we have 0 < (x−t)c = (b(x)−b(t))a−(a(x)−a(t))b 6∈
S(a, b). Then, b(x) < b(t) if and only if a(x) < a(t) by R4.
Furthermore, it follows from proposition 2 that b(t)+ − b(t) = b(t+) − b(t) = b(t+ − t). Writing Vn = E1 ∪ E2 with the
no-tation of the lemma, Theorem 2 and (22) show that g(a, b, c) = max{aα1+ β1, aα2+ β2} − (a + b) where α1 = b(t+) − b(t) = b(Qn)
for all t ∈ E1, α2 = b(t+) − b(t) = −b(Qn+1) for all t ∈ E2, and
βi = max Ei.c.
It follows from (31) that α1 = wn, and α2 = vn+1. Moreover, we
see that β2 = c(Pn+1− 1), β1 = c(Qn+1− 1) = −cQn+ cPn+1− c =
bvn− awn+ cPn+1− c by (38). We therefore obtain the formula
g(a, b, c) = cPn+1+ max{avn+1, bvn} − (a + b + c)
(44)
which can be written in the form
f (a, b, c) = a(wn− vn+1) + b(wn+1− vn) + max{avn+1, bvn}
(45)
by (39). Finally,
f (a, b, c) = awn+ bwn+1− min{avn+1, bvn}.
(46)
Third step: Case pn= qn and vn+1= 0.
We have cQn+1 = bwn+1 ∈ S(a, b) by (38) and for all 0 < t < Qn+1,
tc = ab(t) − ba(t) 6∈ S(a, b)) by (34). We deduce that Qn+1 = min{t > 0 | tc ∈ S(a, b)}.
(47)
Using (19)-(20) we show by a similar argument that Un = {0, 1, . . . , Qn+1−
1} is appropriate and Un.c is trimmed. Furthermore, since vn+1 = 0
the lemma show that b(t+) − b(t) = w
n for all t ∈ Un . Therefore,
by (21) f (a, b, c) = awn+ cQn+1= awn+ bwn+1.
b = wnQn+1 by (30). Using (42) we deduce that lcm(b, c) = bwn+1
2
Remark. The case that (pn = qn and vn+1 = 0) can be
deduced from Brauer’s formula (16): We put d = gcd(b, c) = gcd(b, w0) = wn, c0 = dc = wn+1 and b0 = db = Qn+1. Using (30)
we get a = vnQn+1 + wn+1Qn > wn+1Qn+1 = b0c0. We thus have
f (a, b0, c0) = g(a, b0, c0) + a + b0+ c0 = b0c0+ a. Hence, (16) show that f (a, b, c) = df (a, b0, c0) = bc0+ da = lcm(b, c) + a gcd(b, c) 2
Proof of Theorem 5. We first prove by induction that polyno-mials Ri satisfy the following properties: For i ≤ n,
cRi = ayi− bxi,
(48)
cRn+1 = ayn+1− b(enxn− xn−1),
(49)
y−1 = yiRi+1(e0, . . . , ei) − yi+1Ri(e0, . . . , ei−1)
(50)
and for j ≤ i,
yj−1 = yiRi−j+1(ej, . . . , ei) − yi+1Ri−j(ej, . . . , ei−1).
(51)
In the particular case that ej = ej+1 = · · · = ei = 2, we get
Ri−j+1(ej, . . . , ei) = (i − j + 2)
(52) and
yj−1− yj = yj− yj+1 = · · · = (yi− yi+1)
(53)
so in this case (51) can be written in the form yj−1 = (i − j + 2)(yi− yi+1) + yi+1.
Now we consider the set
K = {ei | i = 0 or (0 < i < m and ei > 2)} = {e0 = ek0, ek1, . . . , eks−1}
and we set ks= m. We can suppose that 0 = k0 < k1 < · · · < ks =
m. We have y−1 = (e0− 1)y0+ (y0− y1) (55) and for 0 < i ≤ s, yki−1− yki = (eki− 2)yki+ (yki − yki+1). (56)
Furthermore, (54) show that
yk(i−1) = (ki− k(i−1))(yki−1− yki) + yki
(57)
and (53) that for 0 < i < s,
yk(i−1) − yk(i−1)+1 = · · · = yki−1− yki > yki.
(58)
To apply Theorem 4 we set
v−1 = y−1, u0 = y0, v1 = (y0− y1), q0 = (e0− 1)
and for 0 < i < s,
v2i−1 = yki−1− yki, u2i= yki, q2i = (eki− 2), p2i−1 = (ki− k(i−1)).
Furthermore, if em > 2 we set v2s−1 = (ym−1−ym), v2s+1 = ym+1 = 0, p2s−1 = (m−k(s−1)), u2s = ym, q2s = (em−1) and if em = 2 we set v2s−1 = ym, p2s−1 = (m + 1 − k(s−1)) and u2s = ym+1 = 0. We thus get v−1 > u0 > · · · > v2i−1 > u2i > v2i+1> · · ·
and
v2i−1= q2iu2i+ v2i+1; u2i = p2i+1v2i+1+ u2i+2.
Using (11) we get c = ay0−bx0 = xnyn(dn−en)+xnyn+1−ynxn+1 >
0. Then, dn > en or (dn = en and xn+1 = 0).
To prove (12) we consider two cases: Case n = 0.
We can write a = (d0−1)x0+ (x0−x1) and b = (e0−1)y0+ (y0−y1)
with d0−1 > e0−1 or d0−1 = e0−1 and x1 = 0. Then, L(a, b, c) =
(bx0, b(a − (e0 − 1)x0)), l(a, b, c) = (ay0, a(y0 − y1)). We conclude
that f (a, b, c) = ay0 + b(a − (e0 − 1)x0) − min{a(y0− y1), bx0} =
ay1+ b(a − e0x0) + max{a(y0− y1), bx0} by (7).
Case n > 0.
Let r = max{i | ki < n}.
1. Suppose that dn ≥ en > 2. We can write xn−1− xn = (dn−
2)xn+(xn−xn+1) and yn−1−yn= (en−2)yn+(yn−yn+1) with
dn− 2 > en− 2 or dn− 2 = en− 2 and xn+1 = 0. It follows
that the level of (a, b, c) is even, L(a, b, c) = (bxn, b(xn−1 −
(en − 1)xn) and l(a, b, c) = (ayn, a(yn − yn+1)). Therefore,
f (a, b, c) = ayn+1+ b(xn−1− enxn) + max{a(yn− yn+1), bxn}
by (7).
2. Suppose that dn > en = 2. We thus have k(r+1) > n. we
can write ykr = (k(r+1)− kr)(yk(r+1)−1 − yk(r+1)) + yk(r+1) and
xkr = (n − kr)(xn−1− xn) + xn by (57). Moreover, we have
yk(r+1)−1−yk(r+1) = yn−1−yn= yn−yn+1by (53) and ykr−(n−
kr)(yn−1− yn) = yn by (54). Therefore, the level of (a, b, c) is
odd, L = (a(yn− yn+1), ayn) and l = (b(xn−1− xn), bxn). We
deduce that f (a, b, c) = ayn+1+ b(xn−1− 2xn) + max{a(yn−
3. Suppose that dn = en = 2 and xn+1 = 0 then k(r+1) ≥ n +
1. Using (57) we can write ykr = (k(r+1) − kr)(yk(r+1)−1 −
yk(r+1)) + yk(r+1) = (n + 1 − kr)(yn− yn+1) + yn+1 and xkr =
(n + 1 − kr)xn. Hence, the level of (a, b, c) is odd. Since
ykr − (n + 1 − kr)(yn− yn+1) = yn+1, we get L = (a(yn−
yn+1), ayn+1) and l = (bxn, 0). Therefore, f (a, b, c) = ayn+1+
bxn = ayn+1+ max{a(yn− yn+1), bxn} because, by (48), we
have bxn− ayn+ ayn+1= −cRn+ cRn+1 and it is easily seen
that −cRn+ cRn+1 < 0.
Finally we have proved that
f (a, b, c) = ayn+1+ b[xn−1− enxn] + max{a(yn− yn+1), bxn}2
(59)
To prove Theorem 6 we observe, using (48)-(49), that (11) and the following condition yn+1 Rn+1 ≤ c a < yi Ri for all 0 ≤ i ≤ n. (60)
are equivalent. Taking account of (48)-(49) we obtain f (a, b, c) = cRn+1+ ayn− min{ayn+1, cRn}2 (61) 5. Examples 1. A = {31, 44, 462, 674, 402, 932, 1214}. We take a = 31, b = 44. We obtain (462,∧ 674,∧ 402,∧ 932,∧ 1214) = (22, 26, 30, 40, 42)∧ and (462,∨ 674,∨ 402,∨ 932,∨ 1214) = (5, 3, 12, 7, 2).∨
We remove 674, 932, 1214 from A without altering g(A). We consider (a, b, c1, c2) = (31, 44, 462, 402). Applying Theorem
2. A = {57, 83, 367, 543, 605}. We take a = 57, b = 83. We have (367,∧ 543,∧ 605) = (21, 27, 31),∧ ( ∨ 367, ∨ 543, ∨ 605) = (10, 12, 14), B = b(T )∪{b} = {21, 27, 31, 42, 48, 52, 58, 62, 63, 69, 73, 79, 83}, A = a(T )∪{a} = {10, 12, 14, 20, 22, 24, 26, 28, 30, 32, 34, 36, 57}. We obtain g(A) = 1603. 3. A = {a, b, c} = {137, 250, 337}. We have (ˆc, ˇc) = (101, 54), l = 4, B = {53, 101, 154, 202, 250}, A = {25, 54, 79, 108, 137}. Using Theorem 2 we obtain
g(137, 250, 337) = max{g1, g2, g3} = 7537.
Let us compute g(A) by Theorem 5. We get n(a, b, c) = 1, L(a, b, c) = (6576, 7261), l(a, b, c) = (7250, 6250). We obtain g(a, b, c) = 7250 + 7261 − 6250 − 137 − 250 − 337 = 7537.
References
[1] A. Brauer, On a problem of partitions, Amer. J. Math. 64, (1942), 299-312.
[2] A. Brauer, B. M. Seelbinder, On a problem of partitions II, Amer. J. Math. 76, (1954), 343-346.
[3] A. Brauer, J. E. Shockley, On a problem of Frobenius, J. reine angew. Math. 211, (1962), 215-220.
[4] J. L. Davison, On the linear diophantine problem of Frobenius, Journal of Number Theory 48, (1994), 353-363.
[5] P. Erd¨os, R. L. Graham, On a linear diophantine problem of Frobenius, Acta Arith. 21, (1972), 399-408.
[6] M. Raczunas, P. Chrstowski-Wachtel, A diophantine problem of Frobenius in terms of the least common multiple, Discrete Mathe-matics, 150, (1996), 347-357.
J. reine angew. Math. 301, (1978),171-178.
[8] E.S. Selmer, On the linear diophantine problem of Frobenius, J. reine angew. Math. 293/294, (1977),1-17.