Let $k > 1$ be a positive, square-free integer. Consider the quadratic form $f\_k(x,y) = x^2 - ky^2$. When $k$ is composite, is it easy to determine for which proper divisors $k^\prime$ of $k$ does the equation


$$\displaystyle f\_k(x,y) = k^\prime$$


solvable in integers $x,y$? Here we do allow $k^\prime$ to be possibly negative. 



Representation of integers by principal binary quadratic forms
There are precisely two such proper divisors of $k$, and their product equals $-k$. This result is essentially due to Gauss, see Theorem 1 in Pall: Discriminantal divisors of binary quadratic forms, J. Number Theory 1 (1969), 525-533. Determining this pair of divisors is the subject of the quoted article in very special cases, so I don't think it is an easy task.


