Disclaimer: Not quite sure if this is the inductive proof that the exercise is going for, since that's not the crux step.
Prove by induction that $f(2^k) = 2^{2k}$ for $ n \geq 0$.
Suppose that $ f(n) \geq n^2 + 1$ for $ n \neq 2^i$, then
Find a $k, m \in \mathbb{N}$ such that $(n^2)^m < 2^k < (n^2+1)^m$.
Why must such a $k,m$ exist?
All that we need is $ \log n^2 < \frac{k}{m} \log 2 < \log (n^2 + 1) $, and clearly we can find such a fraction $ \frac{k}{m}$ to satisfy the inequality.
Hence, reach the contradiction:
$$ (n^2+1)^{2m} \leq f(n)^{2m} = f(n^{2m} ) < f(2^k) = 2^{2k} < (n^2+1)^{2m}.$$
So, $ f(n) \leq n^2$.
Note: This is essentially what you did with $9^ 4 < 2^{13} < 10^4$ to conclude that $f(3) < 10$.
- Likewise for $ f(n) \leq n^2 -1 $ we have a contradiction.
Note: This is essentially what you did with $ 8 \leq 2^3 < 9$ to conclude that $8 < f(3) $.
(Just that I'm enforcing strict inequality on both sides. Obviously inequality on one side is enough and will always happen, but I didn't want to complicate with a minor detail.)
- Hence $f(n) = n^2$.
This is much uglier, and still not very induction-y
Prove by induction that $f(2^k) = 2^{2k}$ for $ n \geq 0$.
Prove by strong induction on $n \geq 4$ that $f(n) = n^2$.
If $n=ab$ is not a prime, then we have $f(n) = f(ab) = f(a)f(b) = a^2b^2 = n^2 $.
If $ n \geq 4$ is a prime, then $ n-1, n+1$ have prime factors $<n$ so $ f(n-1) = (n-1)^2, f(n+1) = (n+1)^2$. Thus $(n-1)^2 < f(n) < (n+1)^2$.
We now consider how to bound $ f( n^{2^k} ) = f(n) ^{2^k} $ using $ f(n+1), f(n-1)$ to tighten the inequality further.
For all $k$, there is a unique integer $a_k $ such that
$$ (n+1)^ {a_k} (n-1) ^ { 2^k - a_k } < n^{2^k} < (n+1)^{a_k +1} (n-1) ^ {2^k - a_k - 1 }, $$
or that
$$ \frac{ a_k \log (n+1) + (2^k - a_k ) \log(n-1) } { 2^k } < \log n < \frac{ (a_k+1) \log (n+1) + (2^k - a_k -1 ) \log(n-1) } { 2^k }$$
Notice that the difference between the extreme ends of the inequality is $ \frac {\log(n+1) - \log(n-1) } { 2^k}$ which tends to 0, the LHS is bounded above by $\log n$, the RHS is bounded below by $ \log n$, hence both of their limits are $ \log n$.
This gives us
$$ (n+1)^{2a_k} (n-1)^{2(2^k-a_k) } < f(n)^{2^k} < (n+1)^{2(a_k+1)} (n-1)^{2(2^k-a_k-1) },$$
or that
$$ \frac{ (2a_k) \log(n+1) + 2(2^k- a_k ) \log(n-1)}{2^k} < \log f(n) < \frac{(2a_k) \log(n+1) + 2(2^k- a_k ) \log(n-1)}{2^k} $$
Since the LHS and RHS have the same limit of $ 2 \log n$, it follows that $ \log f(n) = 2 \log n \Rightarrow f(n) = n^2$.