Problem

Source:

Tags: floor function



Show that for all positive integers $m$ and $n$, \[\gcd(m, n) = m+n-mn+2\sum^{m-1}_{k=0}\left \lfloor \frac{kn}{m}\right \rfloor.\]