prove that $\frac{a_n}{n}\rightarrow 1$: strange contest problem

Solution 1:

This is problem 4 from the 2015 Miklós Schweitzer contest. There is an AoPS thread discussing this problem, see here. A couple of solutions is given there.