1.1.* Let $\mathbb{N}=\{1,2,3, \ldots\}$ be the set of all natural numbers and $f: \mathbb{N} \rightarrow \mathbb{N}$ be a function. Suppose $f(1)=1, f(2 n)=f(n)$ and $f(2 n+1)=f(2 n)+1$ for all natural numbers $n$.
(i) Calculate the maximum value $M$ of $f(n)$ for $n \in \mathbb{N}$ with $1 \leq n \leq 1994$.
(ii) Find all $n \in \mathbb{N}$, with $1 \leq n \leq 1994$, such that $f(n)=M$.
1.1 It can be proved by induction that $f(n)$ is the number of ones in the binary representation of $n$.
(i) There can be at most 10 ones in the binary representation of a natural number if it is less than or equal to $1994=11111001010_{(2)}$. Hence $M=10$.
(ii) For any natural number $n$ less than or equal to $1994, f(n)=10$ if and only if $n$ is
$$
\begin{array}{l}
1023=1111111111_{(2)} \\
1535=10111111111_{(2)} \\
1791=11011111111_{(2)} \\
1919=11101111111_{(2)} \\
1983=11110111111_{(2)}
\end{array}
$$