Given a number $n > 0$, what is the minimal number of operations to reduce this number to $0$ ?
We can use these operations:
- $+1$
- $-1$
- $/2$ (when number is divisible by $2$)
- $/3$ (when number is divisible by $3$)
It would be awesome if you would also provide a proof.
If the answer is $f(n)$, then $f(n)=1+\min(f(n-1),f(n+1),f(n/2),f(n/3))$.
Try using induction and see if you can find a pattern. For example the first few are $f(0)=0,f(1)=1,f(2)=2,f(3)=2$.
It might be hard to find a nice general solution though because I think this problem has connections to Catalan's conjecture and ABC conjecture.