I'm trying to find if the following equation has positive integer solutions
$$x + (x+y) + (x+2y) + (x+3y) + \cdots + (x+(n-1)y) = z$$
where $z$ and $n$ are given. I can't progress further.
-> $xn + ((n(n-1))/2)*y = z $
-> $(2xn + (n(n-1)y)/ 2 = z $
-> $2xn +n^2y-ny = z$
-> $n(2x + ny - y) = 2z $
Please help me. I don't necessarily need the values of $x, y$. I just want to if there are any satisfying $x$ and $y$ for a particular $n$ and $z$.
From your last equation
$$x=\frac{z}{n}-\frac{(n-1)}{2}y.$$
We need a solution such that $y>0$ and
$$\frac{z}{n}>\frac{(n-1)}{2}y,$$
that is
$$0<y<\frac{2z}{n(n-1)}$$
Clearly there are infinitely many suitable $y$'s for a given $n$ and $z$.