Determine, with proof, if there exists an odd prime $p$ such that the following equation holds: $$\sum_{n = 1}^{\frac{p-1}{2}} \cot\left(\frac{\pi n^2}{p}\right) = 69\sqrt{p}$$ Proposed by Chris Bao
Problem
Source: RELMO/RELSMO Bonus Problem
Tags: number theory, revenge elmo, revenge elsmo, relmo
Gogobao
11.07.2022 20:58
The answer is yes. I claim that $p = 69691$ works. The proof is left as an exercise to the reader. As another exercise, try solving the problem if $69$ is replaced with $420$.
ZETA_in_olympiad
11.07.2022 21:02
Interesting problem.
Gogobao
11.07.2022 21:20
The answer for $69$ is yes. The answer for $420$ is no.
First, note that the sum is equal to $0$ if $p \equiv 1 \pmod{4}$. Thus, we limit our consideration to $3$ mod $4$ primes.
Recall the identity $$\pi \cot (\pi z) = \sum_{n \in \mathbb{Z}} \frac{1}{z+n}$$Proof of convergenceThis is equal to $$\frac{1}{x} + \sum_{n = 1}^{\infty} \frac{1}{z+n}-\frac{1}{n} + \sum_{n = 1}^{\infty} \frac{1}{z-n}+\frac{1}{n}$$It is easy to see that the two individual sums converge.
Thus, $$\pi \sum_{n = 1}^{\frac{p-1}{2}} \cot \left (\frac{\pi n^2}{p} \right) = \sum_{n \in P} \pi \cot \left (\frac{\pi n}{p} \right) = \sum_{n \in P} \sum_{m \in \mathbb{Z}} \frac{1}{\frac{n}{p}+m} = \sum_{n \in P} \sum_{m \in \mathbb{Z}} \frac{p}{n+mp}$$where $P$ denotes the set of quadratic residues mod $p$. The first equality follows as $\cot$ is periodic with a period of $\pi$. We take the factor of $\pi p$ out and only consider the sum $$\sum_{n \in P} \sum_{m \in \mathbb{Z}} \frac{1}{n+mp}$$Consider the integer $r$. Note that if $r$ is a quadratic residue mod $p$, then there is exactly one solution to $r = n+mp$, where $n \in P, m \in \mathbb{Z}$. Since $p$ is $3$ mod $4$, exactly one of $r, -r$ is a quadratic residue mod $p$. Define $$L(s, \chi) = \sum_{r = 1}^{\infty} \frac{\genfrac(){}{}{r}{p}}{r^s}$$We can now rewrite our sum as $L(1, \chi)$. Now, let $K$ denote the field $\mathbb{Q}(\sqrt{-p})$. Let $\zeta_K (s)$ denote the Dedekind zeta function of $K$. Recall that $$\zeta_K (s) = \sum_{I \subseteq \mathcal{O}_K} \frac{1}{N(I)^s}$$where $\mathcal{O}_K$ denotes the ring of integers of $K$ and $N(I)$ denotes the absolute norm of $I$. Thus, this sum is equal to $$\sum_{n = 1}^{\infty} \frac{k(n)}{n^s}$$where $k(n)$ denotes the number of ideals of norm $n$. However, note that $$k(n) = \sum_{m|n} \genfrac(){}{}{m}{p}$$. Because $\genfrac(){}{}{m}{p}$ is multiplicative, it suffices to verify this at prime powers and then finish with unique factorization of ideals.
Thus, we have $$\zeta_K (s) = \sum_{n = 1}^{\infty} \frac{1}{n^s} \sum_{m|n} \genfrac(){}{}{m}{p} = \left (\sum_{n = 1}^{\infty} \frac{1}{n^s}\right)\left (\sum_{n = 1}^{\infty} \frac{\genfrac(){}{}{n}{p}}{n^s}\right) = \zeta(s)L(s, \chi)$$Now, recall the class number formula $$\lim_{s \rightarrow 1} (s-1)\zeta_K (s) = \frac{2^{r_1} \cdot (2\pi)^{r_2} \cdot \text{Reg}_K \cdot h_K}{w_K \cdot \sqrt{|D_K|}}$$where $r_1$ is the number of real embeddings of $K$, $2r_2$ is the number of complex embeddings of $K$, $\text{Reg}_K$ is the regulator of $K$, $h_K$ is the class number of $K$, $w_K$ is the number of roots of unity contained in $K$, and $D_K$ is the discriminant of the extension $K/\mathbb{Q}$. We first calculate the LHS: $$\lim_{s \rightarrow 1}(s-1)\zeta_K (s) = \left(\lim_{s \rightarrow 1} (s-1)\zeta (s)\right)\left(\lim_{s \rightarrow 1}L(s, \chi)\right) = L(1, \chi)$$Now, we simplify the right hand side. The only roots of unity contained in $K$ are $1, -1$, so $w_K = 2$. Since $K = \mathbb{Q}(\sqrt{-p})$, the discriminant $D_K$ equals $-p$, so $|D_k| = p$. The regulator is $1$, as the rank of the unit group is $r = 0$ (recall that the only units of $K$ are $1, -1$). Note that $r_1+2r_2 = [K:\mathbb{Q}] = 2$, while Dirichlet's unit theorem gives $r_1+r_2-1 = r = 0$. We solve the system of equations and get $r_1 = 0, r_2 = 1$. Thus, the RHS turns out to be $\frac{\pi h_K}{\sqrt{p}}$. Thus, we have the equation $$L(1, \chi) = \frac{\pi h_K}{\sqrt{p}}$$We finally compute that $$\sum_{n = 1}^{\frac{p-1}{2}} \cot \left (\frac{\pi n^2}{p} \right) = \frac{p}{\pi} L(1, \chi) = \frac{p\pi h_K}{\pi \sqrt{p}} = h_K\sqrt{p}$$Because $p$ is $3$ mod $4$, we can use a second class number formula $$ph_p = N-Q$$where $h_p$ denotes the class number of $\mathbb{Q}(\sqrt{-p})$, $Q$ denotes the sum of the quadratic residues mod $p$, and $N$ denotes the sum of the nonquadratic residues mod $n$. We find that for $p = 69691$, $Q = 1211787108, N = 1216595787$, and $N-Q = 4808679 = 69 \cdot 69691$, the class number of $\mathbb{Q}(\sqrt{-69691})$ is indeed $69$ as desired.
Now, not that $N+Q = p\frac{p-1}{2}$. Thus, since $p \equiv 3 \pmod{4}$, it follows that $\frac{p-1}{2}$ is odd, and $N+Q$ is odd as well. Thus, $N-Q$ is odd, and so is $h_p$. Thus, it is impossible for $h_p = 420$.
DottedCaculator
11.07.2022 21:21
Extension: Show that exactly 209 values of $p$ work
Gogobao
13.07.2022 20:54
Minor correction: for $p = 3$, we have $w_K = 6$ and the sum will equal $\frac{h_3\sqrt{3}}{3} = \frac{\sqrt{3}}{3}$ in that case (recall that $h_3 = 1$).
wzs26843545602
04.06.2024 15:19
DottedCaculator wrote: Extension: Show that exactly 209 values of $p$ work
solve Gauss' class number problem for that number! Solution is here:
https://www.ams.org/journals/mcom/2004-73-246/S0025-5718-03-01517-5/S0025-5718-03-01517-5.pdf