Let $f(a, b) =\dfrac{1}{a+b}$ when $a+b \ne 0$ .

Suppose that $x, y, z$ are distinct integers such that $x+y +z = 2016$ and $f(f(x, y), z) = f(x, f(y, z))$ (where both sides of the equation exist and are welldefined).

Compute $y$ .

The answer is -2016.

**
This section requires Javascript.
**

You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.

Since $f(f(x, y), z) = f(x, f(y, z))$ , we have that: $\dfrac{1}{\dfrac{1}{x+y} + z}=\dfrac{1}{x +\dfrac{1}{y+z}}$ Simplifying, we have that

$x +\dfrac{1}{y+z}=\dfrac{1}{x+y} + z$

$x(y + z)(x + y) + (x + y) = (y + z) + z(x + y)(y + z)$

$x ((y + z)(x + y) + 1) = z ((x + y)(y + z) + 1)$

$(x - z) ((y + z)(x + y) + 1) = 0$

Since $x$ and $z$ are distinct, $x - z \ne 0$ so we may divide through by $x - z$ to obtain

$(y + z)(x + y) + 1 = 0$

$(y + z)(x + y) = -1$

Since $x + y + z = 2016$ , $y + z = 2016 - x$ and $x + y = 2016 - z$ so $(2016 - x)(2016 - z) = -1$

Since $x, y, z$ are integers, we have that $x = 2015$ and $z = 2017$ (or the other way around).

In either case, $y = 2016 - x - z = 2016 - 2015 - 2017 = \boxed{-2016}$ .