20.2. The function $g$, defined on the set of integers, satisfies the conditions:

1) $g(1)>1$
2) $g(x+y)+x g(y)+y g(x)=g(x) g(y)+x+y+x y$ for any $x, y \in \mathbb{Z}$;
3) $3 g(x)=g(x+1)+2 x-1$ for any $x \in \mathbb{Z}$.

Find $g(5)$.
Answer: 248.

Solution. Let $g(1)=a$, then from condition 3) we sequentially find $g(2)=3 a-1, g(3)=$ $9 a-6, g(4)=27 a-23, g(5)=81 a-76$. From condition 2), substituting $x=4$ and $y=1$, we obtain after simplifications the equation $a^{2}-5 a+4=0$, from which $a=1$ or $a=4$. The case $a=1$ contradicts condition 1). Therefore, $a=4$, then $g(5)=81 a-76=81 \cdot 4-76=248$.