Skip to content

DedekindSum ​

The Dedekind sum s(h,k)=∑j=1k−1((j/k)) ((hj/k))s(h,k) = \sum_{j=1}^{k-1}((j/k))\,((hj/k)), returned as an exact rational rather than a float.

FungrimDedekindSumFungrim entry921ef0
DedekindSum(h, k)s(h,k)s(h,k), exact
Typed signatures
TypePackageApplies
(integer, integer) -> numbermodularalways

Domain: The modular group

Examples

Basic #

s(1,5)=(5−1)(5−2)12⋅5s(1,5) = \frac{(5-1)(5-2)}{12\cdot 5}, exact

live ↗
InDedekindSum(1,5)\mathrm{DedekindSum}(1, 5)Out15\frac{1}{5}

A rational, not a float

live ↗
InDedekindSum(2,7)\mathrm{DedekindSum}(2, 7)Out114\frac{1}{14}
About
Examples2
CrosswalkFungrimFungrim entry

See also: RademacherSymbol