0

I came up with the following modular identity which looks a bit weird but can be checked numerically for (almost) arbitrary choices of $n$ and $N > n$ when $N = k\,n + r$ with $r < n$. We have $k = \lfloor N/n \rfloor$ and $r = N\%n$.

My claim is that for $n < 2\,r$ it holds that

$$(n-r)\cdot\Big( \lfloor r/(n-r) \rfloor \cdot\big( k + 1\big) + k\Big) + \big(r\%(n-r)\big)\cdot\big( k + 1 \big) = N$$

How do I prove this? Is it trivial or only elementary?

1 Answers1

1

Let $r=t(n-r)+s,s<n-r.$ Then the LHS of your expression is

$(n-r)(t(k+1)+k)+s(k+1)$

$=((n-r)t+s)(k+1)+k(n-r)$

$=r(k+1)+k(n-r)=kn+r=N.$