Olympiad Maths Prep

Track / Stage 6 / 256 of 400 #1256 of 2000

Problem 1256

National olympiad, first round
Combinatorics Difficulty 6.5 Find the answer

Let NN be the set of positive integers.
Determine if there is a function f:NNf: N\to N such that f(f(n))=2nf(f(n))=2n, for all nn belongs to NN.

This one wants a proof. Work it on paper, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

1. We need to determine if there exists a function f:NN f: \mathbb{N} \to \mathbb{N} such that f(f(n))=2n f(f(n)) = 2n for all nN n \in \mathbb{N} .

2. Let's start by analyzing the given condition f(f(n))=2n f(f(n)) = 2n . This implies that applying the function f f twice to any natural number n n results in 2n 2n .

3. To explore this further, let's consider the implications of this condition. If we apply f f to both sides of the equation f(f(n))=2n f(f(n)) = 2n , we get:
f(f(f(n)))=f(2n) f(f(f(n))) = f(2n)
Since f(f(n))=2n f(f(n)) = 2n , we can substitute 2n 2n for f(f(n)) f(f(n)) in the equation above:
f(2n)=f(f(f(n)))=2f(n) f(2n) = f(f(f(n))) = 2f(n)
This shows that f(2n)=2f(n) f(2n) = 2f(n) for all nN n \in \mathbb{N} .

4. We can use induction to generalize this result. Suppose n=2mq n = 2^m q , where m0 m \ge 0 and q q is an odd natural number. By repeatedly applying the result f(2n)=2f(n) f(2n) = 2f(n) , we get:
f(2mq)=2mf(q) f(2^m q) = 2^m f(q)
This means that if we can define f f for all odd natural numbers, then the values of f f for even natural numbers are determined.

5. Now, we need to define f f for all odd natural numbers. Let's consider the following definition:
f(2mq)={2m(4t+3)if q=4t+12m+1(4t+1)if q=4t+3 f(2^m q) = \begin{cases} 2^m (4t + 3) & \text{if } q = 4t + 1 \\ 2^{m+1} (4t + 1) & \text{if } q = 4t + 3 \end{cases}
where t t and m m are non-negative integers.

6. We need to verify that this function satisfies the condition f(f(n))=2n f(f(n)) = 2n . Let's check this for both cases:
- If q=4t+1 q = 4t + 1 , then:
f(q)=4t+3 f(q) = 4t + 3
and
f(f(q))=f(4t+3)=2(4t+1)=2q f(f(q)) = f(4t + 3) = 2(4t + 1) = 2q
- If q=4t+3 q = 4t + 3 , then:
f(q)=2(4t+1) f(q) = 2(4t + 1)
and
f(f(q))=f(2(4t+1))=2(4t+3)=2q f(f(q)) = f(2(4t + 1)) = 2(4t + 3) = 2q

7. Therefore, the function f f defined above satisfies the condition f(f(n))=2n f(f(n)) = 2n for all nN n \in \mathbb{N} .

The final answer is \( f(2^m q) = \begin{cases}

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic, difficulty and ordering added by this site.