I have the following question about Ramanujan sums.

(All vectors and matrices here will be understood to have integer entries.)

Let Xq={(x1,...,xR)|1≤xi≤q} and let, for any R×R matrix B with rows bi,

cq(Bx):=cq(b1⋅x)...cq(br⋅x),

where cq(n) is Ramanujan’s sum. Suppose an R×R matrix A with determinant D is given and denote by I the identity matrix. Then my question would be:Does

S=∑x∈XqAx≡0(q)cq(Ix)

depend only on (q,D)?

In fact I thought the sum would be zero except for the case (q,D)=1 but I’m not so sure this is true.

Why might it be true? Write di for the i-th elementary divisor of A. Then on considering the Smith normal form of A and after using cdq(dn)=f(q,d)cq(n) we have, up to a function depending only on q and (q,di),

S=∑x∈X(q,D)c(q,D)(QEx),

where Q=Q(A) is invertible and E=(ei,j) is a diagonal matrix with

ei,i=(q,dR)(q,di).

It seems to me plausible that this last sum is zero except for when (q,dR)=1, which would be perfect. Testing thousands of 3×3 matrices gives me always zero, so I do start to believe it. Could it be true? And along which lines should I be thinking if I want to prove it?

Any suggestions would be very much appreciated!

**Answer**

**Attribution***Source : Link , Question Author : Tomos Parry , Answer Author : Community*