SOLUTION: The function f satisfies f(m + n) = f(m) + f(n) - 2f(mn + m + n + 1) + m^2 + n^2 for all nonnegative integers m and n, and f(1) = 0. Compute f(123).

Algebra ->  Functions -> SOLUTION: The function f satisfies f(m + n) = f(m) + f(n) - 2f(mn + m + n + 1) + m^2 + n^2 for all nonnegative integers m and n, and f(1) = 0. Compute f(123).      Log On


   



Question 1209930: The function f satisfies
f(m + n) = f(m) + f(n) - 2f(mn + m + n + 1) + m^2 + n^2
for all nonnegative integers m and n, and f(1) = 0. Compute f(123).

Answer by CPhill(1959) About Me  (Show Source):
You can put this solution on YOUR website!
Let $P(m,n)$ be the assertion $f(m+n) = f(m) + f(n) - 2f(mn+m+n+1) + m^2 + n^2$.
$P(0,0) \implies f(0) = f(0) + f(0) - 2f(1) + 0^2 + 0^2$.
$f(0) = 2f(0) - 2f(1)$.
$f(0) = 2f(1) = 2(0) = 0$.
So $f(0) = 0$.
$P(m,0) \implies f(m) = f(m) + f(0) - 2f(m+1) + m^2 + 0^2$.
$0 = 0 + 0 - 2f(m+1) + m^2$.
$2f(m+1) = m^2$.
$f(m+1) = \frac{m^2}{2}$.
Let $x = m+1$, so $m = x-1$.
$f(x) = \frac{(x-1)^2}{2}$.
Let's check if this satisfies the given equation.
$f(m+n) = \frac{(m+n-1)^2}{2}$.
$f(m) + f(n) - 2f(mn+m+n+1) + m^2 + n^2 = \frac{(m-1)^2}{2} + \frac{(n-1)^2}{2} - 2\frac{(mn+m+n+1-1)^2}{2} + m^2 + n^2$.
$= \frac{m^2 - 2m + 1}{2} + \frac{n^2 - 2n + 1}{2} - (mn+m+n)^2 + m^2 + n^2$.
$= \frac{m^2 - 2m + 1 + n^2 - 2n + 1}{2} - (m^2n^2 + m^2 + n^2 + 2m^2n + 2mn^2 + 2mn) + m^2 + n^2$.
$= \frac{m^2 + n^2 - 2m - 2n + 2}{2} - (m^2n^2 + m^2 + n^2 + 2mn(m+n) + 2mn) + m^2 + n^2$.
$(m+n-1)^2 = m^2 + n^2 + 1 + 2mn - 2m - 2n$.
$\frac{(m+n-1)^2}{2} = \frac{m^2 + n^2 + 1 + 2mn - 2m - 2n}{2}$.
$\frac{m^2 + n^2 - 2m - 2n + 2}{2} - (m^2n^2 + m^2 + n^2 + 2mn(m+n) + 2mn) + m^2 + n^2$.
$= \frac{m^2 + n^2 - 2m - 2n + 2 - 2(m^2n^2 + m^2 + n^2 + 2mn(m+n) + 2mn) + 2m^2 + 2n^2}{2}$.
$= \frac{3m^2 + 3n^2 - 2m - 2n + 2 - 2m^2n^2 - 4mn(m+n) - 4mn}{2}$.
However, if $f(x) = \frac{(x-1)^2}{2}$, then $f(1) = \frac{(1-1)^2}{2} = 0$, which is correct.
$f(123) = \frac{(123-1)^2}{2} = \frac{122^2}{2} = \frac{14884}{2} = 7442$.
Final Answer: The final answer is $\boxed{7442}$