# Fungrim entry: c2e919

$s\!\left(n, k\right) = \sum_{r=1}^{k - 1} Q\!\left(\frac{r}{k}\right) Q\!\left(\frac{n r}{k}\right)\; \text{ where } Q(x) = \begin{cases} x - \left\lfloor x \right\rfloor - \frac{1}{2}, & x \notin \mathbb{Z}\\0, & x \in \mathbb{Z}\\ \end{cases}$
Assumptions:$n \in \mathbb{Z} \;\mathbin{\operatorname{and}}\; k \in \mathbb{Z}$
TeX:
s\!\left(n, k\right) = \sum_{r=1}^{k - 1} Q\!\left(\frac{r}{k}\right) Q\!\left(\frac{n r}{k}\right)\; \text{ where } Q(x) = \begin{cases} x - \left\lfloor x \right\rfloor - \frac{1}{2}, & x \notin \mathbb{Z}\\0, & x \in \mathbb{Z}\\ \end{cases}

n \in \mathbb{Z} \;\mathbin{\operatorname{and}}\; k \in \mathbb{Z}
Definitions:
Fungrim symbol Notation Short description
DedekindSum$s\!\left(n, k\right)$ Dedekind sum
Sum$\sum_{n} f(n)$ Sum
ZZ$\mathbb{Z}$ Integers
Source code for this entry:
Entry(ID("c2e919"),
Formula(Equal(DedekindSum(n, k), Where(Sum(Mul(Q(Div(r, k)), Q(Div(Mul(n, r), k))), For(r, 1, Sub(k, 1))), Def(Q(x), Cases(Tuple(Sub(Sub(x, Floor(x)), Div(1, 2)), NotElement(x, ZZ)), Tuple(0, Element(x, ZZ))))))),
Variables(n, k),
Assumptions(And(Element(n, ZZ), Element(k, ZZ))))

## Topics using this entry

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2021-03-15 19:12:00.328586 UTC