A proof of Spence's formula using the reciprocity law for Dedekind sums
Steven Brown
TL;DR
The paper addresses a classical arithmetical identity: the Spence formula for the sum $\sum_{j=1}^{\phi(n)} j a_j$ with $a_j$ the reduced residues modulo $n$. It offers a new direct proof by exploiting the reciprocity law for Dedekind sums, built around the auxiliary functions $\theta_n(x)$ and $\nu_n(x)$ and a reformulation over the set $\mathbb{U}(n)$. The argument transforms the problem into evaluating Dedekind sums $s(n/d_1,n/d_2)$ via reciprocity, yielding the closed form involving the square-free part $m$ and its prime-factor count $\omega(m)$. The work not only provides an alternative derivation of the Spence formula but also suggests a versatile method for similar sums and connects to distribution considerations for the $a_j$ as discussed in Delange's framework.
Abstract
In 1963, Edward Spence published a proof of the following With $φ$ being Euler totient function, if $n>1$ is an integer, and if \begin{equation*} 0<a_1<\cdots<a_{φ(n)}<n, \end{equation*} are the positive integers less than $n$, coprime with $n$, then \begin{equation*} \sum_{j=1}^{φ(n)}ja_j = \frac{φ(n)}{24}\left(8nφ(n)+6n+2φ(m)(-1)^{ω(m)}-2^{ω(m)}\right), \end{equation*} where $m$ is the square-free part of $n$ and $ω(m)$ is the number of prime factors of $m$. Spence's proof relies on an ingenious observation considering Nagell's totient function. Later in 1971, Lucien Van Hamme provided an alternative proof of the result using Fourier analysis and previous work from Hubert Delange in 1968. In this paper I propose another proof of the formula using the reciprocity law for Dedekind sums. If the formula is of interest on its own, it also plays a role in the analysis of the distribution of the $a_j$ as suggested by the work from Hubert Delange.
