$\large \frac{1}{x+1} + \frac{1}{y} + \frac{1}{(x+1)y} = \frac{1}{2018}$

How many positive integral solutions $(x,y)$ are there to the equation above?

The answer is 16.

**
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.

First, a little algebra: $\frac{1}{x+1} \left( 1 + \frac{1}{y} \right) + \frac{1}{y} = \frac{1}{2018} \iff \frac{1}{x+1} \left(\frac{y+1}{y} \right) + \frac{1}{y} = \frac{1}{2018} \iff \frac{1}{y} \left( \frac{y+1}{x+1} + 1 \right) = \frac{1}{2018} \iff \frac{1}{y} \frac{y+1 + x + 1}{x+1} = \\ \frac{1}{2018} \iff 2018(y+1 + x + 1) = y(x+1) \iff 2018(y+1) = (x+1)(y-2018) \iff x+1 = \frac{2018(y+1)}{y-2018}$

Notice that even though the new form may find solutions for problematic $x,y$ we can keep the if and only if sign as we are only considering positive (and thus non-problematic) solutions. And in the last step, dividing by $y-2018$ is justified because if we let $y=2018$ then in the previous step we would have $2018(y+1) = 0$ which has no solutions, so we may ignore that case.

We may now study the equation via divisibility theory. The left hand side is an integer, so it must be that $(y-2018) | 2018(y+1)$ which implies $(y - 2018) | 2018(y+1) - 2018(y - 2018) =2018 + 2018^2 = 2018 \times 2019$ . This number has precisely $16$ positive divisors,

1 | 2 | 3 | 6 | 673 | 1009 | 1346 | 2018 | 2019 | 3027 | 4038 | 6054 | 679057 | 1358114 | 2037171 | 407434and letting $y-2018$ be any of them yields a solution.Before closing the problem, one should ask if $y-2018$ could be a negative divisor. Let's suppose that $y-2018 = -d$ (where d is a positive divisor). Then $y = 2018-d$ and as $y$ is positive, it must be that $2018 > d$ . But also remember that $x+1 = \frac{2018(2019 - d)}{-d - 2018}$ so if $y>0$ then $x+1 < 0$ and thus $x<0$ . So these solutions need not be counted.