MathDB
Parity of a sum of numerators

Source: All Russian Olympiad 2015 11.2

December 11, 2015
number theory

Problem Statement

Let n>1n > 1 be a natural number. We write out the fractions 1n\frac{1}{n}, 2n\frac{2}{n}, \dots , n1n\dfrac{n-1}{n} such that they are all in their simplest form. Let the sum of the numerators be f(n)f(n). For what n>1n>1 is one of f(n)f(n) and f(2015n)f(2015n) odd, but the other is even?