TAOCP 3.3.3 Exercise 7
Let $h,k$ be positive integers with $\gcd(h,k)=1$.
Section 3.3.3: Theoretical Tests
Exercise 7. ▶ [M34] Give a proof of the reciprocity law (19), when $c = 0$, by using the general reciprocity law of exercise 1.2.4–45.
Verified: yes
Solve time: 1m13s
Setup
Let $h,k$ be positive integers with $\gcd(h,k)=1$. Define
$$ s(h,k)=\sum_{0\le j<k} \left(!\left(\frac{j}{k}\right)!\right)\left(!\left(\frac{hj}{k}\right)!\right), $$
so that by Eq. (16) with $c=0$,
$$ \sigma(h,k,0)=12,s(h,k), \qquad \sigma(k,h,0)=12,s(k,h). $$
Exercise 1.2.4–45 gives the reciprocity law
$$ s(h,k)+s(k,h)= -\frac14 + \frac{1}{12}\left(\frac{h}{k}+\frac{k}{h}+\frac{1}{hk}\right). $$
It remains to transform this identity into the required statement for $\sigma$.
Solution
Multiplying the reciprocity identity from Exercise 1.2.4–45 by $12$ yields
$$ 12s(h,k)+12s(k,h)
-3 + \left(\frac{h}{k}+\frac{k}{h}+\frac{1}{hk}\right). $$
Using $\sigma(h,k,0)=12s(h,k)$ and $\sigma(k,h,0)=12s(k,h)$, the left-hand side becomes
$$ \sigma(h,k,0)+\sigma(k,h,0). $$
Substitution gives
$$ \sigma(h,k,0)+\sigma(k,h,0)
\frac{h}{k}+\frac{k}{h}+\frac{1}{hk}-3. $$
For $c=0$, the term $e(h,c)$ in Eq. (20) equals $1$ since $[c=0]=1$, and the term $[c/h]$ equals $0$. Hence Eq. (19) reduces to
$$ \sigma(h,k,0)+\sigma(k,h,0)
\frac{h}{k}+\frac{k}{h}+\frac{1}{hk}-3, $$
which coincides with the derived identity.
This completes the proof. ∎
Verification
The reduction from $\sigma$ to $s$ uses only the definition $\sigma(h,k,0)=12s(h,k)$. The factor $12$ multiplies every term in the reciprocity law from Exercise 1.2.4–45, including the constant $-1/4$, producing $-3$, and including the rational terms, producing $h/k+k/h+1/(hk)$. The specialization $c=0$ in Eq. (19) yields $e(h,0)=1$ and $[0/h]=0$, so the constant term matches the transformed expression.
Notes
The argument shows that Eq. (19) at $c=0$ is a direct rescaling of the classical Dedekind sum reciprocity law. The structure of Eq. (19) for general $c$ extends this base case by introducing correction terms depending on the residue class of $c$ modulo $h$ and the quadratic shift $c^2/(hk)$.