Call a function $\mathbb Z_{>0}\rightarrow \mathbb Z_{>0}$ $\emph{M-rugged}$ if it is unbounded and satisfies the following two conditions: $(1)$ If $f(n)|f(m)$ and $f(n)<f(m)$ then $n|m$. $(2)$ $|f(n+1)-f(n)|\leq M$. a. Find all $1-rugged$ functions. b. Determine if the number of $2-rugged$ functions is smaller than $2019$.
Problem
Source: Israel Olympic Revenge 2019 P4, also SL N8.
Tags: functional equation, functional equation in N, algebra