<<

On a Property of the Primitive Roots of Unity Leading to the Evaluation of Ramanujan’s Sums

Titu Andreescu and Marian Tetiva

1. Introduction. Ramanujan’s sums are the sums of powers with the same exponent of the primitive roots of unity of some . More specifically, let q and m be positive , and let x1, . . . , xn (with n = ϕ(q), where ϕ is Euler’s totient function) be the roots of the qth cyclotomic Φq, that is, the primitive roots of unity of order q. We denote by X  2jmπ 2jmπ  c (m) = xm + ··· + xm = cos + i sin q 1 n q q 1≤j≤q, (j,q)=1 and call this expression Ramanujan’s sum. The formula X q  c (m) = µ d q d d|(q,m) holds–see [2] for a proof. Here µ is the usual M¨obiusfunction defined on positive integers by µ(1) = 1, µ(t) = (−1)k when t is a product of k distinct prime factors, and µ(t) = 0 in any other case. The resemblance of the above identity with the well-known expression of ϕ, X q  ϕ(q) = µ d d d|q is, probably, not just a coincidence, as long as cq(m) = ϕ(q) whenever q | m (it is easy to see that, P in that case, cq(m) = 1≤j≤q, (j,q)=1 1 = ϕ(q)). Thus, Ramanujan’s sums generalize Euler’s totient function. They also represent a generalization of the M¨obiusfunction, because, for (q, m) = 1 we have cq(m) = cq(1) = x1 + ··· + xn = µ(q), according to a well-known result about the sum of primitive qth roots of unity, which we will mention again (and we will use) immediately. Ramanujan expanded the usual arithmetic functions in terms of his sums. Also, Ramanujan’s sums were used in the proof of Vinogradov’s theorem stating that every sufficiently large odd positive is the sum of three primes.

2. The main result. We have seen the formula X q  c (m) = µ d. q d d|(q,m) Let us denote here D = (q, m), and let q0 be such that q = Dq0. Then let us rewrite the above as X D  X µ(aq0) c (m) = µ q0 d = D . q d a d|D a|D Because the values of the M¨obiusfunction for integers that are not square-free are zero, and due to its multiplicativity (µ(xy) = µ(x)µ(y) for relatively prime positive integers x and y) we further have X µ(a)µ(q0) X µ(a) c (m) = D = Dµ(q0) . q a a a|D, (a,q0)=1 a|D, (a,q0)=1

Mathematical Reflections 5 (2019) 1 Notice that only for a a product of distinct primes we get non-zero terms in this sum (and do not forget q = Dq0), so we have Y  1 c (m) = Dµ(q0) 1 − q p p|q, p6|q0 where the product is over all primes p that divide q, but do not divide q0. Finally we get Y  1 q 1 − p 0 p|q 0 ϕ(q) cq(m) = µ(q ) = µ(q ) , Y  1 ϕ(q0) q0 1 − p p|q0 hence we have the following result (that gives a closed form expression for the Ramanujan sums): Proposition 1. For positive integers q and m we have ϕ(q)  q  c (m) = µ . q  q  (m, q) ϕ (m, q) The interested reader can find another proof of proposition 1 (in a more general context) in [2].

3. How do we prove the main result. It is time to see what is the purpose of this note. Namely, we intend to give yet another proof of proposition 1, which avoids the usual calculations with arithmetic functions (and is not very complicated, either). It relies on lemmas 1 and 3 below (lemma 2 helps proving lemma 3). Lemma 1. Let x1, . . . , xn (with n = ϕ(q))) be the qth primitive roots of unity. Then their sum is x1 + ··· + xn = µ(q). Proof. This is a well-known property of the primitive roots of unity. In order to prove it, let f(t) be the sum of the primitive roots of unity of order t (for any positive integer t). We then see that X f(d) d|t is the sum of all roots of unity of order t, that is, X  1, t = 1 f(d) = 0, t > 1. d|t However, it is well-known again that X  1, t = 1 µ(d) = 0, t > 1, d|t therefore X X f(d) = µ(d), d|t d|t for any positive integer t. We also have f(1) = µ(1) = 1, thus f(t) = µ(t) follows for any t. Indeed, if the two functions f and µ differ, there exists a minimal t0 > 1 such that f(t0) 6= µ(t0). But then we would also have X X f(d) 6= µ(d),

d|t0 d|t0

Mathematical Reflections 5 (2019) 2 (as f(d) = µ(d) for d | t0, d < t0, while f(t0) 6= µ(t0)), a contradiction. It remains that f and µ coincide, thus x1 + ··· + xn = f(q) = µ(q), as desired. One can note that the result of lemma 1 also represents a particular case of proposition 1 (for relatively prime q and m). Nevertheless, we will use it in our proof for proposition 1. Lemma 2. Let a, b, and c be positive integers such that a and b are relatively prime. For any positive integer u denote by

Mu = {v ∈ {0, 1, . . . , u − 1} | (v, u) = 1}.

Then the at with t ∈ Mbc leave when divided by b all possible remainders from Mb, and each such remainder is obtained the same of times, that is, each remainder from Mb appears ϕ(bc) ϕ(b) times when at (mod b) (with t ∈ Mbc) are listed. First proof. Since a is relatively prime to b, for two numbers t1, t2 ∈ Mbc (actually, for any integers t1 and t2) we have that at1 ≡ at2 (mod b) if and only if t1 ≡ t2 (mod b). Thus the remainders of the numbers at, t ∈ Mbc appear with the same multiplicities as the remainders leaved by the numbers from Mbc themselves–thus it is enough to prove the statement for a = 1. That is, we need to prove that the remainders left by the numbers from Mbc at division by b can be organized into groups of ϕ(bc) ϕ(b) equal numbers, and they cover all the remainders from Mb. Any number from Mbc is relatively prime to bc, hence it is relatively prime to b, too, consequently the remainder it leaves when divided by b is also relatively prime to b, that is, it belongs to Mb. Also, we note that remainder 1 is surely obtained. Thus if we denote, for any r ∈ Mb, by

Nr = {x ∈ Mbc | x ≡ r (mod b)} we have N1 6= ∅ (since 1 ∈ Mbc). Moreover, every Nr is nonempty. Indeed, let p1, . . . , ps be the primes that divide c but do not divide b. By the Chinese remainder theorem, the system of congruences x ≡ r (mod b), x ≡ 1 (mod ), 1 ≤ i ≤ s has a solution in the set {0, 1, . . . , bp1 ··· ps − 1}. Of course bp1 ··· ps ≤ bc and the solution of the system of congruences is relatively prime to any of b, p1, . . . , ps, hence to bc. Thus this solution is a number from Mbc which leaves remainder r when divided by b, and its existence shows that Nr is nonempty. Now let r be any element from Mb, and let y0 be one fixed element from Nr. We define the function f : N1 → Nr by letting f(x) to be the remainder of y0x at division by bc. Since f(x) ≡ y0x (mod bc), we also have f(x) ≡ y0x (mod b), and x ≡ 1 (mod b), y0 ≡ r (mod b) imply f(x) ≡ r (mod b). Thus, indeed, f(x) ∈ Nr and f is well defined. Also, it is clear that f is a bijection, and this shows that Nr and N1 have the same number of elements, that is every Nr has the same number of the elements. Also, the sets Nr, with r ∈ Mb partition Mbc, hence

|Mbc| ϕ(bc) |Nr| = = |Mb| ϕ(b) for each r ∈ Mb, as we intended to prove.

Mathematical Reflections 5 (2019) 3 Second proof. We know now that it is enough to consider the case a = 1. Let r be any element from Mb, and let Nr = {x ∈ Mbc | x ≡ r (mod b)}, which is obviously the same as

Nr = {r + by | y ∈ {0, 1, . . . , c − 1}, (r + by, bc) = 1}. Let P be the set of primes that divide c, but do not divide b. For any prime p ∈ P that divides c, let Ap = {y ∈ {0, 1, . . . , c − 1} | r + by is divisible by p}. We see that an element r + by, y ∈ {0, 1, . . . , c − 1} is relatively prime to bc (that is, it belongs to Nr) if and only if there is no prime p ∈ P such that p|r + by. This means that Nr has the same number of elements as the set ! [ {0, 1, . . . , c − 1}\ Ap , p∈P that is,

[ |Nr| = c − Ap . p∈P

The cardinality of the union of the Aps is easily obtained by inclusion-exclusion principle. By noting that for any nonempty subset P 0 of P we have

c \ Ap = Q 0 p p∈P 0 p∈P we immediately get Y  1 |N | = c 1 − , r p p∈P or  1 bc Q 1 − p|bc p ϕ(bc) |N | = = , r  1 ϕ(b) b Q 1 − p|b p as desired. Lemma 3. Keep the same notations from lemma 1, and let m be a positive integer, let q ϕ(q) D = (m, q), and q0 = . Then xm, . . . , xm can be partitioned into groups consisting of D 1 n ϕ(q0) equal values each, the values corresponding to different groups being precisely the primitive q0th roots of unity. Proof. We will use lemma 2. Note that x1, . . . , xn are actually the numbers 2jπ 2jπ cos + i sin , q q

m m with j running over the set Mq (same notation from lemma 2). Therefore x1 , . . . , xn are 2mjπ 2mjπ 2m0jπ 2m0jπ cos + i sin = cos + i sin , q q q0 q0

Mathematical Reflections 5 (2019) 4 where, if D = (m, q), we define q0 and m0 by q = Dq0 and m = Dm0. Of course, q0 and m0 are relatively prime. Then lemma 2 (with a = m0, b = q0 and c = D) tells us that the numbers m0j, 0 with j running over MDq0 leave, when divided by q , remainders that take every value from Mq0 precisely ϕ(Dq0) ϕ(q) = ϕ(q0) ϕ(q0) m m times. For x1 , . . . , xn this means that they repeat each value 2rπ 2rπ cos + i sin , q0 q0

0 with r ∈ Mq0 (that is, every primitive root of unity of order q ) precisely ϕ(q) ϕ(q0) times, and that is what we intended to prove. With these tools in our hands we can now provide another m m Proof of Proposition 1. Lemma 2 tells us that the numbers x1 , . . . , xn can be split into k groups of l equal numbers in each , where  q  k = ϕ(q0) = ϕ (m, q) and n ϕ(q) l = = . k  q  ϕ (m, q) m m Thus, the sum cq(m) actually equals l times the sum of the distinct values among x , . . . , x , q 1 n which is precisely the sum of primitive roots of unity of order . As the sum of these roots (m, q)  q  is µ , by lemma 1, the formula for c (m) follows once again. (m, q) q 4. Final remarks: how did we find lemma 3. Surprisingly, maybe, we first came across with the result of lemma 3 (rather than with that from lemma 2) to which we gave the following Second proof of lemma 3. The order of any of x , . . . , x as an element of the multiplicative 1 n q group of nonzero complex numbers is precisely q; then the order of any of xm, . . . , xm is q0 = , 1 n (m, q) m m 0 so that x1 , . . . , xn are roots of unity of order q . Each of x1, . . . , xn has the form 2sπ 2sπ cos + i sin q q m where 1 ≤ s ≤ q and s is relatively prime to q. Thus, if we still denote m0 = , we have any of D m m x1 , . . . , xn of the form 2msπ 2msπ 2m0sπ 2m0sπ cos + i sin = cos + i sin , q q q0 q0

0 0 m m 0 where m s and q are relatively prime. This shows that, in fact, x1 , . . . , xn are primitive q th roots of unity, thus they are roots of Φq0 , which is an , hence it is the minimal m m polynomial of any of x1 , . . . , xn .

Mathematical Reflections 5 (2019) 5 Now consider the polynomial

m m h = (X − x1 ) ··· (X − xn )

(which has integer coefficients, by the fundamental theorem of symmetric ) and notice m m m that each irreducible factor of it has to be the minimal polynomial of some xj . But x1 , . . . , xn have all the same minimal polynomial, hence any irreducible factor of h is this minimal polynomial, namely Φq0 . As both h and Φq0 are monic, we have

l h = (Φq0 ) for some positive integer l that verifies n = ϕ(q0)l = kl, if we denote k = ϕ(q0). Thus, we have ϕ(q) l = , and ϕ(q0) ϕ(q) m m ϕ(q0) (X − x1 ) ··· (X − xn ) = (Φq0 ) .

It is clear now that, if y1, . . . , yk are the (distinct) roots of Φq0 , then (after an appropriate indexa- m m m m m m tion) we have x1 = ··· = xl = y1, xl+1 = ··· = x2l = y2, and so on, until x(k−1)l+1 = ··· = xkl = yk, and the proof of lemma 2 is complete. Pn m Qn m Note that this allows the computation of sums or products as j=1 f(xj ), j=1 f(xj ) (for some function f defined on complex numbers) in terms of the values of f for the primitive roots of unity of order q0, namely

ϕ(q) n k n k ! ϕ(q0) X ϕ(q) X Y Y f(xm) = f(y ), f(xm) = f(y ) . j ϕ(q0) s j s j=1 s=1 j=1 s=1

The proof above actually mimics the proof (as lemma 3 is a particular case) of the following Proposition 2. If f ∈ Q[X] is an irreducible polynomial in Q[X], of degree n, if x1, . . . , xn are its complex roots, and if g ∈ Q[X] is any polynomial, then the numbers g(x1), . . . , g(xn) can be split into k ≥ 1 groups of the same size l such that in each group the numbers are all equal, and the common values of the numbers from the k groups are mutually distinct. Of course, we have kl = n. More specifically, we have, after a possible re-indexation, g(x1) = ··· = g(xl) = a1, g(xl+1) = ··· = g(x2l) = a2, and so on, until g(x(k−1)l+1) = ··· = g(xn) = ak, with a1, . . . , ak mutually distinct. Moreover, g(x1), . . . , g(xn) have the same minimal polynomial, and k is precisely the degree of this minimal polynomial. This is the main result from [1], and, basically, starting from it we found the property of the primitive roots of unity described in lemma 3, the property that allows the (very direct) evaluation of Ramanujan’s sums. Thus proposition 2 lead us to lemma 3, and only after all that we found the arithmetic property from lemma 2, which, clearly, is equivalent to lemma 3. Thus we wrote the note following a more natural order of the results, rather than the order in which we ”discovered” them. (We don’t have any reference for lemmas 2 and 3 in the literature, but we don’t really think that there isn’t one.) We thought, however, that it is interesting to find an elementary property starting from (a little bit more) advanced results, that is why we wrote this note. Finally, we gratefully thank Gabriel Dospinescu for his valuable suggestions which consider- ably improved the content and the form of this note. Actually, he is the one who found the two elementary proofs of lemma 2.

Mathematical Reflections 5 (2019) 6 References 1. T. Andreescu, M. Tetiva: About an Old Romanian TST Problem, Mathematical Reflections, 5/2018 2. Tom M. Apostol: Introduction to Analytic , Springer-Verlag, New York Heidelberg Berlin, 1976

Titu Andreescu University of Texas at Dallas Richardson, TX, USA Marian Tetiva National College “Gheorghe Ro¸scaCodreanu” Bˆırlad,Romania

Mathematical Reflections 5 (2019) 7