Rahul Sharma (Editor)

Ramanujan's sum

Updated on
Edit
Like
Comment
Share on FacebookTweet on TwitterShare on LinkedInShare on Reddit

In number theory, a branch of mathematics, Ramanujan's sum, usually denoted cq(n), is a function of two positive integer variables q and n defined by the formula

Contents

c q ( n ) = a = 1 ( a , q ) = 1 q e 2 π i a q n ,

where (a, q) = 1 means that a only takes on values coprime to q.

Srinivasa Ramanujan introduced the sums in a 1918 paper. In addition to the expansions discussed in this article, Ramanujan's sums are used in the proof of Vinogradov's theorem that every sufficiently-large odd number is the sum of three primes.

Notation

For integers a and b, a b is read "a divides b" and means that there is an integer c such that b = ac. Similarly, a b is read "a does not divide b". The summation symbol

d m f ( d )

means that d goes through all the positive divisors of m, e.g.

d 12 f ( d ) = f ( 1 ) + f ( 2 ) + f ( 3 ) + f ( 4 ) + f ( 6 ) + f ( 12 ) .

( a , b ) is the greatest common divisor,

ϕ ( n ) is Euler's totient function,

μ ( n ) is the Möbius function, and

ζ ( s ) is the Riemann zeta function.

Trigonometry

These formulas come from the definition, Euler's formula e i x = cos x + i sin x , and elementary trigonometric identities.

c 1 ( n ) = 1 c 2 ( n ) = cos n π c 3 ( n ) = 2 cos 2 3 n π c 4 ( n ) = 2 cos 1 2 n π c 5 ( n ) = 2 cos 2 5 n π + 2 cos 4 5 n π c 6 ( n ) = 2 cos 1 3 n π c 7 ( n ) = 2 cos 2 7 n π + 2 cos 4 7 n π + 2 cos 6 7 n π c 8 ( n ) = 2 cos 1 4 n π + 2 cos 3 4 n π c 9 ( n ) = 2 cos 2 9 n π + 2 cos 4 9 n π + 2 cos 8 9 n π c 10 ( n ) = 2 cos 1 5 n π + 2 cos 3 5 n π

and so on ( A000012,  A033999,  A099837,  A176742,..,  A100051,...) They show that cq(n) is always real.

Kluyver

Let ζ q = e 2 π i q . Then ζq is a root of the equation xq − 1 = 0. Each of its powers ζq, ζq2, ... ζqq = ζq0 = 1 is also a root. Therefore, since there are q of them, they are all of the roots. The numbers ζqn where 1 ≤ nq are called the q-th roots of unity. ζq is called a primitive q-th root of unity because the smallest value of n that makes ζqn = 1 is q. The other primitive q-th roots of are the numbers ζqa where (a, q) = 1. Therefore, there are φ(q) primitive q-th roots of unity.

Thus, the Ramanujan sum cq(n) is the sum of the n-th powers of the primitive q-th roots of unity.

It is a fact that the powers of ζq are precisely the primitive roots for all the divisors of q.

Example. Let q = 12. Then

ζ12, ζ125, ζ127, and ζ1211 are the primitive twelfth roots of unity, ζ122 and ζ1210 are the primitive sixth roots of unity, ζ123 = i and ζ129 = −i are the primitive fourth roots of unity, ζ124 and ζ128 are the primitive third roots of unity, ζ126 = −1 is the primitive second root of unity, and ζ1212 = 1 is the primitive first root of unity.

Therefore, if

η q ( n ) = k = 1 q ζ q k n

is the sum of the n-th powers of all the roots, primitive and imprimitive,

η q ( n ) = d q c d ( n ) ,

and by Möbius inversion,

c q ( n ) = d q μ ( q d ) η d ( n ) .

It follows from the identity xq − 1 = (x − 1)(xq−1 + xq−2 + ... + x + 1) that

η q ( n ) = { 0  if  q n q  if  q n

and this leads to the formula

c q ( n ) = d ( q , n ) μ ( q d ) d ,

published by Kluyver in 1906.

This shows that cq(n) is always an integer. Compare it with the formula

ϕ ( q ) = d q μ ( q d ) d .

von Sterneck

It is easily shown from the definition that cq(n) is multiplicative when considered as a function of q for a fixed value of n: i.e.

If  ( q , r ) = 1  then  c q ( n ) c r ( n ) = c q r ( n ) .

From the definition (or Kluyver's formula) it is straightforward to prove that, if p is a prime number,

c p ( n ) = { 1  if  p n ϕ ( p )  if  p n ,

and if pk is a prime power where k > 1,

c p k ( n ) = { 0  if  p k 1 n p k 1  if  p k 1 n  and  p k n ϕ ( p k )  if  p k n .

This result and the multiplicative property can be used to prove

c q ( n ) = μ ( q ( q , n ) ) ϕ ( q ) ϕ ( q ( q , n ) ) .

This is called von Sterneck's arithmetic function. The equivalence of it and Ramanujan's sum is due to Hölder.

Other properties of cq(n)

For all positive integers q,

c 1 ( q ) = 1 , c q ( 1 ) = μ ( q ) ,  and  c q ( q ) = ϕ ( q ) . If  m n ( mod q )  then  c q ( m ) = c q ( n ) .

For a fixed value of q the absolute value of the sequence

cq(1), cq(2), ... is bounded by φ(q), and

for a fixed value of n the absolute value of the sequence

c1(n), c2(n), ... is bounded by n.

If q > 1

n = a a + q 1 c q ( n ) = 0.

Let m1, m2 > 0, m = lcm(m1, m2). Then Ramanujan's sums satisfy an orthogonality property:

1 m k = 1 m c m 1 ( k ) c m 2 ( k ) = { ϕ ( m ) m 1 = m 2 = m , 0 otherwise

Let n, k > 0. Then

gcd ( d , k ) = 1 d n d μ ( n d ) ϕ ( d ) = μ ( n ) c n ( k ) ϕ ( n ) ,

known as the Brauer - Rademacher identity.

If n > 0 and a is any integer, we also have

gcd ( k , n ) = 1 1 k n c n ( k a ) = μ ( n ) c n ( a ) ,

due to Cohen.

Table

1+1+1+1+1 1+1+1+1+1 1+1+1+1+1 1+1+1 +(1×0)

Ramanujan expansions

If f(n) is an arithmetic function (i.e. a complex-valued function of the integers or natural numbers), then a convergent infinite series of the form

f ( n ) = q = 1 a q c q ( n )

or of the form

f ( q ) = n = 1 a n c q ( n )

where the akC, is called a Ramanujan expansion of f(n).

Ramanujan found expansions of some of the well-known functions of number theory. All of these results are proved in an "elementary" manner (i.e. only using formal manipulations of series and the simplest results about convergence).

The expansion of the zero function depends on a result from the analytic theory of prime numbers, namely that the series

n = 1 μ ( n ) n

converges to 0, and the results for r(n) and r′(n) depend on theorems in an earlier paper.

All the formulas in this section are from Ramanujan's 1918 paper.

Generating functions

The generating functions of the Ramanujan sums are Dirichlet series:

ζ ( s ) δ q μ ( q δ ) δ 1 s = n = 1 c q ( n ) n s

is a generating function for the sequence cq(1), cq(2), ... where q is kept constant, and

σ r 1 ( n ) n r 1 ζ ( r ) = q = 1 c q ( n ) q r

is a generating function for the sequence c1(n), c2(n), ... where n is kept constant.

There is also the double Dirichlet series

ζ ( s ) ζ ( r + s 1 ) ζ ( r ) = q = 1 n = 1 c q ( n ) q r n s .

σk(n)

σk(n) is the divisor function (i.e. the sum of the k-th powers of the divisors of n, including 1 and n). σ0(n), the number of divisors of n, is usually written d(n) and σ1(n), the sum of the divisors of n, is usually written σ(n).

If s > 0,

σ s ( n ) = n s ζ ( s + 1 ) ( c 1 ( n ) 1 s + 1 + c 2 ( n ) 2 s + 1 + c 3 ( n ) 3 s + 1 + )

and

σ s ( n ) = ζ ( s + 1 ) ( c 1 ( n ) 1 s + 1 + c 2 ( n ) 2 s + 1 + c 3 ( n ) 3 s + 1 + ) .

Setting s = 1 gives

σ ( n ) = π 2 6 n ( c 1 ( n ) 1 + c 2 ( n ) 4 + c 3 ( n ) 9 + ) .

If the Riemann hypothesis is true, and 1 2 < s < 1 2 ,

σ s ( n ) = ζ ( 1 s ) ( c 1 ( n ) 1 1 s + c 2 ( n ) 2 1 s + c 3 ( n ) 3 1 s + ) = n s ζ ( 1 + s ) ( c 1 ( n ) 1 1 + s + c 2 ( n ) 2 1 + s + c 3 ( n ) 3 1 + s + ) .

d(n)

d(n) = σ0(n) is the number of divisors of n, including 1 and n itself.

d ( n ) = log 1 1 c 1 ( n ) + log 2 2 c 2 ( n ) + log 3 3 c 3 ( n ) + d ( n ) ( 2 γ + log n ) = log 2 1 1 c 1 ( n ) + log 2 2 2 c 2 ( n ) + log 2 3 3 c 3 ( n ) +

where γ = 0.5772... is the Euler–Mascheroni constant.

φ(n)

Euler's totient function φ(n) is the number of positive integers less than n and coprime to n. Ramanujan defines a generalization of it, if

n = p 1 a 1 p 2 a 2 p 3 a 3

is the prime factorization of n, and s is a complex number, let

ϕ s ( n ) = n s ( 1 p 1 s ) ( 1 p 2 s ) ( 1 p 3 s ) ,

so that φ1(n) = φ(n) is Euler's function.

He proves that

μ ( n ) n s ϕ s ( n ) ζ ( s ) = ν = 1 μ ( n ν ) ν s

and uses this to show that

ϕ s ( n ) ζ ( s + 1 ) n s = μ ( 1 ) c 1 ( n ) ϕ s + 1 ( 1 ) + μ ( 2 ) c 2 ( n ) ϕ s + 1 ( 2 ) + μ ( 3 ) c 3 ( n ) ϕ s + 1 ( 3 ) + .

Letting s = 1,

ϕ ( n ) = 6 π 2 n ( c 1 ( n ) c 2 ( n ) 2 2 1 c 3 ( n ) 3 2 1 c 5 ( n ) 5 2 1 + c 6 ( n ) ( 2 2 1 ) ( 3 2 1 ) c 7 ( n ) 7 2 1 + c 10 ( n ) ( 2 2 1 ) ( 5 2 1 ) ) .

Note that the constant is the inverse of the one in the formula for σ(n).

Λ(n)

Von Mangoldt's function Λ(n) = 0 unless n = pk is a power of a prime number, in which case it is the natural logarithm log p.

Λ ( m ) = c m ( 1 ) + 1 2 c m ( 2 ) + 1 3 c m ( 3 ) +

Zero

For all n > 0,

0 = c 1 ( n ) + 1 2 c 2 ( n ) + 1 3 c 3 ( n ) + .

This is equivalent to the prime number theorem.

r2s(n) (sums of squares)

r2s(n) is the number of way of representing n as the sum of 2s squares, counting different orders and signs as different (e.g., r2(13) = 8, as 13 = (±2)2 + (±3)2 = (±3)2 + (±2)2.)

Ramanujan defines a function δ2s(n) and references a paper in which he proved that r2s(n) = δ2s(n) for s = 1, 2, 3, and 4. For s > 4 he shows that δ2s(n) is a good approximation to r2s(n).

s = 1 has a special formula:

δ 2 ( n ) = π ( c 1 ( n ) 1 c 3 ( n ) 3 + c 5 ( n ) 5 ) .

In the following formulas the signs repeat with a period of 4.

If s ≡ 0 (mod 4),

δ 2 s ( n ) = π s n s 1 ( s 1 ) ! ( c 1 ( n ) 1 s + c 4 ( n ) 2 s + c 3 ( n ) 3 s + c 8 ( n ) 4 s + c 5 ( n ) 5 s + c 12 ( n ) 6 s + c 7 ( n ) 7 s + c 16 ( n ) 8 s + )

If s ≡ 2 (mod 4),

δ 2 s ( n ) = π s n s 1 ( s 1 ) ! ( c 1 ( n ) 1 s c 4 ( n ) 2 s + c 3 ( n ) 3 s c 8 ( n ) 4 s + c 5 ( n ) 5 s c 12 ( n ) 6 s + c 7 ( n ) 7 s c 16 ( n ) 8 s + )

If s ≡ 1 (mod 4) and s > 1,

δ 2 s ( n ) = π s n s 1 ( s 1 ) ! ( c 1 ( n ) 1 s + c 4 ( n ) 2 s c 3 ( n ) 3 s + c 8 ( n ) 4 s + c 5 ( n ) 5 s + c 12 ( n ) 6 s c 7 ( n ) 7 s + c 16 ( n ) 8 s + )

If s ≡ 3 (mod 4),

δ 2 s ( n ) = π s n s 1 ( s 1 ) ! ( c 1 ( n ) 1 s c 4 ( n ) 2 s c 3 ( n ) 3 s c 8 ( n ) 4 s + c 5 ( n ) 5 s c 12 ( n ) 6 s c 7 ( n ) 7 s c 16 ( n ) 8 s + )

and therefore,

r 2 ( n ) = π ( c 1 ( n ) 1 c 3 ( n ) 3 + c 5 ( n ) 5 c 7 ( n ) 7 + c 11 ( n ) 11 c 13 ( n ) 13 + c 15 ( n ) 15 c 17 ( n ) 17 + ) r 4 ( n ) = π 2 n ( c 1 ( n ) 1 c 4 ( n ) 4 + c 3 ( n ) 9 c 8 ( n ) 16 + c 5 ( n ) 25 c 12 ( n ) 36 + c 7 ( n ) 49 c 16 ( n ) 64 + ) r 6 ( n ) = π 3 n 2 2 ( c 1 ( n ) 1 c 4 ( n ) 8 c 3 ( n ) 27 c 8 ( n ) 64 + c 5 ( n ) 125 c 12 ( n ) 216 c 7 ( n ) 343 c 16 ( n ) 512 + ) r 8 ( n ) = π 4 n 3 6 ( c 1 ( n ) 1 + c 4 ( n ) 16 + c 3 ( n ) 81 + c 8 ( n ) 256 + c 5 ( n ) 625 + c 12 ( n ) 1296 + c 7 ( n ) 2401 + c 16 ( n ) 4096 + )

r′2s(n) (sums of triangles)

r2s(n) is the number of ways n can be represented as the sum of 2s triangular numbers (i.e. the numbers 1, 3 = 1 + 2, 6 = 1 + 2 + 3, 10 = 1 + 2 + 3 + 4, 15, ...; the n-th triangular number is given by the formula n(n + 1)/2.)

The analysis here is similar to that for squares. Ramanujan refers to the same paper as he did for the squares, where he showed that there is a function δ′2s(n) such that r2s(n) = δ′2s(n) for s = 1, 2, 3, and 4, and that for s > 4, δ′2s(n) is a good approximation to r2s(n).

Again, s = 1 requires a special formula:

δ 2 ( n ) = π 4 ( c 1 ( 4 n + 1 ) 1 c 3 ( 4 n + 1 ) 3 + c 5 ( 4 n + 1 ) 5 c 7 ( 4 n + 1 ) 7 + ) .

If s is a multiple of 4,

δ 2 s ( n ) = ( π 2 ) s ( s 1 ) ! ( n + s 4 ) s 1 ( c 1 ( n + s 4 ) 1 s + c 3 ( n + s 4 ) 3 s + c 5 ( n + s 4 ) 5 s + ) .

If s is twice an odd number,

δ 2 s ( n ) = ( π 2 ) s ( s 1 ) ! ( n + s 4 ) s 1 ( c 1 ( 2 n + s 2 ) 1 s + c 3 ( 2 n + s 2 ) 3 s + c 5 ( 2 n + s 2 ) 5 s + ) .

If s is an odd number and s > 1,

δ 2 s ( n ) = ( π 2 ) s ( s 1 ) ! ( n + s 4 ) s 1 ( c 1 ( 4 n + s ) 1 s c 3 ( 4 n + s ) 3 s + c 5 ( 4 n + s ) 5 s ) .

Therefore,

r 2 ( n ) = π 4 ( c 1 ( 4 n + 1 ) 1 c 3 ( 4 n + 1 ) 3 + c 5 ( 4 n + 1 ) 5 c 7 ( 4 n + 1 ) 7 + ) r 4 ( n ) = ( π 2 ) 2 ( n + 1 2 ) ( c 1 ( 2 n + 1 ) 1 + c 3 ( 2 n + 1 ) 9 + c 5 ( 2 n + 1 ) 25 + ) r 6 ( n ) = ( π 2 ) 3 2 ( n + 3 4 ) 2 ( c 1 ( 4 n + 3 ) 1 c 3 ( 4 n + 3 ) 27 + c 5 ( 4 n + 3 ) 125 ) r 8 ( n ) = ( 1 2 π ) 4 6 ( n + 1 ) 3 ( c 1 ( n + 1 ) 1 + c 3 ( n + 1 ) 81 + c 5 ( n + 1 ) 625 + )

Sums

Let

T q ( n ) = c q ( 1 ) + c q ( 2 ) + + c q ( n ) U q ( n ) = T q ( n ) + 1 2 ϕ ( q )

Then for s > 1,

σ s ( 1 ) + + σ s ( n ) = ζ ( s + 1 ) ( n + T 2 ( n ) 2 s + 1 + T 3 ( n ) 3 s + 1 + T 4 ( n ) 4 s + 1 + ) = ζ ( s + 1 ) ( n + 1 2 + U 2 ( n ) 2 s + 1 + U 3 ( n ) 3 s + 1 + U 4 ( n ) 4 s + 1 + ) 1 2 ζ ( s ) d ( 1 ) + + d ( n ) = T 2 ( n ) log 2 2 T 3 ( n ) log 3 3 T 4 ( n ) log 4 4 , d ( 1 ) log 1 + + d ( n ) log n = T 2 ( n ) ( 2 γ log 2 log 2 2 ) 2 T 3 ( n ) ( 2 γ log 3 log 2 3 ) 3 T 4 ( n ) ( 2 γ log 4 log 2 4 ) 4 , r 2 ( 1 ) + + r 2 ( n ) = π ( n T 3 ( n ) 3 + T 5 ( n ) 5 T 7 ( n ) 7 + ) .

References

Ramanujan's sum Wikipedia