Arnaldo and Bernaldo play a game where they alternate saying natural numbers, and the winner is the one who says $0$. In each turn except the first the possible moves are determined from the previous number $n$ in the following way: write
\[n =\sum_{m\in O_n}2^m;\]
the valid numbers are the elements $m$ of $O_n$. That way, for example, after Arnaldo says $42= 2^5 + 2^3 + 2^1$, Bernaldo must respond with $5$, $3$ or $1$.

We define the sets $A,B\subset \mathbb{N}$ in the following way. We have $n\in A$ iff Arnaldo, saying $n$ in his first turn, has a winning strategy; analogously, we have $n\in B$ iff Bernaldo has a winning strategy if Arnaldo says $n$ during his first turn. This way,
\[A =\{0, 2, 8, 10,\cdots\}, B = \{1, 3, 4, 5, 6, 7, 9,\cdots\}\]
Define $f:\mathbb{N}\to \mathbb{N}$ by $f(n)=|A\cap \{0,1,\cdots,n-1\}|$. For example, $f(8) = 2$ and $f(11)=4$.
Find 
\[\lim_{n\to\infty}\frac{f(n)\log(n)^{2005}}{n}\]
1. **Step 1:** We prove that all odd natural numbers are in \( B \).

   Note that \( n \) is odd if and only if \( 0 \in O_n \). Hence if Arnaldo says \( n \) in his first turn, Bernaldo can immediately win by saying \( 0 \). Therefore, all odd numbers are in \( B \).

2. **Step 2:** We prove the inequality \( f(n) > \frac{1}{2}\sqrt{n} \) for all positive integers \( n \).

   Set \( n = 2^k + m \), where \( k \) is nonnegative and \( 0 \leq m < 2^k \). Consider all nonnegative integers \( s < 2^k \) such that all numbers in \( O_s \) are odd. If Arnaldo says \( s \) in his first turn, Bernaldo will then say an odd number, and hence Arnaldo wins in his second turn. Thus every such \( s \) is in \( A \). That is, if \( s = 2^{a_1} + \cdots + 2^{a_t} \) where \( a_1, \ldots, a_t \) are distinct odd numbers, then \( s \in A \). If all the \( a_i \)'s are less than \( k \), then \( s < 2^k \leq n \); there are \( \left\lfloor \frac{k}{2} \right\rfloor \) odd nonnegative integers smaller than \( k \), and hence there are \( 2^{\left\lfloor \frac{k}{2} \right\rfloor} \) possible \( s \)'s. Thus,
   \[
   f(n) \geq 2^{\left\lfloor \frac{k}{2} \right\rfloor} \geq 2^{\frac{k-1}{2}} = 2^{\frac{k+1}{2}-1} > \frac{1}{2}\sqrt{n},
   \]
   as desired.

3. **Step 3:** We prove that \( f(2^k) = 2^{k-f(k)} \) for every nonnegative integer \( k \).

   The numbers \( s \) in \( |A \cap \{0, 1, \ldots, 2^k-1\}| \) are precisely those of the form \( 2^{a_1} + \cdots + 2^{a_t} \) where \( a_1, \ldots, a_t \) are distinct nonnegative integers less than \( k \) and not in \( A \). In fact, if some number in \( O_s \) is in \( A \), then Bernaldo can win by saying that number in his first turn; conversely, if no such number is in \( A \), then Bernaldo loses whichever number he chooses. Since \( |\{0, 1, \ldots, k-1\} \setminus A| = k - f(k) \), there are \( 2^{k-f(k)} \) such numbers \( s \), and the claim follows.

4. **Final Step:** We are now ready to finish off the problem. Let \( n \in \mathbb{N} \). Set again \( n = 2^k + m \), where \( 0 \leq m < 2^k \). Then
   \[
   \frac{f(n) \log(n)^{2005}}{n} \leq \frac{f(2^{k+1}) \log(2^{k+1})^{2005}}{2^k} = \frac{2^{k+1-f(k+1)} ((k+1) \log(2))^{2005}}{2^k} < \frac{2 ((k+1) \log(2))^{2005}}{2^{\frac{1}{2}\sqrt{k+1}}},
   \]
   and since the last expression goes to \( 0 \) as \( n \rightarrow \infty \), so does the first one. Hence,
   \[
   \lim_{n \to \infty} \frac{f(n) \log(n)^{2005}}{n} = 0,
   \]
   as desired.

The final answer is \( \boxed{ 0 } \).