Find ∑16N-1 min({r/3N}, {r/3N}), where {α} = min (α - [α], [α] + 1 - α), the distance to the nearest integer.
Solution
Answer: N.
Trivial.
Notice first that {(6N-r)/3N} = {r/3N} and {(6N-r)/6N} = {r/6N}. Also {3N/3N} = 0, so the sum is twice the sum from 1 to 3N-1. Next notice that the second term is lower for r ≤ 2N and in fact evaluates to r/6N. The first term is lower for the remaining r and evaluates to (3N-r)/N. So the answer is:
2/6N (1 + 2 + ... + 2N) + 2/3N (N-1 + N-2 + ... + 1) = (2N+1)/3 + (N-1)/3 = N.
© John Scholes
jscholes@kalva.demon.co.uk
12 Dec 1998