Diophantine polynomial equations If K is a positive integer, what is the smallest k for which $x^2 + kx = 4y^2 -4y +1$ has a solution (x,y) where x and y are integers
= $(2y-1)^2 = x^2 +kx$
=$(2y-1+x)(2y-1-x) = kx $
I tried equating them to each other
$(2y-1+x) = k; (2y-1-x) = x$ 
$x= k-2y+1; k= (6y-3)/2$
but then k does not have a solution.

We need $$k^2+(4y-2)^2$$ to be perfect square
WLOG $k=a(p^2-q^2),2(2y-1)=a(2pq)$
$\implies apq$ is odd
The minimum positive values of $a,p^2,q^2$ will be $1,3^2,1^2$ respectively
$$x=\dfrac{a(q^2-p^2)\pm a(p^2+q^2)}2=?$$
