Let $k$ and $n$ be positive integers and $y(n-x)=(k+nx)$.
What is the condition of $k$ and $n$ such that there exist positive integers $x, y$ as the solution of $y(n-x)=(k+nx)$?
Let $k$ and $n$ be positive integers and $y(n-x)=(k+nx)$.
What is the condition of $k$ and $n$ such that there exist positive integers $x, y$ as the solution of $y(n-x)=(k+nx)$?
On
I think you can make it easier. Equation:
$$y(q-x)=k+qx$$
Can be rewritten in this form. And lay on the multipliers.
$$(x-q)(y+q)=-k-q^2=ab$$
Then the solutions are.
$$x=q+a$$
$$y=b-q$$
On
Given $n \gt 1$ and $k \gt 0,$ the equation $$y(n-x)=k+nx\tag{*}$$ always has the boring positive solution $x=n-1$ and $y=k+n(n-1).$
This is the case $e=1$ of the condition for a solution:
$$n^2+k \text{ has a divisor } 0 \lt e \lt n. $$
The solutions to (*) are the pairs $(x,y)=(n-e,\frac{n^2+k}{e}-n)$ as $e$ ranges over these divisors.
To prove this claim, follow the analysis of @mathlove:
A positive solution $x,y \gt 0$ to $y(n-x)=k+nx$ requires $n \gt x \gt 0.$ Any such $x$ will give a positive $y$, although it may not be an integer. To find the condition for $y$ to be an integer, let $e=n-x$ so that $$y=\frac{nx+k}{n-x}=\frac{n^2+k}{n-x}-n=\frac{n^2+k}{e}-n.$$
Note that $y \gt 0$ as long as $0 \lt e \lt n+\frac{k}{n},$ but $x=n-e \gt 0$ gives the stronger restriction $0 \lt e \lt n.$
Since $$y(n-x)=k+nx\iff y=\frac{k+nx}{n-x}=-n-\frac{n^2+k}{x-n}\ \text{and}\ x-n\not=0,$$ $x-n$ has to be a divisor $d$ of $n^2+k$.
Then, $$x=n+d,\ \ y=-n-\frac{n^2+k}{d}$$ are integers.
Hence, the answer is the following :
Condition of $k,n$ : There exists a divisor $d$ of $n^2+k$ such that $$n+d\gt 0\ \ \text{and}\ \ -n-\frac{n^2+k}{d}\gt 0.$$
By the way, if $d\gt 0$, then $-n-\frac{n^2+k}{d}\lt 0$, which is a contradiction. So, we have $d\lt 0$.
Hence, the above condition can be written as the following.
Condition of $k,n$ : There exists a negative divisor $d$ of $n^2+k$ such that $$d\gt -n.$$