# A Counting Parametric Problem

Algebra Level 4

Define the function $f(n) : \mathbb{N} \rightarrow \mathbb{N}$ as follows:

$f(n) = \begin{cases} n^2 + 1 & \text { if } n \text{ is odd }, \\ \frac{ n } { 2} & \text{ if } n \text { is even } . \\ \end{cases}$

For how many integral $n \in [1, 100]$ does $f(f(...f(n)))=1$ for some number of applications of $f$?

This problem is taken from this year's MATHCOUNTS State Competition. I enjoyed solving it, so I'm sharing it with you! Enjoy solving it, and post a creative solution!

×