TITLE: Diophantine Equation with Polynomial Coefficients
QUESTION [8 upvotes]: DISCLAIMER: I'm primarily a graph theorist and am fairly inept when it comes to classical number theory.
Recently I have been looking at the possibility (or impossibility) of embedding various graphs as Euclidean distance graphs in $\mathbb{Q}^3$.  Frequently, constructions I am considering lead to questions of the following form:
Given polynomials $p_1(n), p_2(n), p_3(n)$ with integer coefficients, does there exist $n \in \mathbb{Z}$ such that the equation
$p_1(n)x^2 + p_2(n)y^2 + p_3(n)z^2 = 0$
has a non-trivial rational solution?
I can sometimes show for specific polynomials that the answer is NO by using criteria given by Legendre in the 1700s along with repeated use of the Law of Quadratic Reciprocity.  However, generalized methods for showing the existence of an $n$ leading to non-trivial rational solutions of the above equation are something I am not familiar with.  If someone can point me in the right direction or even just shed a little light on the subject, I would be most appreciative.
If a much more tailored question is to your taste, consider this:
Let $r$ be a square-free positive integer and let $a, b, c \in \mathbb{Z}$ such that $a^2 + b^2 + c^2 = r$.  Characterize the values of $r$ such that for some $n \in \mathbb{Z}^+$ the equation 
$rx^2 + y^2 -(12n^2 - 1)(a^2 + b^2)z^2 = 0$
has a non-trivial rational solution.

REPLY [4 votes]: Let $m^2 = n^3+An^2 + Bn + C$ be any elliptic curve.
Your question includes the question: For which values of $n$ does $y^2 = (n^3+An^2 + Bn + C) x^2$ have a solution or, in other words, "find the integer points on  $m^2 = n^3+An^2 + Bn + C$." There are excellent algorithms for this in practice, but none that are proved to work in all cases. So your question probably doesn't have an answer which is better than this.