= Floor sum
= Sum of floors
{synonym}
A floor sum adds values of a <floor function>, often in the form $F(n,a,b,m)=\sum_{i=0}^{n-1}\lfloor(ai+b)/m\rfloor$ for <integers> $n\ge0$, $m>0$, $a$, and $b$. If $a,b\ge0$, it counts <lattice points> $(i,j)$ with $0\le i<n$ and $1\le j\le(ai+b)/m$. Splitting $a$ and $b$ into quotients and remainders isolates an <arithmetic progression> and a constant contribution; swapping the remaining counting axes leads to an <Euclidean algorithm> reduction.
Back to article page