MathDB
2001 Spain Mathematical Olympiad, Problem 6

Source: Spain Mathematical Olympiad 2001

June 6, 2017
algebrafunctional equation

Problem Statement

Define the function f:NNf: \mathbb{N} \rightarrow \mathbb{N} which satisfies, for any s,nNs, n \in \mathbb{N}, the following conditions: f(1)=f(2s)f(1) = f(2^s) and if n<2sn < 2^s, then f(2s+n)=f(n)+1.f(2^s + n) = f(n) + 1. Calculate the maximum value of f(n)f(n) when n2001n \leq 2001 and find the smallest natural number nn such that f(n)=2001.f(n) = 2001.