Skip to content / Đến nội dung
ThichHocToan.com

MathNet 2002 — Part 01 Question 104

Math Olympiad Vault · MathNet 2002 — Part 01

Question 104

The function $g$ is defined on the natural numbers and satisfies the conditions
$$
\begin{aligned}
g(2) & =1 \\
g(2 n) & =g(n) \\
g(2 n+1) & =g(2 n)+1
\end{aligned}
$$
Let $n$ be a natural number such that $1 \leq n \leq 2002$. Calculates the maximum value $M$ of $g(n)$. Also calculate how many values ​​of $n$ satisfy the condition $g(n)=M$.