Function
PUMaC
2014
For nonnegative integer $n$, the following are true:
$f(0) = 0$
$f(1) = 1$
$f(n) = f(n-\frac{m(m-1)}{2})-f(\frac{m(m+1)}{2} -n)$ for integer $m$ satisfying $m \ge 2$ and $\frac{m(m-1)}{2} < n \le \frac{m(m+1)}{2}$.
Find the smallest $n$ such that $f(n) = 4$.