A remark on relatively prime sets

Four functions counting the number of subsets of $\{1, 2, ..., n\}$ having particular properties are defined by Nathanson and generalized by many authors. They derive explicit formulas for all four functions. In this paper, we point out that we need to compute only one of them as the others will follow as a consequence. Moreover, our method is simpler and leads to more general results than those in the literature.


Introduction
There are a number of articles concerning relatively prime subsets and Euler phi function for sets. Most of them show the calculation of explicit formulas for certain functions. Their main tools are the Möbius inversion formula and the inclusion-exclusion principle. In this paper, we give simpler and shorter calculations which lead to the results extending those in the literature. To be precise, we cover the results of Nathanson [12], Nathanson and Orosz [13], El Bachraoui [5], [6], [7], [8], [9], El Bachraoui and Salim [10], Ayad and Kihel [2], [3], and Shonhiwa [14], [15]. We show how to apply our method to obtain all results mentioned above and their generalization. Now, let us introduce the following notations and definitions which will be used throughout this paper.
Unless stated otherwise, we let a, b, k, m, n be positive integers, gcd(a, b) the greatest common divisor of a and b, [a, b] = {a, a + 1, . . . , b}, A, X finite subsets of positive integers, |A| the cardinality of the set A, gcd(A) the greatest common divisor of the elements of A, gcd(A, n) means gcd(A ∪ {n}), ⌊x⌋ the greatest integer less than or equal to x, and µ the Möbius function.
A nonempty finite subset A of positive integers is said to be relatively prime if gcd(A) = 1 and is said to be relatively prime to n if gcd(A, n) = 1. The function counting the number of relatively prime subsets of {1, 2, . . . , n} and other related functions are defined by Nathanson [12] and generalized by many authors. We summarize them in the following definition. Definition 1. Let X be a nonempty finite subset of positive integers. Define f (X) to be the number of relatively prime subsets of X, f k (X) the number of such subsets with cardinality k, Φ(X, n) the number of subsets A of X which is relatively prime to n and Φ k (X, n) the number of such subsets A with |A| = k.

Lemmas
In this section, we give a formula for the number of terms in an arithmetic progression which are divisible by a fixed positive integer.
If k does not divide a, then there is no x satisfying (1) and thus |A d | = 0. This proves (i). Next, we assume that k | a. Then (1) So we want to count the number of elements in the set {0, 1, 2, . . . , m − 1} which satisfy (3). Each of the following sets contain a unique element satisfying (3) There are mk modulo d k , respectively. Hence This completes the proof.
If we consider the case gcd(a, b) = 1, we obtain a lemma of Ayad and Kihel as a corollary. We record it in the next lemma.  The next lemma will be used throughout this paper.
Proof. This is a well-known result. For the proof see, for example, ([1], p.25).

Only One Formula Is Enough
In this section, we give a simple proof of the formula for Φ (a,b) k (m, n) and show that the formulas for Φ (a,b) (m, n), f (a,b) k (m), and f (a,b) (m) can be obtained as a consequence. In the notation used in [2], [3] The following are the results obtained by Ayad and Kihel in [2] and [3].
Now we will give a proof of the formula for Φ Changing the order of summation, the above sum becomes By Lemma 3, |A d | = 0 if gcd(d, b) = 1. So for nonzero contribution, we can restrict our attention to the case gcd(d, b) = 1. Therefore the above sum is equal to Applying Lemma 3 again, we substitute To obtain the formula of Φ (a,b) (m, n), we use the well-known identity that n k=1 n k = 2 n − 1.
This can also be written as ∞ k=1 n k = 2 n − 1 since n k = 0 when k > n.

Now by the definition of Φ
Next, we put n = (a+(m−1)b)! in the formula of Φ On the other hand, we have from (4) that Notice that d = 1, 2, . . . , a+ (m−1)b are divisors of n and if d > a+ (m−1)b, then d is larger than all elements of A and thus |A d | = 0. Therefore the above sum is From (5), (6) and Lemma 3, we obtain Similar to the proof of Φ (a,b) (m, n), we sum f (a,b) k (m) over all k to get f (a,b) (m). This completes the proof. [3] that we can easily deduced from Theorem 6 the results for the case when a and b are integers not necessary positive, or the case ((a, b), n) = 1 or (a, b) = 1 but ((a, b), n) = 1. For the details, see Remark 11 and Remark 12 in [3]. Combining this with Corollary 7, we see that we cover the results given by Ayad and Kihel ([2], [3]), El Bachraoui ([5], [6]), Nathanson ([12]) and Nathanson and Orosz ( [13]).

Extending the formulas to finite union of arithmetic progressions
In this section, we will give formulas for f (X), f k (X), Φ(X, n), Φ k (X, n) when Considering our method carefully, we see that it can be applied in any situation where the number of elements divisible by a fixed positive integer can be calculated. We illustrate this idea explicitly below. Let X be a nonempty finite subset of integers and for each d, let X d = {x ∈ X : d | x}. By applying Lemma 4 and changing the order of summation, we have Summing over all k, we see that Again, applying Lemma 4 and changing the order of summation, we have Summing f k (X) over all k, we obtain Remark 9. 1) If n > 1, by Lemma 4, the formula in (8) can be reduced to 2) From (7), (8), (9), and (10), we see that explicit formulas for Φ k (X, n), Φ(X, n), f k (X) and f (X) can be obtained whenever we can compute |X d | for all d.
Note that the formulas in Theorem 10 are also obtained by El Bachraoui [8], [9] in a different form but his proof does not seem to be applicable in more general situations such as [14], [15]. However, our method still works well in this case (see section 5).
|I id | and |I id | can be obtained by Lemma 3. This completes the proof.

Cover Shonhiwa's theorems
Shonhiwa considers the case X = [1, n] with various constraints. He [14], [15] uses the Möbius inversion formula, the inclusion-exclusion principle, generating functions, and standard formulas in enumerative combinatorics. In this section, we illustrate again how our method can be used to obtain Shonhiwa's results in a faster and simpler way. So let us recall his theorems in [14], [15].
Theorem 13. ( [14], [15]) Let (i) S m k (n) = 1≤a 1 ,a 2 ,...,a k ≤n (a 1 ,a 2 ,...,a k ,m)=1 Proof. Throughout the proof, we let For (ii) we put m = n! in S m k (n) and argue as in the proof of Φ (a,b) (m, n) in the previous section. We see that Before giving the proof of (iii), let us recall an elementary formula in enumeration. The number of ways to select k objects from n different objects with repetition allowed is equal to ([11], p.47) Now similar to (i), we apply Lemma 4 and change the order of summation to obtain L m k (n) = d|m µ(d)