Skip to main content
OlympiadHQ

Browse · MathNet

Print

XXII OBM

Brazil number theory

Problem

Let be a function defined as follows: given , we write , with and non-negative integers, and define .

Determine the least positive integer such that .
Solution
Let . Then If is the binary expansion of , it is easy to see that . Also, by induction, , so that in order to obtain the least satisfying , we have to choose that is, .
Final answer
24710

Techniques

Factorization techniquesRecurrence relationsSums and products