Bangladesh Mathematical Olympiad National Round Solution
Blog 02
[Problem 03, Higher Secondary 2023]:
For any positive integer \(n\), \(f(n)\) to be the smallest positive integer that does not divide \(n\). For example, \(f(1) = 2, f(6) = 4\). Prove that for any positive integer \(n\), either \(f(f(n))\) or \(f(f(f(n)))\) must be equal to \(2\).
Solution:
$$ n = \begin{cases} 2k - 1 & \\ 2k & \end{cases} ; k \in \mathbb{N} $$ If \(n = 2k - 1\),
\begin{align*} f(f(f(2k - 1))) &= f(f(2)) \\ &= f(3) \\ &= 2 \end{align*}
If \(n = 2k \), then according to Fundamental Theorem of Arithmetic [1]:
$$ 2k = \prod_{i=1}^{m} {P_i}^{a_i} $$
\begin{align*} f(f(2k)) &= f(f(\prod_{i=1}^{m} {P_i}^{a_i})); \hspace{1cm} {a_i} \in z^+ \\ &= f(min(\min_{i = 1}^{m} {P_i}^{a_i + 1}, {P_{m+1}}^1)) \\ &= f(P^{a})\\ &= 2 \end{align*}