Dedekind Sum

Author

Eric W. Weisstein
February 17, 2008

This notebook downloaded from http://mathworld.wolfram.com/notebooks/NumberTheory/DedekindSum.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/DedekindSum.html.

©2008 Wolfram Research, Inc. except for portions noted otherwise

Definition

DedekindSum[p_,q_]:=Sum[Cot[Pi r p/q]Cot[Pi r/q],{r,q-1}]/(4q)

s(1,q)==(((q-1) (q-2))/(12 q))

DedekindSum[1,q]

Table[DedekindSum[1,q],{q,10}]//FullSimplify

Table[(((q-1)(q-2))/(12q)),{q,10}]

s(2,q)==(((q-1) (q-5))/(24 q))for q odd

DedekindSum[2,q]

Table[DedekindSum[2,q],{q,1,20,2}]//FullSimplify

Table[(((q-1)(q-5))/(24q)),{q,1,20,2}]