Problem

Source: Canada RepĂȘchage 2017/6

Tags: number theory



Let $N$ be a positive integer. There are $N$ tasks, numbered $1, 2, 3, \ldots, N$, to be completed. Each task takes one minute to complete and the tasks must be completed subjected to the following conditions: Any number of tasks can be performed at the same time. For any positive integer $k$, task $k$ begins immediately after all tasks whose numbers are divisors of $k$, not including $k$ itself, are completed. Task 1 is the first task to begin, and it begins by itself. Suppose $N = 2017$. How many minutes does it take for all of the tasks to complete? Which tasks are the last ones to complete?