\documentclass[11pt]{scrartcl}
\usepackage{evan}

\begin{document}
\title{Shortlist 1998 N1}
\subtitle{Evan Chen}
\author{Twitch Solves ISL}
\date{Episode 68}
\maketitle

\section*{Problem}
Determine all pairs $(x,y)$ of positive integers
such that $x^{2}y+x+y$ is divisible by $xy^{2}+y+7$.

\section*{Video}
\href{https://www.youtube.com/watch?v=iswj_GVcbo8&list=PLi6h8GM1FA6yHh4gDk_ZYezmncU1EJUmZ}{\texttt{https://youtu.be/iswj\_GVcbo8}}

\section*{External Link}
\url{https://aops.com/community/p124428}

\newpage

\section*{Solution}
The relation implies
\begin{align*}
  xy^2+y+7 &\mid x^2y+x+y \\
  xy^2+y+7 &\mid x^2y^2+xy+y^2 \\
  xy^2+y+7 &\mid y^2-7x.
\end{align*}
As $-7(xy^2+y+7) < y^2-7x < xy^2+y+7$,
we should be all set.
Indeed, we have an integer $k$ such that:
\[ y^2-7x + k(xy^2+y+7) = 0
  \iff x = \frac{y^2+k(y+7)}{7 - k \cdot y^2}.  \]
The denominator is promised to be positive,
so $k \le 6$.
Checking all the cases:
\begin{itemize}
  \ii $(x,y) = (7n^2, 7n)$ for $k=0$, for any $n$
  (this is just $y^2/7=x$)
  \ii $(x,y) = (3/2, 1)$ for $k=1$, no good
  \ii $(x,y) = (13/3, 2)$ for $k=1$, no good
  \ii $(x,y) = (19/3, 1)$ for $k=2$, no good
  \ii $(x,y) = (25/4, 1)$ for $k=3$, no good
  \ii $(x,y) = (11, 1)$ for $k=4$
  \ii $(x,y) = (41/2, 1)$ for $k=5$, no good
  \ii $(x,y) = (49, 1)$ for $k=6$.
\end{itemize}
Hence the answer $(7n^2, 7n)$, $(11,1)$ and $(49,1)$,
easily seen to work.

\end{document}
