1 Introduction and results

For integers nm, define the Ramanujan sum

$$\begin{aligned} c(m,n)=\sum _{(h,n)=1}e^{2\pi i\frac{hm}{n}} = \mu \left( \frac{n}{(n,m)}\right) \frac{\varphi (n)}{\varphi \left( \frac{n}{(n,m)}\right) }. \end{aligned}$$

Here \(\mu \) denotes the Möbius function, \(\varphi \) Euler’s function, and (nm) is the greatest common divisor of n and m. Later \(\tau (n)\) denotes the number of divisors of n.

Ramanujan sums occur naturally in various problems involving discrete Fourier transforms. Here we only want to stress the relation to arithmetic functions, as described in the book by Schwarz and Spilker [2].

Denote be \({\mathcal {D}}(n)\) the set of divisors of n. In this note, we compute the determinant of the matrix \(C_n=(c(d, t))_{d, t\in {\mathcal {D}}(n)}\). We prove the following.

Theorem 1

We have \(\det C_n= \pm n^{\frac{\tau (n)}{2}}\).

Note that as we did not specify an order for the divisors, the determinant is only determined up to a sign. From Theorem 1, we immediately obtain the following.

Corollary 2

For every n, we have that the matrix \(C_n\) is invertible.

While the calculation of determinants involving arithmetic functions is an area of some activity going back to Smith’s computation [3] of \(\det ((i,j))_{i,j=1}^n\), the main reason that we are interested in this matrix comes from its connection to certain Cayley graphs. Let \(S=\{a_1, \ldots , a_k\}\subseteq \{0, 1, 2, \ldots , \lfloor \frac{n}{2}\rfloor \}\) be a generating system of \({\mathbb {Z}}/n{\mathbb {Z}}\), and \({\mathcal {G}}\) the Cayley graph of \({\mathbb {Z}}/n{\mathbb {Z}}\) with respect to \(\pm S\). So [4] showed that \({\mathcal {G}}\) has integral spectrum if and only if there exists a set \(T\subseteq D(n)\) such that \(S=\{i: (i, n)\in T\}\). He conjectured that the spectrum of \({\mathcal {G}}\) determines n and S. The multi-set of eigenvalues of \({\mathcal {G}}\) is \(\{\sum _{d\in S} c(\ell , \frac{n}{d}): 1\le \ell \le n\}\). As a weakening of So’s conjecture, Sander and Sander [1] conjectured that if S is a set of divisors of n, then the vector \(\left( \sum _{d\in S} c(\ell , \frac{n}{d})\right) _{\ell =1}^n\) determines S. As \(c(\ell , \frac{n}{d})\) depends only on \((\ell , n)\), this is equivalent to the statement that the restriction of \(C_n\) to \(\{0, 1\}^{\tau (n)}\) is injective. We conclude that Corollary 2 implies the following.

Corollary 3

If S is a set of divisors of the integer n, then the vector \(\left( \sum _{d\in S} c(\ell , \frac{n}{d})\right) _{\ell =1}^n\) determines S.

The same result has been obtained independently by Mönius (unpublished).

The function that maps a divisor set S to the multi-set of eigenvalues of the associated Cayley graph can be seen as the composition of the map sending S to the spectral vector and the forgetful map interpreting the vector as a multi-set. So by Corollary 3, So’s conjecture is equivalent to the question when the second map is injective. Here we use Corollary 3 to prove the following. As an abbreviation, we put \(L(n)=\exp \big ((\log n)^{2/3}\log \log n\big )\).

Proposition 4

  1. 1.

    Suppose that n has no pair of distinct divisors \(t_1, t_2\) such that \(\varphi (n/t_1)\le \varphi (n/t_2) < 2\) with the possible exception of \(t_1=n\), \(t_2=n/2\). Then So’s conjecture holds for n.

  2. 2.

    So’s conjecture holds for almost all integers n such that n has no prime divisor \(<L(n)\).

The first statement generalizes the result by Sander and Sander [1] who proved So’s conjecture if n is a prime power.

2 Proofs

We prove Theorem 1 by induction over the number of prime divisors of n. For \(n=1\), we have \(C_1=(1)\). Now let na be positive integers, p a prime number which does not divide n, we shall compute \(\det C_{p^an}\). Let \(d_1, \ldots , d_k\) be the divisors of n. We order the divisors of \(p^an\) as

$$\begin{aligned} d_1, d_2, \ldots , d_k;\, pd_1, pd_2, \ldots , pd_k;\,p^2d_1, \ldots , p^2d_k;\, \ldots ;\, p^ad_1, \ldots , p^ad_k. \end{aligned}$$

Then \(C_{p^an}\) can be written as an \((a+1)\times (a+1)\) block matrix

$$\begin{aligned} \begin{pmatrix} A_{00} &{} A_{01} &{} \dots &{} A_{0a}\\ A_{10} &{} A_{11} &{} \dots &{} A_{1a}\\ \vdots &{} \vdots &{} &{} \vdots \\ A_{a0} &{} A_{a1} &{} \dots &{} A_{aa}\\ \end{pmatrix}, \end{aligned}$$

where

$$\begin{aligned} A_{ij} = \left( \mu \left( \frac{p^jd_\nu }{(p^jd_\nu , p^id_\mu )}\right) \frac{\varphi (p^jd_\nu )}{\varphi \left( \frac{p^jd_\nu }{(p^jd_\nu , p^id_\mu )}\right) }\right) _{\nu , \mu =1}^k. \end{aligned}$$

We now compute \(A_{ij}\). It is clear that \(A_{00}=C_n\). If \(j\ge i+2\), then \(p^2\) divides \(\frac{p^jd_\nu }{(p^jd_\nu , p^id_\mu )}\), thus, \(A_{ij}=0\).

If \(j=i+1\), then

$$\begin{aligned} \mu \left( \frac{p^jd_\nu }{(p^jd_\nu , p^id_\mu )}\right) \frac{\varphi (p^jd_\nu )}{\varphi \left( \frac{p^jd_\nu }{(p^jd_\nu , p^id_\mu )}\right) }= & {} \mu \left( p\frac{d_\nu }{(d_\nu , d_\mu )}\right) \frac{p^{j-1}(p-1)\varphi (d_\nu )}{(p-1)\varphi \left( \frac{d_\nu }{(d_\nu , d_\mu )}\right) }\\= & {} -p^{j-1}\mu \left( \frac{d_\nu }{(d_\nu , d_\mu )}\right) \frac{\varphi (d_\nu )}{\varphi \left( \frac{d_\nu }{(d_\nu , d_\mu )}\right) }, \end{aligned}$$

and therefore \(A_{ji}=-p^{j-1} A_{00}\).

If \(j\le i\), then

$$\begin{aligned} \mu \left( \frac{p^jd_\nu }{(p^jd_\nu , p^id_\mu )}\right) \frac{\varphi (p^jd_\nu )}{\varphi \left( \frac{p^jd_\nu }{(p^jd_\nu , p^id_\mu )}\right) } = \mu \left( \frac{d_\nu }{(d_\nu , d_\mu )}\right) \frac{p^{j-1}(p-1)\varphi (d_\nu )}{\varphi \left( \frac{d_\nu }{(d_\nu , d_\mu )}\right) }, \end{aligned}$$

that is, \(A_{ji}=(p-1)p^{j-1} A_{00}\). We conclude that up to a permutation of the rows and columns \(C_{p^an}\) equals

$$\begin{aligned} \begin{pmatrix} C_n &{} -C_n &{} 0 &{} 0 &{} \ldots &{} 0\\ C_n &{} (p-1)C_n &{} -p C_n &{} 0 &{} \ldots &{} 0\\ C_n &{} (p-1)C_n &{} p(p-1)C_n &{} -p^2 C_n &{} \ldots &{} 0\\ C_n &{} (p-1)C_n &{} p(p-1)C_n &{} p^2(p-1)C_n &{} \ldots &{} 0\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{} \\ C_n &{} (p-1)C_n &{} p(p-1)C_n &{} p^2(p-1)C_n &{} \ldots &{} -p^{a-1}C_n\\ C_n &{} (p-1)C_n &{} p(p-1)C_n &{} p^2(p-1)C_n &{} \ldots &{} p^{a-1}(p-1)C_n\\ \end{pmatrix}. \end{aligned}$$

We now add the first block column to the second, then the second to the third, and continue in this way. We find that

$$\begin{aligned} \det C_{p^an}= & {} \pm \det \begin{pmatrix} C_n &{} 0 &{} 0 &{} 0 &{} \ldots &{} 0\\ C_n &{} pC_n &{} 0 &{} 0 &{} \ldots &{} 0\\ C_n &{} pC_n &{} p^2C_n &{} 0 &{} \ldots &{} 0\\ C_n &{} pC_n &{} p^2C_n &{} p^3C_n &{} \ldots &{} 0\\ \vdots &{} \vdots &{} \vdots &{} \vdots &{} &{} \vdots &{} \\ C_n &{} pC_n &{} p^2C_n &{} p^3C_n &{} \ldots &{} 0\\ C_n &{} pC_n &{} p^2C_n &{} p^3C_n &{} \ldots &{} p^aC_n\\ \end{pmatrix}\\= & {} \pm p^{\frac{a(a+1)}{2}\tau (n)}\left( \det C_n\right) ^{a+1}. \end{aligned}$$

By our inductive hypothesis, we obtain

$$\begin{aligned} \left| \det C_{p^an}\right| = p^{\frac{a(a+1)}{2}\tau (n)} n^{\frac{\tau (a)}{2}(a+1)} = \left( p^an\right) ^{\frac{(a+1)\tau (n)}{2}} = \left( p^an\right) ^{\frac{\tau (p^an)}{2}}, \end{aligned}$$

and the proof of Theorem 1 is complete.

As the proofs of Corollary 2 and 3 are obvious, we now turn to the proof of Proposition 4. Suppose there are two different spectral vectors \(v_1, v_2\) associated to the divisor sets \(S_1, S_2\) which are mapped to the same multi-set. Then there is some integer x such that \(v_1\) and \(v_2\) have the same number of entries equal to x, but there exists some index i such that the i-th entry of \(v_1\) is equal to x, while the i-th entry of \(v_2\) is not equal to x. As the level sets of \(v_1, v_2\) are unions of sets of the form \(\{i:(i,n)=t\}\) for some divisor t of n, we obtain that there are two non-empty sets \(T_1, T_2\) of divisors of n such that \(T_1\ne T_2\), \(\sum _{t\in T_1}\varphi (n/t)=\sum _{t\in T_2}\varphi (n/t)\), and \(\sum _{d\in S_1} c(t_1, \frac{n}{d})=\sum _{d\in S_2}c(t_2, \frac{n}{d})\) for all \(t_1\in T_1\), \(t_2\in T_2\).

We now show that under the condition in Proposition 4(1) this cannot happen. Suppose first that \(n\in T_1\). We have \(c(n, n/d)=\varphi (n/d)\ge c(n/t, n/d)\) for all t, together with the fact that \(\sum _{d\in S_1} \varphi (n/d)=\sum _{d\in S_2}\varphi (n/d)\) we obtain that \(\sum _{d\in S_1} c(n, n/d)=\sum _{d\in S_2} c(n, n/d)\) implies \((n/d, n/t)=n/d\) for all \(d\in S_2\). In other words, we have t|d for all \(d\in S_2\). But this contradicts the assumption that \(S_2\) is a generating system of \({\mathbb {Z}}/n{\mathbb {Z}}\).

If n is not in \(T_1\), let \(t_0\in T_1\Delta T_2\) be minimal. As \(T_1\) and \(T_2\) are different, the symmetric difference is non-empty, that is, \(t_0\) certainly exists. Without loss, we may assume that \(t_0\in T_1\), and we have

$$\begin{aligned} 0= & {} \sum _{t\in T_1}\varphi (n/t)-\sum _{t\in T_2}\varphi (n/t)\ge \varphi (n/t_0)-\underset{t>t_0}{\sum _{t\in T_1\cup T_2}}\varphi (n/t)\\\ge & {} \varphi (n/t_0)-\frac{\varphi (n/t_0)}{2}-\frac{\varphi (n/t_0)}{4}-\cdots -\frac{\varphi (n/t_0)}{2^{\tau (n)}} > 0, \end{aligned}$$

which is impossible. Hence, the first part of the proposition follows.

For the second statement of the proposition, we show that almost all integers n, which have no prime divisor \(p<L(n)\), satisfy the assumption of the first statement. Denote by \(P^-(n)\) the smallest prime divisor of n, and let \(\Phi (x, y)\) be the number of integers \(n\le x\) such that \(P^-(n)\le y\). The following is well known, see e.g. [5, chapter III.6.2] for much more precise results.

Lemma 5

There exist positive constants \(c_1, c_2\) such that for all real numbers xy satisfying \(2\le y\le \frac{x}{2}\), we have

$$\begin{aligned} c_1\frac{x}{\log y} \le \Phi (x,y) \le c_2\frac{x}{\log y}. \end{aligned}$$

We now show that for almost all integers n satisfying \(P^-(n)\ge L(n)\), there do not exist divisors \(d_1\ne d_2\) of n such that \(\varphi (d_1)\le \varphi (d_2)<2\varphi (d_1)\).

If \(P^-(n)\ge L(n)\), then for every divisor d of n, we have

$$\begin{aligned} \frac{\varphi (d)}{d}\ge \left( 1-\frac{1}{L(n)}\right) ^{\omega (d)}\ge \left( 1-\frac{1}{L(n)}\right) ^{\frac{\log n}{\log 2}} = 1+o(1), \end{aligned}$$

it suffices to estimate the number of integers without small prime divisors, which have divisors \(d_1, d_2\) with \(d_1<d_2<3d_1\). To do so, we estimate the number of triplets \((n, d_1, d_2)\), where \(n\in [x, 2x]\), \(P^-(n)>L(n)\), and \(d_1, d_2\) are divisors satisfying \(d_1<d_2<3d_1\).

Put \(y=L(x)\). Then the number of tripels is bounded above by

$$\begin{aligned}&\sum _{k\ge 0} \underset{d_1\ne d_2}{\sum _{d_1, d_2\in [2^k y, 6\cdot 2^k y]}} |\{n\le x: P^-(n)\ge y, [d_1, d_2]|n\}| \\&=\sum _{k\ge 0} \underset{P^-(d_1d_2)\ge y}{\underset{d_1\ne d_2}{\sum _{d_1, d_2\in [2^k y, 6\cdot 2^k y]}}} \Phi \left( \frac{x}{[d_1, d_2]}, y\right) \ll \frac{x}{\log y}\sum _{k\ge 0} \underset{P^-(d_1d_2)\ge y}{\underset{d_1\ne d_2}{\sum _{d_1, d_2\in [2^k y, 6\cdot 2^k y]}}}\frac{1}{[d_1, d_2]}. \end{aligned}$$

Introducing t as the greatest common divisor of \(d_1\) and \(d_2\), this quantity becomes

$$\begin{aligned}&\frac{x}{\log y} \sum _{k\ge 0} \sum _{t:P^-(t)\ge y} \underset{P^-(d_1'd_2')\ge y}{\underset{d_1'\ne d_2'}{\sum _{d_1', d_2'\in \left[ \frac{2^ky}{t}, 6\cdot \frac{2^ky}{t}\right] }}}\frac{1}{td_1'd_2'} \\&\ll \frac{x}{\log ^3 y}\sum _{k=0}^{\log x} \sum _{t:P^-(t)\ge y}\frac{1}{t} \ll \frac{x}{\log ^2 x}{\log ^4 y} = o\left( \frac{x}{\log y}\right) , \end{aligned}$$

and the proof is complete.