# Thread: Help Find f(2007)

1. ## Help Find f(2007)

I need Your Help !

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

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

Find $f(2007)$ .

2. Originally Posted by Oricalcos
I need Your Help !

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

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

Find $f(2007)$ .
I don't understand what the inequality has to do with the problem. If $f(f(n))=3n$, let $n=2007$ so that $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 $f(f(n))=3n$, let $n=2007$ so that $f(f(2007))=3(2007)$. I could be wrong, but this makes sense to me.
Read more precisely the question... It's $f(2007)$, not $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 $f(f(n))=3n$, let $n=2007$ so that $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 $f(2007)$, not $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 $f(n) = \sqrt3\,n$. But of course that doesn't map $\mathbb{N}$ to $\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 $n = (a_1a_2\ldots a_k)_3$ be the ternary expansion of n. Define f(n) as follows. If $a_1=1$ then $f(n) = (2a_2\ldots a_k)_3$. If $a_1=2$ then $f(n) = (1a_2\ldots a_k0)_3$.

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