Transylvanian Hungarian MC (Romania) 2012 - G9 - P1

Find all numbers $x,y\in\mathbb N$ for which the relation $x+2y+\frac{3x}{y}=2012$ holds.

Proposed by Bela Kovacs Solution Solve for $x$. $x=-2y+2018-\frac{6054}{y+3}$ Determine all value(s) of $y\in\mathbb{N}$ $(y+3)|6054$ where the positive factors of $6054$ are $1, 2, 3, 6, 2018, 3027$ and $6054$. Equate each factor to $y+3$ and the values of $y$ are $-1, 0, 3, 1006, 2015, 3024$ and $6051$, respectively. Find the value of $x$ when $y= 3$ then $x= 1003$ $y=1006$ then $x=0$ $y= 2015$ then $x=-2015$ $y= 3024$ then $x=-4032$ $y= 6051$ then $x=-10085$

Answer: $x=1003$ and $y=3$