3
$\begingroup$

I want to write a code which boils down to equation $(x y) = (x + y) N$.

My task is to find all the possible integer (natural number) solutions for $x$ and $y$. For example, say $N=6$. As $x$ and $y$ are natural numbers, $x+y$ is also a natural number, starting from $1,2,\ldots$ That is, the product $xy$ should meet the multiples of $6$.

Is there any easy way to find all the combinations of $x$ and $y$?

  • 0
    Since you mentioned *programming*, is there an upper bound on $x, y$? i.e. a limit on how large $x$ and $y$ could be?2012-07-14
  • 0
    @ J.D. No sir no upper bounds2012-07-14
  • 0
    @ J.D. but they are natural numbers2012-07-14

1 Answers 1