$k*x^2+y^2=z^2$; Elementary question Sorry for the inconvenience, I have a very elementary question.
In the equation $kx^2+y^2=z^2$,what are the conditions for $k$, where $k,x,y,z$ are integers and not primes and $k$ is not a perfect square.(At least I know if $k$ is a perfect square, the equation is Diophantine).
Thanks in Advance
 A: For any integer $k$, there are infinitely many solutions of the form, for all integers $a$, 
$$x = \left|2a\right| \tag{1}\label{eq1A}$$
$$y = \left|a^2 - k\right| \tag{2}\label{eq2A}$$
$$z = \left|a^2 + k\right| \tag{3}\label{eq3A}$$
This is because, for all real $b$ you have $\left|b\right|^2 = b^2$ (I'm using absolute values to more easily handle dealing with primes), so you also have
$$\begin{equation}\begin{aligned}
kx^2 + y^2 & = k(2a)^2 + (a^2 - k)^2 \\
& = 4ka^2 + a^4 - 2ka^2 + k^2 \\
& = a^4 + 2ka^2 + k^2 \\
& = (a^2 + k)^2 \\
& = z^2
\end{aligned}\end{equation}\tag{4}\label{eq4A}$$
For all $\left|a\right| \gt 1$, you have $x$ not being a prime. Also, for any integer $k$, there are an infinite number of $a$ for which both $y$ and $z$ are not prime either, e.g., where $a$ and $k$ have the same parity so $2$ divides both $y$ and $z$.
A: Assuming $(x,y,z,k) \in \mathbb Z$,
$z^2 \equiv 0 $ or $1\pmod 4$ 
and since  $y^2 \equiv 0 $ or $1 \pmod  4$
$kx^2 \not\equiv 2 $$ \pmod 4$
Now, as $x^2 \equiv 0 $ or $1 \pmod 4$, 
$k \not\equiv 2 \pmod 4$.
And that was just one condition. You can do $n^2 \equiv i,j,k,... \pmod l $ and get the conditions for $k$ in different modulo $l$.
