2. Given a positive integer $n$, define $f(0, j)=f(i, 0)=0, f(1,1)=n$ and

$$
f(i, j)=\left\lfloor\frac{f(i-1, j)}{2}\right\rfloor+\left\lfloor\frac{f(i, j-1)}{2}\right\rfloor
$$

for all positive integers $i$ i $j,(i, j) \neq(1,1)$. How many ordered pairs of positive integers $(i, j)$ are there for which $f(i, j)$ is an odd number?

(Dušan Djukić)
2. The answer is $n$.

Denote $s_{m}=\sum_{i+j=m} f(i, j)$ for $m \geqslant 2$. Since $f(i, j)-2\left[\frac{f(i, j)}{2}\right]$ equals 1 if $f(i, j)$ is odd and 0 otherwise, the number of odd terms among $f(i, j)$ for $i, j \geqslant 0$ with $i+j=m$ is

$$
\begin{aligned}
\sum_{i+j=m}\left(f(i, j)-2\left[\frac{f(i, j)}{2}\right]\right) & =s_{m}-\sum_{i+j=m}\left(\left[\frac{f(i-1, j+1)}{2}\right]+\left[\frac{f(i, j)}{2}\right]\right) \\
& =s_{m}-s_{m+1}
\end{aligned}
$$

It follows that the number of pairs $(i, j)$ for which $f(i, j)$ is odd and $i+j0$ and consider the smallest $i$ for which $f(i, m-i)>0$. A simple induction yields $f(i, m+r-i)=\left[\frac{f(i, m-i)}{2^{r}}\right]$ for $r \geqslant 1$. However, if $r$ is taken so that $2^{r} \leqslant f(i, m-i)<2^{r+1}$, this would imply $f(i, m+r-i)=1$, contrary to the assumption.

Second solution (U. Dinić). Consider the following game. Initially, there are $n$ markers at point $(1,1)$ in the coordinate plane. A step consists of simultaneously
performing the following moves for all $i, j$ : If there are $m$ markers at point $(i, j)$, move exactly $[\mathrm{m} / 2]$ of these markers to each of the points $(i+1, j)$ and $(i, j+1)$, thus leaving one marker at $(i, j)$ if $m$ is odd, and no markers if $m$ is even. Observe that a row or column that is nonempty at some moment can never be emptied. Thus no marker can leave the square $[1, n] \times[1, n]$, which means that the game will end in a finite time.

It is easy to see that after $i+j-2$ steps the number of markers at point $(i, j)$ equals $f(i, j)$, and that in the final position there is a marker at $(i, j)$ if and only if $f(i, j)$ is odd.