1. A1 (IND) Let $T$ denote the set of all ordered triples $(p, q, r)$ of nonnegative integers. Find all functions $f: T \rightarrow \mathbb{R}$ such that
$$
f(p, q, r)=\left\{\begin{array}{ll}
0 & \text { if } p q r=0 \\
1+\frac{1}{6} & (f(p+1, q-1, r)+f(p-1, q+1, r) \\
& +f(p-1, q, r+1)+f(p+1, q, r-1) \\
& +f(p, q+1, r-1)+f(p, q-1, r+1))
\end{array}\right.
$$
1. First, let us show that such a function is at most unique. Suppose that $f_{1}$ and $f_{2}$ are two such functions, and consider $g=f_{1}-f_{2}$. Then $g$ is zero on the boundary and satisfies
$$
g(p, q, r)=\frac{1}{6}[g(p+1, q-1, r)+\cdots+g(p, q-1, r+1)],
$$
i.e., $g(p, q, r)$ is equal to the average of the values of $g$ at six points $(p+$ $1, q-1, r), \ldots$ that lie in the plane $\pi$ given by $x+y+z=p+q+r$. Suppose that $(p, q, r)$ is the point at which $g$ attains its maximum in absolute value on $\pi \cap T$. The averaging property of $g$ implies that the values of $g$ at $(p+1, q-1, r)$ etc. are all equal to $g(p, q, r)$. Repeating this argument we obtain that $g$ is constant on the whole of $\pi \cap T$, and hence it equals 0 everywhere. Therefore $f_{1} \equiv f_{2}$.
It remains to guess $f$. It is natural to try $\bar{f}(p, q, r)=p q r$ first: it satisfies $\bar{f}(p, q, r)=\frac{1}{6}[\bar{f}(p+1, q-1, r)+\cdots+\bar{f}(p, q-1, r+1)]+\frac{p+q+r}{3}$. Thus we simply take
$$
f(p, q, r)=\frac{3}{p+q+r} \bar{f}(p, q, r)=\frac{3 p q r}{p+q+r}
$$
and directly check that it satisfies the required property. Hence this is the unique solution.