On Some Functions Involving The LCM and GCD of Integer Tuples
On Some Functions Involving The LCM and GCD of Integer Tuples
On Some Functions Involving The LCM and GCD of Integer Tuples
O. Bagdasar
Abstract: In this paper an explicit formula for the number of tuples of positive integers having
the same lowest common multiple n is derived, and some of the properties of the resulting
arithmetic function are analyzed. The tuples having also the same greatest common divisor are
investigated, while some novel or existing integer sequences are recovered as particular cases.
A formula linking the gcd and lcm for tuples of integers is also presented.
Keywords: divisibility, lowest common multiple, greatest common divisor, integer sequences
1 Introduction
The least common multiple of two natural numbers a and b, is usually denoted by lcm(a, b)
or [a, b], and is the smallest number divisible by both a and b [5, §5.1, p.48]. The dual
notion is the greatest common divisor, denoted by gcd(a, b) or (a, b) which is the largest
number that divides both a and b. The lcm and gcd can also be defined for any k-tuple of
natural numbers a1 , . . . , ak , where k ≥ 2.
For n = pn11 pn22 . . . pnr r , the number of ordered pairs (a, b) having the same lcm n is
where | | is the cardinality of a set [10]. If n is square-free we have 3ω (n) [4, ex. 2.4, p.101]),
where ω (n) denotes the number of prime divisors of n.
The number of relatively prime ordered pairs (a, b) having the same lcm n is (see [8])
A property linking the lcm and gcd of the integer pair (a, b) is (see [5])
The aim of this paper is to extend the above results to general tuples of integers.
Manuscript received March 21 ; accepted June 28
O. Bagdasar is with the School of Computing and Mathematics, University of Derby, Kedleston Road,
Derby DE22 1GB, England, U.K., o.bagdasar derby.ac.uk
91
92 O. Bagdasar
The number of k-tuples of positive integers with the least common multiple n is
and some identities and inequalities involving the above arithmetic function are presented.
A few sequences indexed in the On-Line Encyclopedia of Integer Sequences (OEIS) [7],
are obtained as particular cases.
The number of ordered k-tuples with the same gcd d and lcm n is defined by
and a number of properties of this function are analyzed. In the process, some families of
integer sequences not currently indexed in the OEIS are produced.
Finally, a property linking the lcm and gcd for k-tuples of integers which generalizes
formula (3) is presented, accompanied by a brief proof based on [9].
2 Main results
In this section the proofs for the formulae of LCM and GL are provided, along with a result
linking the lcm and gcd computed for k-tuples of integers.
Theorem 2.1 Let k and n be naturals numbers. If n has the factorization n = pn11 pn22 . . . pnr r ,
the number of ordered k-tuples whose lcm is n is given by the formula
r [ ]
LCM(n; k) = ∏ (ni + 1)k − nki . (6)
i=1
Remark 2.1 For particular values of k, one recovers the following OEIS indexed integer
sequences: A048691 for LCM(n; 2) (linked to numerous algebraic interpretations), and
A070919, A070920, A070921 for LCM(n; 3), LCM(n; 4), LCM(n; 5), respectively.
The following result illustrates the independence of LCM(n; k) on the prime factors.
Corollary 2.1 Let k be a natural number and n = pn11 pn22 . . . pnr r , m = qn11 qn22 . . . qnr r , such
that all numbers p1 , . . . , pr , q1 , . . . , qr are distinct. Then LCM(m; k) = LCM(n; k).
Proof. From (6), LCM(n; k) only depends on the multiplicities of the prime factors, and not
on the prime factors themselves. In this case
r [ ]
LCM(m; k) = ∏ (ni + 1)k − nki = LCM(n; k)
i=1
Considering relatively prime numbers m and n, one obtains the consequence below,
which here is proved using a direct method.
Corollary 2.2 Let m, n be integers satisfying (m, n) = 1. The following property holds
LCM(m · n; k) = LCM(m; k) · LCM(n; k). (9)
Proof. Consider the following factorizations of m = qm 1 m2 ms n1 n2
1 q2 . . . qs and n = p1 p2 . . . pr .
nr
with the prime factors not necessarily in an increasing order. By formula (6) one obtains
r [ ] s [ ]
LCM(m · n; k) = ∏ (mi + 1)k − mki · ∏ (n j + 1)k − nkj = LCM(m; k) · LCM(n; k),
i=1 j=1
For LCM(n; k) we can check directly the property relative to lcm and gcd.
Corollary 2.3 Let a, b be natural numbers. The following property holds:
LCM (gcd(a, b); k) · LCM (lcm(a, b); k) = LCM (a; k) · LCM (b; k) . (11)
Proof. Assume that the factorizations of n, d, a, b are n = pn11 pn22 . . . pnr r ,
d= pd11 pd22 . . . pdr s
α1 α2 α β1 β 2 βr
and a = p1 p2 . . . pr r , b = p1 p2 . . . pr , where some of the powers may be zero. Using
the relation (6), it is sufficient to prove the formula for just one fixed value i from 1, . . . , r.
The contribution of the prime factor pi to formula (11) is
[ ] [ ] [ ] [ ]
(ni + 1)k − nki · (di + 1)k − dik = (αi + 1)k − αik · (βi + 1)k − βik
This relation is true, as di = min{αi , βi } and ni = max{αi , βi }.
Some inequalities for LCM(n; k) can also be proved, for general values of m and n.
Theorem 2.2 Let k, m and n be natural numbers. The following inequality holds
LCM(m · n; k) ≤ LCM(m; k) · LCM(n; k) (12)
To prove this theorem, we shall first prove the following result.
Lemma 2.3 Let k ≥ 2, p be a prime number and α , β ≥ 1 natural numbers. Then
LCM(pα +β ; k) ≤ LCM(pα ; k) · LCM(pβ ; k) (13)
Proof. The inequality (13) is then equivalent to
[ ] [ ] [ ]
(α + β + 1)k − (α + β )k ≤ (α + 1)k − α k · (β + 1)k − β k . (14)
(k )
From (6) we have LCM(pα +β ; k) = (α + β + 1)k − (α + β )k = ∑k−1 l=0 l (α + β ) (, )
l then
( )
LCM(pα ; k) = (α + 1)k − α k = ∑k−1 i β
i=0 i α and LCM(p ; k) = (β + 1) − β = ∑ j=0 j β .
k k k k−1 k j
Lemma 2.4 Let d < n be positive integers, such that d|n. The number of ordered pairs
(a, b) with the same greatest common divisor d and least common multiple n is
where ω (x) represents the number of distinct prime divisors for the integer x.
where 1 ≤ di ≤ ni for i = 1, . . . , r.
As d = (a, b) and n = [a, b], di = min{αi , βi } and ni = max{αi , βi } for each i ∈ {1, . . . , r}.
Also, the numbers a and b are distinct, or otherwise d = n. There are two possibilities.
When di = ni , one has αi = βi = di = ni . Each choice of i ∈ I = {i ∈ {1, . . . , n} : di < ni }
generates two possible pairs (αi , βi ) ∈ {(di , ni ), (ni , di )}, hence in total there are 2|I| distinct
pairs of powers. As the prime decomposition of n/d is
one obtains that |I| = ω (n/d). This ends the proof. For d = 1 one recovers the result (2),
representing the number of unitary divisors, indexed as A034444 in the OEIS.
The following result relates GL(d, n; k) to the set of relatively prime tuples, and shows
that finding GL(d, n; k) can be reduced to evaluating GL(1, n/d; k).
Lemma 2.5 Let k and d|n be natural numbers. If d = pd11 pd22 . . . pdr r and n = pn11 pn22 . . . pnr r ,
the number of ordered k-tuples whose gcd is d, and lcm is n satisfies the property
with di ≤ ai j ≤ ni (i = 1, . . . , r). Because their gcd is d and lcm is n, one needs to have
for each pi , i = 1, . . . , r. The number of tuples in (17) is the same as of the tuples satisfying
min{a′i1 , . . . , a′ik } = 0, max{a′i1 , . . . , a′ik } = ni − di ,
which relate to the k-tuples having the properties (a′1 , . . . , a′k ) = 1 and [a′1 , . . . , a′k ] = n/d.
This ends the proof.
Lemma 2.6 Let k and α be positive integers. The number of tuples (α1 , . . . , αk ) satisfying
T(α ; k) = |{(α1 , . . . , αk ) : min (α1 , . . . , αk ) = 0, max (α1 , . . . , αk ) = α }| (18)
is given by the formula
T(α ; k) = (α + 1)k − 2α k + (α − 1)k . (19)
Proof. Consider the term T(α ; k +1) representing the number of (k +1)-tuples (α1 , . . . , αk+1 )
whose min is 0 and max is α . There are three distinct cases, depending on the value of αk+1 .
1. αk+1 = 0. In this case the k-tuple (α1 , . . . , αk ) has to satisfy max(α1 , . . . , αk ) = α .
Following the argument used in Theorem 2.1, the number of k-tuples having this
property is (α + 1)k − α k .
2. αk+1 = n. Here the restriction on the k-tuple (α1 , . . . , αk ) is min(α1 , . . . , αk ) = 0.
Similarly as above, the number of k-tuples with this property is (α + 1)k − α k .
3. 0 < αk+1 < n. For each of the (α −1) possible values of αk+1 , the k-tuples (α1 , . . . , αk )
satisfy min(α1 , . . . , αk ) = 0 and max(α1 , . . . , αk ) = α , and their number is T(α ; k).
By counting all the (k + 1)-tuples for a fixed α , the terms T(α ; k) satisfy the recurrence
[ ]
T(α ; k + 1) = 2 (α + 1)k − α k + (α − 1)T(α ; k) (20)
For α ≥ 1 one has T(α ; 0) = T(α ; 1) = 0, while from the proof of Lemma 2.5, T(α ; 2) = 2.
Writing the recursion until T(α ; 1), one obtains
k [ ]
T(α ; k + 1) = 2 ∑ (α − 1)i (α + 1)k−i − α k−i + (α − 1)k+1 T (α ; 0)
i=0
k [ ]
= 2 ∑ (α − 1)i (α + 1)k−i − (α − 1)i α k−i
i=0
[ ]
(α + 1)k+1 − α k+1 α k+1 − (α − 1)k+1
= 2 −
2 1
= (α + 1)k+1 − 2α k+1 + (α − 1)k+1 ,
( )
where the relation ak+1 − bk+1 = (a − b) ak + ak−1 b + · · · + abk−1 + bk valid for any a, b
was used. The result proves (19), which could also be checked by mathematical induction.
Here the direct proof was preferred, as it shows how the formula can be derived.
On some functions involving the lcm and gcd of integer k-tuples 97
For a simplified notation we may define L(n; k) := GL(1, n; k), for positive integers k, n.
The formula for L(n; k) now follows as a direct consequence of Lemma 2.6.
Theorem 2.7 Let k and n be naturals numbers. If n has the factorization n = pn11 pn22 . . . pnr r ,
the number of ordered k-tuples whose gcd is 1 and lcm is n, is given by the formula
r [ ]
L(n; k) = ∏ (ni + 1)k − 2nki + (ni − 1)k . (21)
i=1
with 0 ≤ ai j ≤ ni (i = 1, . . . , r). Because their gcd is 1 and lcm is n, one needs to have
for each pi , i = 1, . . . , r, which from Lemma 2.6 produces (ni + 1)k − 2nki + (ni − 1)k tuples.
By taking the product over all factors pi , i = 1, . . . , r one obtains (21).
The following properties of L(n; k) are direct consequences of formula (21), similar to
the results obtained for LCM(n; k). For this reason these are presented here without proofs.
The first property suggests the exclusive dependence of L(n; k) on the prime factorization.
Corollary 2.4 Let k be a natural number and n = pn11 pn22 . . . pnr r , m = qn11 qn22 . . . qnr r , such
that all numbers p1 , . . . , pr , q1 , . . . , qr are distinct. Then L(m; k) = L(n; k).
The following results states the multiplicity of the arithmetic function L(n; k) for k ≥ 2.
Corollary 2.5 Let m, n be comprime integers and k ≥ 2. The following property holds
Preliminary investigations suggest that the inequality L(m · n; k) ≤ L(m; k) · L(n; k) is true.
However, a complete solution is not known to the author.
98 O. Bagdasar
3 Discussion
The research originated in the counting problem solved by the authors in [2]. There, the
Horadam sequences with a fixed period were enumerated using a formula involving all the
pairs of numbers having the same lcm, given by formula (1).
In this paper an explicit formula for the number of integer k-tuples with the same lcm
n denoted by LCM(n; k), was established. Some properties of this arithmetic function were
explored, being shown that LCM(n; k) is multiplicative, but not completely multiplicative.
The general formula plays a key role in the enumeration of generalized periodic Horadam
sequences, characterized in [3]. The integer sequences LCM(n; 2), LCM(n; 3), LCM(n; 4)
and LCM(n; 5) were found to be indexed in the OEIS.
The function GL(d, n; k) counting the k-tuples with same gcd d and lcm n was defined.
Most of the properties were linked to the arithmetic function L(n; k) := GL(1, n; k), whose
formula was given. Function L(n; k) was multiplicative, but not completely multiplicative.
Function T(n; k), enumerating k-tuples whose min is zero and max is n was also analyzed.
Novel, or existing OEIS integer sequences were produced from T(n; k) and L(n; k).
Finally, two dual properties linking the gcd and lcm of k-tuples were presented.
100 O. Bagdasar
References
[1] T. M. A POSTOL, Introduction to Analytic Number Theory, Springer, New York, 1976.
[2] O. BAGDASAR and P. J. L ARCOMBE, On the number of complex Horadam sequences with
a fixed period, Fibonacci Quart., Vol. 51, 4 (2013), 339–347.
[3] O. Bagdasar and P. J. Larcombe, On the characterization of periodic generalized Horadam
sequences, J. Differ. Equ. Appl. (accepted).
[4] R. C RANDALL and C. P OMERANCE, Prime Numbers: A Computational Perspective,
Springer, New York, 2001.
[5] G. H. H ARDY and E. M. W RIGHT An Introduction to the Theory of Numbers, Oxford
University Press, Oxford, Fifth edition, 1979.
[6] Octogon Mathematical Magazine, Collection, 1993–2012.
[7] The On-Line Encyclopedia of Integer Sequences, http://oeis.org, OEIS Foundation Inc. 2011.
[8] R. R. S ITARAMACHANDRA and D. S URYANABAYANA, The number of pairs of integers
with L.C.M. ≤ x, ARCH. MATH., Vol XXI (1970), 490–497.
[9] D. V ĂLCAN and O. D. BAGDASAR, Generalizations of some divisibility relations in N,
Creative Math. & Inf., Vol. 18, 1 (2009), 92–99.
[10] F. Z UMHING and T. A NDREESCU, A Path To Combinatorics for Undergraduates,
Birkhauser, 2004.