Article · Wikipedia archive · Last revised Jun 28, 2026

Dedekind sum

In mathematics, Dedekind sums are certain finite sums of products of a sawtooth function. Dedekind introduced them in the 1880's to express the functional equation of the Dedekind eta function, in a commentary to Bernhard Riemann's collected papers.. They have subsequently been much studied in number theory but also occur in some results in topology, geometric combinatorics, algebraic geometry, and computational complexity. Dedekind sums have been generalized in various directions, satisfying a large number of functional equations; this article lists only a small fraction of these.

Last revised
Jun 28, 2026
Read time
≈ 5 min
Length
1,132 w
Citations
10
Source

In mathematics, Dedekind sums are certain finite sums of products of a sawtooth function. Dedekind introduced them in the 1880's to express the functional equation of the Dedekind eta function, in a commentary to Bernhard Riemann's collected papers.1. They have subsequently been much studied in number theory but also occur in some results in topology,2 geometric combinatorics,3 algebraic geometry,4 and computational complexity.5 Dedekind sums have been generalized in various directions, satisfying a large number of functional equations; this article lists only a small fraction of these.

Definition

Define the sawtooth function ( ( ) ) : R R {\displaystyle (\!(\,)\!):\mathbb {R} \rightarrow \mathbb {R} } as

( ( x ) ) = { x x 1 / 2 , if  x R Z ; 0 , if  x Z . {\displaystyle (\!(x)\!)={\begin{cases}x-\lfloor x\rfloor -1/2,&{\mbox{if }}x\in \mathbb {R} \setminus \mathbb {Z} ;\\0,&{\mbox{if }}x\in \mathbb {Z} .\end{cases}}}

We then define the Dedekind sum

D : Z 2 × Z > 0 Q {\displaystyle D:\mathbb {Z} ^{2}\times \mathbb {Z} _{>0}\to \mathbb {Q} }

by

D ( a , b ; c ) = n = 1 c 1 ( ( a n c ) ) ( ( b n c ) ) . {\displaystyle D(a,b;c)=\sum _{n=1}^{c-1}\left(\!\!\left({\frac {an}{c}}\right)\!\!\right)\!\left(\!\!\left({\frac {bn}{c}}\right)\!\!\right).}

For the case a = 1, one often writes

s(b, c) = D(1, b; c).

Simple formulae

Note that D is symmetric in a and b, i.e.,

D ( a , b ; c ) = D ( b , a ; c ) , {\displaystyle D(a,b;c)=D(b,a;c),}

and that, by the oddness of (( )),

D(−a, b; c) = −D(a, b; c).

By the periodicity of D in its first two arguments, the third argument being the length of the period for both,

D(a, b; c) = D(a+kc, b+lc; c), for all integers k,l.

If d is a positive integer, then

D(ad, bd; cd) = dD(a, b; c),
D(ad, bd; c) = D(a, b; c), if (d, c) = 1,
D(ad, b; cd) = D(a, b; c), if (d, b) = 1.

There is a proof for the last equality making use of

n = 1 c 1 ( ( n + x c ) ) = ( ( x ) ) , x R . {\displaystyle \sum _{n=1}^{c-1}\left(\!\!\left({\frac {n+x}{c}}\right)\!\!\right)=(\!(x)\!),\qquad \forall x\in \mathbb {R} .}

Furthermore, az = 1 (mod c) implies D(a, b; c) = D(1, bz; c).

Alternative forms

If b and c are coprime, we may write s(b, c) as

s ( b , c ) = 1 c ω 1 ( 1 ω b ) ( 1 ω ) + 1 4 1 4 c , {\displaystyle s(b,c)={\frac {-1}{c}}\sum _{\omega }{\frac {1}{(1-\omega ^{b})(1-\omega )}}+{\frac {1}{4}}-{\frac {1}{4c}},}

where the sum extends over the c-th roots of unity other than 1, i.e., over all ω {\displaystyle \omega } such that ω c = 1 {\displaystyle \omega ^{c}=1} and ω 1 {\displaystyle \omega \not =1} .6

Equivalently, if b and c are coprime, then

s ( b , c ) = 1 4 c n = 1 c 1 cot ( π n c ) cot ( π n b c ) . {\displaystyle s(b,c)={\frac {1}{4c}}\sum _{n=1}^{c-1}\cot \left({\frac {\pi n}{c}}\right)\cot \left({\frac {\pi nb}{c}}\right).}

This reformulation mirrors the fact that the above cotangent function is the discrete Fourier transform of the sawtooth function.6

The reciprocity law

Dedekind1 proved that, if b and c are coprime positive integers then

s ( b , c ) + s ( c , b ) = 1 12 ( b c + 1 b c + c b ) 1 4 . {\displaystyle s(b,c)+s(c,b)={\frac {1}{12}}\left({\frac {b}{c}}+{\frac {1}{bc}}+{\frac {c}{b}}\right)-{\frac {1}{4}}.}

There exist several proofs from first principles, and Dedekind's reciprocity law is equivalent to quadratic reciprocity.7

Rewriting the reciprocity law as

12 b c ( s ( b , c ) + s ( c , b ) ) = b 2 + c 2 3 b c + 1 , {\displaystyle 12bc\left(s(b,c)+s(c,b)\right)=b^{2}+c^{2}-3bc+1,}

it follows that the number 6c s(b,c) is an integer.

If k = (3, c) then

12 b c s ( c , b ) = 0 mod k c {\displaystyle 12bc\,s(c,b)=0\mod kc}

and

12 b c s ( b , c ) = b 2 + 1 mod k c . {\displaystyle 12bc\,s(b,c)=b^{2}+1\mod kc.}

A relation that is prominent in the theory of the Dedekind eta function is the following. Let q = 3, 5, 7 or 13 and let n = 24/(q − 1). Then given integers a, b, c, d with ad − bc = 1 (thus belonging to the modular group), with c chosen so that c = kq for some integer k > 0, define

δ = s ( a , c ) a + d 12 c s ( a , k ) + a + d 12 k . {\displaystyle \delta =s(a,c)-{\frac {a+d}{12c}}-s(a,k)+{\frac {a+d}{12k}}.}

Then n δ {\displaystyle n\delta } is an even integer.

Rademacher's generalization of the reciprocity law

Hans Rademacher found the following generalization of the reciprocity law for Dedekind sums:8 If a, b, and c are pairwise coprime positive integers, then

D ( a , b ; c ) + D ( b , c ; a ) + D ( c , a ; b ) = 1 12 a 2 + b 2 + c 2 a b c 1 4 . {\displaystyle D(a,b;c)+D(b,c;a)+D(c,a;b)={\frac {1}{12}}{\frac {a^{2}+b^{2}+c^{2}}{abc}}-{\frac {1}{4}}.}

Hence, the above triple sum vanishes if and only if (a, b, c) is a Markov triple, i.e., a solution of the Markov equation

a 2 + b 2 + c 2 = 3 a b c . {\displaystyle a^{2}+b^{2}+c^{2}=3abc.}
References

References

  1. Dedekind, Richard (1953). "Erläuterungen zu den Fragmenten XXVIII". Collected Works of Bernhard Riemann. Dover Publ., New York. pp. 466–478.
  2. Hirzebruch, Friedrich; Zagier, Don (1974). The Atiyah–Singer Theorem and Elementary Number Theory. Boston, Mass.: Publish or Perish.
  3. Pommersheim, James E. (1993). "Toric varieties, lattice points and Dedekind sums". Math. Ann. 295 (1): 1–24.
  4. Garoufalidis, Stavros; Pommersheim, James E. (2001). "Values of zeta functions at negative integers, Dedekind sums and toric geometry". J. Amer. Math. Soc. 14 (1): 1–23.
  5. Knuth, Donald E. (1981). The Art of Computer Programming. Vol. 2. Reading, Mass.: Addison-Wesley Publishing Co.
  6. Beck, Matthias; Robins, Sinai (2015). "Chapter 8. Dedekind Sums". Computing the Continuous Discretely: Integer-Point Enumeration in Polyhedra. New York: Springer. ISBN 978-1-4939-2969-6.
  7. Rademacher, Hans; Grosswald, Emil (1972). Dedekind Sums. Math. Assoc. Amer. ISBN 0-88385-016-8.
  8. Rademacher, Hans (1954). "Generalization of the reciprocity formula for Dedekind sums". Duke Mathematical Journal. 21: 391–397. doi:10.1215/s0012-7094-54-02140-7. Zbl 0057.03801.
Further reading

Further reading