23

Prove that $$\sum_{n = 1}^{2160}\exp\left(\pi i\frac{n(n + 1)(2n + 1)}{1080}\right) = 0$$

This question was posted and closed for lack of context and - mainly, I guess - progress by the OP. I wasn't sure if I should have edited that question, posed by someone else, with my attempts; I saw a similar situation here and therefore decided to post my own question, including my own effort, since I find this problem interesting, hoping that it can be answered by someone. To be fair, I am not even sure the identity is true [it is true, see my edit below].

Like someone suggested in the comments of that post, it is easy to see that $$\sum_{k=1}^nk^2=\frac{n(n+1)(2n+1)}6,$$ so the sum can be written in the form $$\sum_{n=1}^{2160}\exp\left({\frac{\pi i}{180}\sum_{k=1}^n k^2}\right).$$

However, I can't see how this form might help solve the problem [well, I couldn't. Again, have a look at my edit]. On the other hand, it is well known that the sum of the $n$-th roots of unity is $0$, and I thought this result could be useful. [At the beginning it turned out not to be; here is my first attempt. Later I came up with a way to make use of this fact, as you can see below].

The roots of $z^{2160} = 1$ satisfy an identity similar to the goal: $$\sum_{n = 1}^{2160}\exp\left(2\pi i \frac{n}{2160}\right) = 0.$$

Next, observe that if $n_1, n_2 \in \mathbb{N}$ are such that $n_1 \equiv n_2 \pmod {2160}$, and so $\exists c \in \mathbb{N}: n_1 = n_2 + 2160c$, then

\begin{aligned} \exp\left(2\pi i\frac{n_1}{2160}\right) &= \exp\left(2\pi i\frac{n_2 + 2160c}{2160}\right) \\ &= \exp\left[2\pi i \left(\frac{n_2}{2160} + c\right)\right] \\ &= \exp\left(2\pi i \frac{n_2}{2160} + 2\pi i c\right) \\ &= \exp\left(2\pi i \frac{n_2}{2160}\right) \exp\left(2\pi i c\right) \\ &= \exp\left(2\pi i \frac{n_2}{2160}\right) \end{aligned}

Since our sum can be written in the form $$\sum_{n = 1}^{2160}\exp\left(2\pi i\frac{n(n + 1)(2n + 1)}{2160}\right),$$ I was then wondering if all the numbers from $0$ to $2159$ appear (exactly once) when evaluating $n(n + 1)(2n + 1) \pmod{2160}, n=1,2,\dots,2160$, to replace $n(n + 1)(2n + 1)$ in the sum with the remainder and make use of the sum of the roots of the unity. Running a simple excel program, though, I observed that both $59 \cdot 60 \cdot 119$ and $60 \cdot 61 \cdot 121$ are congruent to $60 \pmod {2160}$.

I wonder if any of you knows an alternative strategy to solve this problem. Unfortunately, I cannot provide additional context because I am not really the OP, but I let my Professor of Complex Analysis have a quick look at this problem and he said something about Gauss Sums; I don't know very much about them and they look like an advanced topic. Perhaps an easier solution exists.

[EDIT #$1$:] Using the formula for the sum of the first $n$ squares, the problem simplifies a little bit, since it is not necessary to evaluate numbers $\pmod {2160}$ anymore, but "only" $\pmod {360}$. $$\sum_{n=1}^{2160}\exp\left({\frac{\pi i}{180}\sum_{k=1}^n k^2}\right) = \sum_{n=1}^{2160}\exp\left({\frac{2\pi i}{360}\sum_{k=1}^n k^2}\right).$$

Observe that now, though, it is impossible that all the numbers from $0$ to $359$ are obtained exactly once from $\sum_{k=1}^n k^2 \pmod {360}, n=1,2,\dots,2160$, by the pigeonhole principle. However, I thought that maybe each remainder could appear exactly $6$ times to apply the formula for the sum of the $360$th-roots of unity $6$ times.

Again, this is not the case, but running another simple excel program I noticed that something very interesting happens: there is a sort of "loop" $\pmod 5$, in the sense that the function $c(m), m=0,1,\dots,359$ which counts how many times each remainder is obtained, i.e. $$c(m):=\left|\left\{n=1,2,\dots,2160 : m \equiv \sum_{k=1}^n k^2 \pmod {360}\right\}\right|$$ gives

$$\begin{array}{|c|c|c|c|c|c|c|c|c|c|c|c|c|c} \hline m & 0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & \dots\\ \hline c(m) & 18 & 6 & 0 & 0 & 6 & 18 & 6 & 0 & 0 & 6 & \dots\\ \hline \end{array}$$

This led me to write:

\begin{aligned} &\sum_{n=1}^{2160}\exp\left({\frac{2\pi i}{360}\sum_{k=1}^n k^2}\right) \\ = &18 \exp\left(\frac{2\pi \cdot 0 \cdot i}{360} \right) + 6 \exp\left(\frac{2\pi \cdot 1 \cdot i}{360} \right) + 6 \exp\left(\frac{2\pi \cdot 4 \cdot i}{360} \right) \\ &+ 18 \exp\left(\frac{2\pi \cdot 5 \cdot i}{360} \right) + 6 \exp\left(\frac{2\pi \cdot 6 \cdot i}{360} \right) + 6 \exp\left(\frac{2\pi \cdot 9 \cdot i}{360} \right) \\ &+ \cdots \\ &+ 18 \exp\left(\frac{2\pi \cdot 355 \cdot i}{360} \right) + 6 \exp\left(\frac{2\pi \cdot 356 \cdot i}{360} \right) + 6 \exp\left(\frac{2\pi \cdot 359 \cdot i}{360} \right) \\ = &\left[18 + 6 \exp\left(i\frac{2\pi}{360} \right) + 6 \exp\left(i\frac{8\pi}{360} \right)\right] \cdot \left[1 + \exp\left(i\frac{10\pi}{360} \right) + \dots + \exp\left(i\frac{710\pi}{360} \right)\right] \\ = &\left[18 + 6 \exp\left(i\frac{2\pi}{360} \right) + 6 \exp\left(i\frac{8\pi}{360} \right)\right] \cdot \underbrace{\left[1 + \exp\left(2\pi i\frac{1}{72} \right) + \dots + \exp\left(2\pi i\frac{71}{72} \right)\right]}_\text{0} \\ = &0 \end{aligned}

since the second term is the sum of the roots of $z^{72}=1$! My intuition was fruitful, at the end of the day.

This ensures that the identity is indeed true, but I used my computer a lot before following this path. A lot of mystery remains: how could one find out (or at least prove) the "loop" of the table without a software? And, more importantly, what is special about $2160$? This is far away from being a solved problem.

Davide Masi
  • 1,677

2 Answers2

15

Let us define $u = e^{i\pi/1080}$.

Further, define $f(n) = n(n+1)(2n+1)$.

Then, we have $2160 \mid f(n+1080) - f(n) + 1080$.

The proof is trivial.

Observe that $$-1=e^{i\pi}=u^{1080}$$

Since ${f(n) \equiv f(n+1080)+1080 \pmod{2160}}$, then $$u^{f(n)} = u^{f(n+1080)+1080} = u^{f(n+1080)} \cdot u^{1080} = -u^{f(n+1080)}.$$

This means that all terms with $n\le 1080$ cancel out with all terms of $n\in [1081,2160]$.

So, the sum is equal to zero since all the first half terms telescope with the second half terms.

Sahaj
  • 5,355
  • 1
    Excellent solution, thank you very much! I have suggested an edit because I had a hard time following the order of your solution, I hope you don't mind. I tried to make it easier to read (clearly it's just my opinion) – Davide Masi Dec 30 '24 at 17:28
  • 1
    Thanks for the edit, I have accepted it. I'll just make a few changes to make it a bit simpler. – Sahaj Dec 30 '24 at 17:41
  • 1
    I have made the edit, I changed the first divisibility statement from $-1080$ to $1080$, this makes sure we can directly use $e^{i\pi}=-1$ and avoid having to use $e^{-i\pi}=-1$, although the change is purely for a simpler and little smaller solution. – Sahaj Dec 30 '24 at 17:48
  • 1
    This is even better now :) – Davide Masi Dec 30 '24 at 17:51
3

Here I propose how to prove desired claim without use of computer. I don't use the $\mod 5$ property you have discovered (at least explicitly).

First notice that $19^2 = 361 \equiv 1 \mod 360$. This means that

$$\sum_{k=1}^{18 m}k^2 \equiv m \sum_{k=1}^{18}k^2 \mod 360$$ and more generally $$\sum_{k=1}^{18 m+l}k^2 \equiv m \sum_{k=1}^{18}k^2 + \sum_{k=1}^{l}k^2\mod 360.$$

What is special about $2160$ is that we have $2160 = 18 \cdot 120$, and hence \begin{align} \sum_{n=1}^{2160}\exp\left({\frac{2\pi i}{360}\sum_{k=1}^n k^2}\right) &= \sum_{l = 1}^{18}\sum_{m=0}^{120 - 1}\exp\left({\frac{2\pi i}{360}\sum_{k=1}^{18m + l} k^2}\right)\\ &= \sum_{l = 1}^{18} c_l \sum_{m=0}^{120 - 1}\exp\left(\frac{2\pi i}{360} m \cdot A\right) \end{align} where $c_l =\exp\left({\frac{2\pi i}{360}\sum_{k=1}^{l} k^2}\right)$ and $A = \sum_{k=1}^{18}k^2$.

To show that the sum is $0$, it is enough for $A$ to be divisible by $3$ (then inner sum will be of the form $\sum_{m=0}^{120 - 1}\exp\left(\frac{2\pi i}{120} m \cdot B\right)$). But we have $$ \sum_{k=1}^{18}k^2 = \frac {18 \cdot 19 \cdot (2 \cdot 18 + 1)} 6 = 3\cdot 19 \cdot (2 \cdot 18 + 1), $$ which is divisible by $3$.

Esgeriath
  • 2,481
  • Could you please elaborate on how to derive the first to equivalences $\pmod {360}$? Also, I think $A$ being divisible by $3$ alone is not sufficient, but $B$ being coprime to $120$ makes everything work, right? – Davide Masi Dec 30 '24 at 14:35