Putnam 1997, Problem B-1

Let $\{x\}$ denote the distance between the real number $x$ and the nearest integer. For each positive integer $n$, evaluate
$$F_n = \sum_{m=1}^{6n-1} \min\left( \left\{ \frac{m}{6n} \right\}, \left\{ \frac{m}{3n} \right\} \right).$$
(Here $\min(a,b)$ denotes the minimum of $a$ and $b$.)

Solution:
It is trivial to check that \( \frac{m}{6n} = \left\{ \frac{m}{6n} \right\} \leq \left\{ \frac{m}{3n} \right\} \) for \( 1 \leq m \leq 2n \), that \( 1 - \frac{m}{3n} = \left\{ \frac{m}{3n} \right\} \leq \left\{ \frac{m}{6n} \right\} \) for \( 2n \leq m \leq 3n \), that \( \frac{m}{3n} - 1 = \left\{ \frac{m}{3n} \right\} \leq \left\{ \frac{m}{6n} \right\} \) for \( 3n \leq m \leq 4n \), and that \( 1 - \frac{m}{6n} = \left\{ \frac{m}{6n} \right\} \leq \left\{ \frac{m}{3n} \right\} \) for \( 4n \leq m \leq 6n \). Therefore the desired sum is  
\[
\sum_{m=1}^{2n-1} \frac{m}{6n} + \sum_{m=2n}^{3n-1} \left( 1 - \frac{m}{3n} \right) + \sum_{m=3n}^{4n-1} \left( \frac{m}{3n} - 1 \right) + \sum_{m=4n}^{6n-1} \left( 1 - \frac{m}{6n} \right) = n.
\]