Recursively Defined Sequence/Examples/Minimum over k of Maximum of 1 plus Function of k and 2 plus Function of n-k

Theorem
Consider the integer sequence $\sequence {\map f n}$ defined recusrively as:
 * $\map f n = \begin{cases} 0 & : n = 1 \\

\ds \min_{0 \mathop < k \mathop < n} \map \max {1 + \map f k, 2 + \map f {n - k} } & : n > 1 \end{cases}$

$\map f n$ has a closed-form expression:


 * $\map f n = m$ for $F_m < n \le F_{m + 1}$

where $F_m$ denotes the $m$th Fibonacci number.

Proof
The proof proceeds by induction.

For all $n \in \Z_{\ge 1}$, let $\map P n$ be the proposition:
 * $\map f n = m$ for $F_m < n \le F_{m + 1}$

Basis for the Induction
$\map P 1$ is the case:

Thus $\map P 1$ is seen to hold.

This is the basis for the induction.

Induction Hypothesis
Now it needs to be shown that, if $\map P r$ is true, where $r \ge 1$, then it logically follows that $\map P {r + 1}$ is true.

So this is the induction hypothesis:
 * $\map f r = m$ for $F_m < r \le F_{m + 1}$

from which it is to be shown that:
 * $\map f {r + 1} = m$ for $F_m < {r + 1} \le F_{m + 1}$

Induction Step
This is the induction step:

So $\map P r \implies \map P {r + 1}$ and the result follows by the Principle of Mathematical Induction.

Therefore:
 * $\forall n \in \Z_{\ge 1}: \map f n = m$ for $F_m < n \le F_{m + 1}$