How do I solve this function equation? 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 integers $i, j ≥ 0, (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?
 A: Let's call the answer $A$. This is the number of odd values of $f(i,j)$. Clearly
$$
A = \sum_{i,j=1}^{\infty} \Bigl(f(i,j) \;\mathrm{mod}\; 2\Bigr)\, .
$$
(Note that the values of $f(i,j)$ with $i=0$ or $j=0$ don't matter, because they're all 0.) Furthermore, define the sum over all values of $f(i,j)$ as
$$
S \equiv \sum_{i,j=1}^{\infty} f(i,j)\, .
$$
Now, for any integer $m$, we have
$$
m \;\mathrm{mod}\; 2 = m - 2\left\lfloor \frac{m}{2} \right\rfloor\, ,
$$
so
\begin{align}
A
&= \sum_{i,j=1}^{\infty} \Bigl(f(i,j) \;\mathrm{mod}\; 2\Bigr)\\
&= \sum_{i,j=1}^{\infty} \left(f(i,j) - 2\left\lfloor \frac{f(i,j)}{2} \right\rfloor \right)\\
&= S \;-\; 2\sum_{i,j=1}^{\infty}\left\lfloor \frac{f(i,j)}{2} \right\rfloor \qquad\qquad (1)
\end{align}
The sum $S$ may be written as
\begin{align}
S
&= \sum_{i,j=1}^{\infty} f(i,j)\\
&= n \;+\; \sum_{i,j=1}^{\infty} \left(\left\lfloor\frac{f(i-1,j)}{2}\right\rfloor \;+\; \left\lfloor\frac{f(i,j-1)}{2}\right\rfloor\right)\\
&= n \;+\; 2\sum_{i,j=1}^{\infty} \left\lfloor\frac{f(i-1,j)}{2}\right\rfloor\\
&= n \;+\; 2\sum_{i,j=1}^{\infty} \left\lfloor\frac{f(i,j)}{2}\right\rfloor\qquad\qquad\qquad(2)
\end{align}
In arriving at the second line above, we have used the given recursion relation for $(i,j)\ne(1,1)$, as well as the facts that $f(1,1) = n$ and 
$$
\left\lfloor\frac{f(0,j)}{2}\right\rfloor \;+\; \left\lfloor\frac{f(i,0)}{2}\right\rfloor = 0\, .
$$
In arriving at the third line above, we have used the fact that by symmetry $f(i,j) = f(j,i)$, which implies that
$$
\sum_{i,j=1}^{\infty} \left\lfloor\frac{f(i-1,j)}{2}\right\rfloor \;=\; \sum_{i,j=1}^{\infty} \left\lfloor\frac{f(i,j-1)}{2}\right\rfloor\, .
$$
The fourth line then also follows from the fact that $f(0,j) = 0$.
Finally, if we combine Equations (1) and (2) to eliminate the remaining sum, we immediately arrive at $A = n$.
