Problem

Source: Middle European Mathematical Olympiad 2012 - Team Compt. T-4

Tags: function, modular arithmetic, number theory, combinatorics proposed, combinatorics, permutation statistics



Let $ p>2 $ be a prime number. For any permutation $ \pi = ( \pi(1) , \pi(2) , \cdots , \pi(p) ) $ of the set $ S = \{ 1, 2, \cdots , p \} $, let $ f( \pi ) $ denote the number of multiples of $ p $ among the following $ p $ numbers: \[ \pi(1) , \pi(1) + \pi(2) , \cdots , \pi(1) + \pi(2) + \cdots + \pi(p) \] Determine the average value of $ f( \pi) $ taken over all permutations $ \pi $ of $ S $.