5. Given a function $f: \sqcup \rightarrow \sqcup$ such that $f(1)=1$, and for any $x \in \sqcup, y \in \sqcup$ the equality $f(x)+f(y)+x y+1=f(x+y)$ holds. Find all integers $n$ for which the equality $f(n)=$ param 1 holds. In the answer, write down the sum of cubes of all such values of $n$.

Function $f: \sqcup \rightarrow \sqcup$ such that $f(1)=1$ satisfies the equality $f(x)+f(y)+x y+1=f(x+y)$ for any real $x, y$. Find all integers $n$ for which $f(n)=$ param1. In the answer write down the sum of cubes of all such values of $n$.

| param1 | Answer |
| :---: | :---: |
| $2 n^{2}-10$ | 19 |
| $3 n^{2}-6 n-11$ | 63 |
| $2 n^{2}-9 n+14$ | 133 |
| $3 n^{2}+19 n+29$ | -91 |

## Condition

Given a function $f: \sqcup \rightarrow \sqcup$ such that $f(1)=1$, and for any $x \in \sqcup, y \in \sqcup$ the equality $f(x)+f(y)+x y+1=f(x+y)$ holds. Find all integers $n$ for which the equality $f(n)=2 n^{2}-10$ holds. In the answer, write down the sum of cubes of all such values of $n$.

## Answer.

19
# Solution

Substituting $y=1$ into the given functional equation, we get: $f(x)+f(1)+x+1=f(x+1)$, which means $f(k)-f(k-1)=k+1$. Therefore, $f(n)-f(1)=(f(n)-f(n-1))+(f(n-1)-f(n-2))+\ldots$ $+f(2)-f(1)=n+1+n+\ldots+2$. Hence, $f(n)=\frac{n^{2}+3 n-2}{2}$. Reasoning similarly,
we get $f(n)=\frac{n^{2}+3 n-2}{2}$ for $n \leq 0$. Therefore, we need to solve the equation $n^{2}+3 n$ $-2=2\left(2 n^{2}-10\right)$. This gives us the equation $3 n^{2}-3 n-18=0$. The roots of this equation are 3 and -2. The sum of the cubes of these numbers is 19.