I know that the following holds true: $$\sum_{k=1}^n k = {n (n + 1) \over 2} $$
Can modulus expressions be simplified in similar ways? For example:
$$\sum_{k=1}^n (k\bmod x) = ?? $$
To be clear, when I say modulus I mean "the non-negative integer that occurs as the remainder when dividing b by a", where b and a for my purposes are two integers, and x is some integer $x \leq k$.
I don't think people are understanding the question correctly, so please comment if this is what you were looking for:
$$\bigg[(1+\cdots +(x-1)+0)+(1+\cdots +(x-1)+0)+\cdots \bigg]+(1+\cdots+ (n\bmod x)) \\ =\left\lfloor \frac{n}{x}\right\rfloor\big(1+\cdots+(x-1)\big)+(1+\cdots +(n\bmod x)) \\ =\left\lfloor \frac{n}{x}\right\rfloor\frac{x(x-1)}{2}+\frac{(n\bmod x)(n\bmod x+1)}{2}$$
Example. Let's consider the case of $n=7$ and $x=3$: $$\begin{align}\sum_{k=1}^{7}(k\bmod 3)&=(1\bmod 3)+(2\bmod 3)+(3\bmod 3)+(4\bmod 3)+\cdots \\ &=\Big[(1+2+0)+(1+2+0)\Big]+(1) \\ &=2\cdot (1+2)+(1) \\ &=\left\lfloor \frac{7}{3}\right\rfloor(1+2)+(1)\end{align}$$