1. ## Help Find f(2007)

Ehiter $\displaystyle f$ : $\displaystyle \mathbb{N} \longrightarrow \mathbb{N}$ , Such That :

$\displaystyle f(n+1) > f(n)$ And $\displaystyle f(f(n))=3n$.

Find $\displaystyle f(2007)$ .

2. Originally Posted by Oricalcos

Ehiter $\displaystyle f$ : $\displaystyle \mathbb{N} \longrightarrow \mathbb{N}$ , Such That :

$\displaystyle f(n+1) > f(n)$ And $\displaystyle f(f(n))=3n$.

Find $\displaystyle f(2007)$ .
I don't understand what the inequality has to do with the problem. If $\displaystyle f(f(n))=3n$, let $\displaystyle n=2007$ so that $\displaystyle f(f(2007))=3(2007)$. I could be wrong, but this makes sense to me.

3. Originally Posted by VonNemo19
I don't understand what the inequality has to do with the problem. If $\displaystyle f(f(n))=3n$, let $\displaystyle n=2007$ so that $\displaystyle f(f(2007))=3(2007)$. I could be wrong, but this makes sense to me.
Read more precisely the question... It's $\displaystyle f(2007)$, not $\displaystyle f(f(2007))$ that we're looking for.

4. Originally Posted by VonNemo19
I don't understand what the inequality has to do with the problem. If $\displaystyle f(f(n))=3n$, let $\displaystyle n=2007$ so that $\displaystyle f(f(2007))=3(2007)$. I could be wrong, but this makes sense to me.
Originally Posted by Moo
Read more precisely the question... It's $\displaystyle f(2007)$, not $\displaystyle f(f(2007))$ that we're looking for.
Von Nemo wasn't the only one who misread the question. I assumed that the answer must be $\displaystyle f(n) = \sqrt3\,n$. But of course that doesn't map $\displaystyle \mathbb{N}$ to $\displaystyle \mathbb{N}$.

The answer is actually a good deal more subtle than that. Start by thinking about f(n) when n is small. We know that f(f(1)) = 3, and that f is an increasing function. That means that f(1) must be 2 (since that is the only available number greater than 1 and less than 3). Then f(2) = f(f(1)) = 3. Next, f(f(2)) = 6, in other words f(3) = 6, and therefore f(6) = f(f(3)) = 9. But f(4) and f(5) must be sandwiched between f(3) and f(6), which implies that f(4) = 7 and f(5) = 8.

Continuing in that way, you see that f(n) is uniquely determined for each n, and that f(n) seems to increase in steps of either 1 or 3. That suggests that it might be helpful to express n in base 3.

Spoiler:
Let $\displaystyle n = (a_1a_2\ldots a_k)_3$ be the ternary expansion of n. Define f(n) as follows. If $\displaystyle a_1=1$ then $\displaystyle f(n) = (2a_2\ldots a_k)_3$. If $\displaystyle a_1=2$ then $\displaystyle f(n) = (1a_2\ldots a_k0)_3$.

$\displaystyle 2007 = 2202100_3$, and so $\displaystyle f(2007) = 12021000_3$, which is 3834 in decimal notation.