XXXII - II - Task 4

Given are natural numbers $ k, n $. We define inductively two sequences of numbers $ (a_j) $ and $ (r_j) $ as follows:
First step: divide $ k $ by $ n $ and obtain the quotient $ a_1 $ and the remainder $ r_1 $,
j-th step: divide $ k + r_{j-1} $ by $ n $ and obtain the quotient $ a_j $ and the remainder $ r_j $. Calculate the sum $ a_1 + \ldots + a_n $.
According to the definition






Adding these equalities we get






thus






The number $ r_n $ as the remainder of the division of $ k+r_{n-1} $ by $ n $ satisfies the condition $ 0 \leq r_n < n $, but from the last equality, it follows that $ r_n $ is a number divisible by $ n $. Therefore, $ r_n = 0 $ and






thus