INTEGERS 10 (2010), 465-476 #A39 ON RELATIVELY PRIME SETS COUNTING FUNCTIONS Temba Shonhiwa The John Knopfmacher Centre for Applicable Analysis and Number Theory, School of Mathematics, University of the Witwatersrand, South Africa Received: 5/11/09, Revised: 4/14/10, Accepted: 4/26/10, Published: 9/15/10 Abstract This work is motivated by Nathanson’s recent paper on relatively prime sets and a phi function for subsets of {1, 2, 3, . . . , n}. We establish enumeration formulas for the number of relatively prime subsets and the number of relatively prime subsets of cardinality k of {1, 2, 3, . . . , n} under various constraints. Further, we show how this work links up with the study of multicompositions. 1. Background Our paper is motivated by a recent paper of Nathanson [8] who defined a nonempty subset A of {1, 2, . . . , n} to be relatively prime if gcd(A) = 1. He defined f (n) to be the number of relatively prime subsets of {1, 2, . . . , n} and, for k ≥ 1, fk (n) to be the number of relatively prime subsets of {1, 2, . . . , n} of cardinality k. Further, he defined Φ(n) to be the number of nonempty subsets A of the set {1, 2, . . . , n} such that gcd(A) is relatively prime to n and, for integer k ≥ 1, Φk (n) to be the number of subsets A of the set {1, 2, . . . , n} such that gcd(A) is relatively prime to n and card(A) = k. He obtained explicit formulas for these functions and deduced asymptotic estimates. These functions were subsequently generalized by El Bachraoui [5] to subsets A ∈ {m + 1, m + 2, . . . , n} where m is any nonnegative integer, and then by Ayad and Kihel [3] to subsets of the set {a, a + b, . . . , a + (n − 1)b} where a and b are any integers. El Bachraoui [4] defined for any given positive integers l ≤ m ≤ n, Φ([l, m], n) to be the number of nonempty subsets of {l, l + 1, . . . , m} which are relatively prime to n and Φk (l, m], n) to be the number of such subsets of cardinality k. He found formulas for these functions when l = 1 [4]. 466 INTEGERS: 10 (2010) 2. Introduction It turns out that some of Nathanson’s results are special cases of number theoretic functions investigated by Shonhiwa. In [10], Shonhiwa defined and investigated the following functions and established the following result. Theorem 1 Let Skm (n) = ! 1; ∀ n ≥ k ≥ 1, m ≥ 1 (1) ! 1; ∀ n ≥ k ≥ 1, (2) 1≤a1 ,a2 ,...,ak ≤n (a1 ,a2 ,...,ak ,m)=1 Gk (n) = 1≤a1 ,a2 ,...,ak ≤n (a1 ,a2 ,...,ak )=1 ! Lm k (n) = 1≤a1 ≤a2 ≤···≤ak ≤n (11 ,a2 ,...,ak ,m)=1 1; ∀ n ≥ k ≥ 1, m ≥ 1 (3) and ! Tkm (n) = 1≤a1 <a2 <···<ak ≤n (a1 ,a2 ,...,ak ,m)=1 1; ∀ n ≥ k ≥ 1, m ≥ 1. (4) Then Skm (n) = ! µ(d) d|m Lm k (n) = ! µ(d)L1k d|m $" n #% d = " n #k ! d|m d , &' n ( ) +k−1 d µ(d) , k and Tkm (n) = ! d|m µ(d)Tk1 $" n #% d = ! d|m &' n () µ(d) d . k From above, it follows that Φk (n) = Tkn = ! $ n % &d) µ d k d|m (5) 467 INTEGERS: 10 (2010) and Φ(n) = n ! Tkn (n) = k=1 ! n (6) µ(d)2 d , d|m as shown therein and as proved in [8]. 3. Main Results The result obtained concerning the function Gk (n) in [10] is incorrect and we provide the correction below. The corrected result makes use of the following theorem [1]. Theorem 2 (Generalized Möbius inversion formula) If α is completely multiplicative we have $x% $x% ! ! G(x) = α(n)F ⇐⇒ F (x) = µ(n)α(n)G . n n n≤x n≤x We may now prove our first result as follows. Theorem 3 We have Gk (n) = ! µ(j) j≤n Proof. Since Gk (n) = nk − we have * +k n . j ! ! 1 = nk − n ! = nk − n ! j=2 1≤a1 ,a2 ,...,ak ≤n (a1 ,a2 ,...,ak )=j n ! j=1 Gk $" n #% d = nk . ! 1 j=2 1≤b1 ,b2 ,...,bk ≤( n ) j (b1 ,b2 ,...,bk )=1 j=2 Gk &* +) n , j 468 INTEGERS: 10 (2010) Hence, by Theorem 2, it follows that * +k j * +k n ! ! n n G(n) = Gk (n) = µ(j) = µ(j) j j j=1 k=1 k=1 j=1 k=1 " #& " #j ) n n µ(j) 1 − n j j ! $ " #% = . 1 − nj j=1 n ! n ! n ! ! Using our definition, results from [10], Nathanson’s notation and arguing as above, it also follows that fk (n) = ! 1≤a1 <a2 <···<ak ≤n (a1 ,a2 ,...,ak )=1 & ) ! &* +) n n n 1= − fk , k j j=2 which gives n ! fk j=1 &* +) & ) n n = . j k Thus, " # & n ) fk (n) = µ(j) j . k j=1 n ! From this it follows that " # & n ) f (n) = fk (n) = µ(j) j k k=1 k=1 j=1 " # j & n ) n n $ n % ! ! ! j = µ(j) = µ(j) 2( j ) − 1 . k j=1 j=1 k=1 n ! n ! n ! We now prove our next theorem. Theorem 4 Let Hk (n) = ! 1≤a1 ≤a2 ≤···≤ak ≤n (a1 ,a2 ,...,ak )=1 1. 469 INTEGERS: 10 (2010) Then " # & n ) j +k−1 Hk (n) = µ(j) . k j≤n ! Proof. Arguing as above it follows that & ) ! &* +) n n+k−1 n Hk (n) = − Hk k j j=2 which implies n ! j=1 Hk &* +) & ) n n+k−1 = , j k and hence, by Theorem 2, we obtain the result " # ) j & n n n ! ! ! j +k−1 H(n) = Hk (n) = µ(j) k j=1 k=1 k=1 " # & n ) ! n n ! +j = µ(j) j − µ(j). j j=1 j=1 ! We now define the corresponding totient function as ! &n)&d + k − 1) Ψk (n) = Lnk (n) = µ . d k d|n Then Ψ(n) = n ! Ψk (n) = k=1 n ! k=1 Lnk (n) = ) n & ! &n) ! d+j−1 d|n d k=1 j = ! &n)&d + n) , d n d|n or equivalently, & ) ! ) ∞ & ∞ ! 2n 2n n ! xn 1 = Ψ(d) ⇐⇒ x = Ψ(n) =√ − 1. n n n 1−x 1 − 4x n=1 n=1 d|n 470 INTEGERS: 10 (2010) It turns out the function Tkm (n) relates to other functions connected with the study of compositions of n into relatively prime summands as follows. Gould [6] investigated the function & ) ! $ %& ) ! ! n n d−1 Rk (n) = 1= Ck (d)µ = µ , d d k−1 1≤a1 +a2 +···+ak =n (a1 ,a2 ,...,ak )=1 d|n d|n , where Ck (n) = n−1 k−1 and obtained many other significant results concerning this function. Consequently, ! Tkn (n) = 1 1≤a1 <a2 <···<ak ≤n (a1 ,a2 ,...,ak ,n)=1 ! $ n % &d) = µ d k d|n .& ) & )/ ! $n% d−1 d−1 = µ + d k−1 k d|n = Rk (n) + Rk+1 (n). Therefore, we may obtain results concerning either function by using known properties of the other. In particular, we may obtain the Lambert series for Tkn (n) as follows: ∞ ! Tkn n=1 xn 1 − xn = ∞ ! Rkn n=1 = = = ∞ ! xn xn n + R 1 − xn n=1 k+1 1 − xn xk (1 − x)k+1 ∞ ∞ ! ! xn Ck (n)xn n=0 ∞ ! xn n=1 n=0 n ! j=0 Ck (n − j), which is equivalent to ! d|n as expected. Tkd (d) = n ! j=0 Ck (n − j) = & ) n , k 471 INTEGERS: 10 (2010) The inverse function of Rk (n) is & )* + n ! n j (−1)n−j j k Ak (n) = (7) j=k and it is shown in [6] that these two satisfy the orthogonality relations. Theorem 5 We have n ! Rk (j)Aj (n) = δkn j=k and n ! Rj (n)Ak (j) = δkn . j=k In [10], it is shown that the inverse of Tkn (n) is & )* + n ! j n−j n + 1 Kk (n) = (−1) , j+1 k j=k and that: Theorem 6 We have n ! Tkj (j)Kj (n) = δkn and j=k n ! Kk (j)Tjj (n) = δkn . j=k It follows that .& ) & )/ n ! n n (−1)n−j + j+1 j j=k & ) n ! n = (−1)n−j + Ak (n), j+1 Kk (n) = j=k so that Ak (n) = Kk (n) + Kk (n − 1). (8) Whilst we have a closed form expression for Ak (n) it does not reveal enough regarding the structure of Ak (n). Our next result responds to this concern for a special case of Ak (n). 472 INTEGERS: 10 (2010) Theorem 7 For n ≥ 1, we have & ) n+k−1 Ak (k + n) = (−1) ; ∀ k ≥ n + 1. k−1 n Proof. From Tkn (n) = Rk (n) + Rk+1 (n) and Theorem 3.4 above, it follows that n ! n Aj (n)Tkj (j) = δkn + δk+1 . (9) j=k So that for n = k, Ak (k)Tkk (k) = 1 implies Ak (k) = Tkk = 1; ∀ k ≥ 1. And for n = k + 1, k+1 Ak (k + 1)Tkk (k) + Ak+1 (k + 1)Tk+1 (k + 1) = 1 =⇒ Ak (k + 1) = −k; ∀ k ≥ 1. For n ≥ k + 2 we may rewrite equation (9) above as Ak (n) + Tkn (n) =− n−1 ! Aj (n)Tkj (j), j=k+1 then for n = k + 2, Ak (k + 2) + Tkk+2 (k + 2) = −Ak+1 (k + 2)Tkk+1 (k + 1) = (k + 1)Tkk+1 (k + 1) = (k + 1)2 , since Ak (k + 1) = −k. Hence Ak (k + 2) = (k + 1) − 2 = (k + 1)2 − = ! d|k+2 & k+2 ) µ(d) d k (k + 1)(k + 2) 2 (−1)2 k(k + 1) 2 provided k ≥ 3. 473 INTEGERS: 10 (2010) Now assume the result holds for k + 1, k + 2, . . . , k + n − 1 and consider Ak (k + n) + Tkk+n (k + n) = − = n+k−1 ! Aj (n + k)Tkj (j) j=k+1 n−1 ! (−1)n−i Tkk+i (k + i) (n − i)! i=1 = n−1 1 (k + j) j=1 n−1 0 (k + j) j=i 2n−1 3 ! (−1)n+1−i (k + i) i=1 (n − i)!i! . Then Ak (k + n) = n−1 0 j=1 (k + j) n & ) ! n (−1)n−j−1 (k + j) n! j = (−1)n j=1 & ) n+k−1 , k−1 where we have used the inductive hypothesis as well as assumed that k ≥ n + 1. ! We note in passing that Rk (k + n) = (−1)n Ak (k + n) for all k ≥ n + 1. Following up on Gould’s paper, Andrews [2] introduced the function gm (n), which gives the number of m-compositions of n with relatively prime positive summands so that n ! T (n) = Rk (n) = g1 (n). k=1 It is shown in [2] that the total number of m-compositions of n is (m + 1)n−1 and hence, ! (m + 1)n−1 = gm (d). d|n In a follow-up paper, Shonhiwa [11] provided an alternative investigation of the function gm (n). 474 INTEGERS: 10 (2010) From the equation ! $ n % &d) µ d j Tjn = d|n it follows that n ! Tjn (n)xj = j=1 ! $n% d d|n (x + 1)d for all n ≥ 2. Therefore ! &n) gm (n) = µ (m + 1)d−1 d d|n = (m + 1)−1 ! &n) µ (m + 1)d d d|n = (m + 1) −1 n ! j=1 Tjn (n)M j for all n ≥ 1. In particular, for m = 1, we obtain ! &n) g1 (n) = T (n) = µ 2d−1 d d|n ! &n) = µ (3 − 1)d−1 d d|n = ) d−1 & ! &n) ! d−1 j µ 3 (−1)d−1−j d j=0 j d|n ≡ 0 (mod 3) for all n ≥ 3 (see [7]). Further, from gm (i) = (m + 1)−1 i ! Tji (i)mj , j=1 it follows that Ki (n)gm (i) = (m + 1)−1 i ! j=1 Tji (i)Ki (n)mj ; 475 INTEGERS: 10 (2010) which implies that n ! n ! i ! Ki (n)gm (i) = (m + 1)−1 i=1 Tji (i)Ki (n)mj i=1 j=1 = (m + 1)−1 n ! mj δjn j=1 = (m + 1) −1 mn , from above. Hence n−1 gm (n) = ! mn − Ki (n)gm (i) m + 1 i=1 n−1 = n−1 ! ! mn + Ki (n − 1)gm (i) − Ai (n)gm (i) m + 1 i=1 i=1 n−1 = mn mn−1 ! + − Ai (n)gm (i) m + 1 m + 1 i=1 = mn−1 − as expected; see [11]. n−1 ! Ai (n)gm (i), i=1 Acknowledgment Unfortunately Dr. T. Shonhiwa passed on during the review process of this manuscript. The following is a statement from his widow: This publication is dedicated to the memory of Temba Shonhiwa’s love of Mathematics and the development of a Mathematical Sciences Community in Africa. May his soul rest in peace. We would like to acknowledge and thank Dr. Augustine Munagi for finalizing and resubmitting this script. Many thanks, Fortune Shonhiwa References [1] T. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, New York, LLC, 1995. [2] G. Andrews, The theory of compositions, IV: Multicompositions. The Mathematics Student(Special Centenary Volume):25-31 (2007). INTEGERS: 10 (2010) 476 [3] M. Ayad and O. Kihel, On the number of subsets relatively prime to an integer, J. Integer Seq., 11 (2008) Article 08.5.5. [4] M. El Bachraoui, On the number of subsets of [1, m] relative prime to n and asymptotic estimates, Integers, 8 (2008), A41, 5 pp. (electronic). [5] M. El Bachraoui, The number of relatively prime subsets and phi functions for {m, m + 1, . . . , n}, Integers, 7 (2007), A43, 8 pp. (electronic). [6] H.W. Gould, Binomial Coefficients, the Bracket Function, and Compositions with Relatively Prime Summands, The Fibonacci Quarterly, Volume 2, Number 4, 1964. [7] H.W. Gould, Remarks on Compositions of Numbers into Relatively Prime Parts, Notes on Number Theory and Discrete Mathematics, 11 (2005), No. 3, 1–6. [8] M.B. Nathanson, Affine invariants, relative prime sets, and a phi function for subsets of {1, 2, . . . , n}, Integers, 7 (2007), A1, 7 pp. (electronic). [9] M.B. Nathanson and B. Orosz, Asymptotic estimates for phi functions for subsets of {M + 1, M + 2, . . . , N }, Integers, 7 (2007), A54, 5 pp. (electronic). [10] T. Shonhiwa, A Generalization of the Euler and Jordan Totient Functions, The Fibonacci Quarterly, Volume 37, February 1999, Number 1. [11] T. Shonhiwa, On Compositeness in Multicompositions, Quaestiones Mathematicae, 32 (2009), 1–11.