Problem

Source: 2017 Azerbaijan Junior National Olympiad

Tags: combinatorics, number theory, Sequence



For all $n>1$ let $f(n)$ be the sum of the smallest factor of $n$ that is not 1 and $n$ . The computer prints $f(2),f(3),f(4),...$ with order:$4,6,6,...$ ( Because $f(2)=2+2=4,f(3)=3+3=6,f(4)=4+2=6$ etc.). In this infinite sequence, how many times will be $ 2015$ and $ 2016$ written? (Explain your answer)