Problem:
Given $y,x,z$ are positive integer variables and $N$ is a given integer constant and $x < z \le N $ and $y$ is square-free and $y \ne x$,
find the maximum value of $y$ (in terms of $x$ or $z$) for which $y^2xz^3 + yx^2$ is a perfect square
Clarification: Since there are some doubts in comments :
Maximum value of $z$ should be considered as given. Just like we have upper bound of $x$ given in terms of $z$, similarly we are trying to find the upper bound of $y$ in terms of $x$ or $z$. If that's too much of an ask then it suffices to find upper bound of $y$ in terms of $N$ which is essentially the maximum value of $z$.
My effort:
Using $x<z$ we can write: $y^2xz^3 + yx^2 < y^2z^4 + yz^2=z^2(y^2z^2 + y)=yz^2(yz^2 + 1)$ which is of $k(k+1)$ form. We know numbers of form $k(k+1)$ can not be perfect square. So potential candidates are $1^2,2^2,3^2,....k^2$.
$y^2xz^3 + yx^2 = 1$
$y^2xz^3 + yx^2 = 4$
$y^2xz^3 + yx^2 = 9$
. . .
$y^2xz^3 + yx^2 = (yz^2)^2$
Other thoughts I had is like we can also see is as diophantine equation problem . We are essentially solving diophantine equation $y^2xz^3 + yx^2 = t^2$ .
I have run a python program that iterates $z$ till $10^4$ to generate all tuples generating perfect squares and maximum value of $y$ was found to be 86. Here is the program
import sympy, gmpy
N = 10 ** 4
for z in range(1, N + 1):
for x in range(1, z):
for y in range(1, 1234567890):# We need a tighter upper-bound on y, from data it seems to be 86 for N=10000
if y == x:
continue
if sympy.mobius(y) == 0:
continue
val = x * y * ((z ** 3) * y + x)
if gmpy.is_square(val):
print(val, y, x, z)
There should be some mathematical way to get the upper bound of $y$ in terms of $x$ or $z$ or at the least in terms of the constant $N$.
As evident from the python script, the valid solution has $y_{max}=86$ for $N=10000$ and if we drop $x \ne y$ constraint we encounter $y_{max}=201$ for $N=10000$.
I think if we can prove $y \le x$ for any valid solution then thats a good step forward and if we can eliminate $y=x$ scenarios then the upper bound on y comes down "significantly" would be another step forward. So we can see it as the two parts problem.(both these patterns are observed in data, can't be trusted completely until proved)
I shouldn't use the word "significantly" even , $(y=33, x=363, z=454)$ or $(y=86, x=946, z=1925)$ are valid solutions where $y < x$ no doubt but not significantly. For other solutions I am observing significant difference in $y$ and $x$ values which is why I was tempted to use that word.