Integer polynomials taking square values Is there a way to determine a formula giving all integer values of $x$ for which the value of a polynomial $P(x)$ with integer coefficients is a square?
That is, is there a closed formula for:
$X = \{ x \in \mathbb{N} : \exists \ n \in \mathbb{N} : P(x) = n^2 \}$ ?
I'm interested in particular in $P'(x) = 8x^2-8x+1$, but am wondering about the general case as well.
For $P'(x)$ a sample of $X$ is $\{ 1, 3, 15, 85, 493, 2871, 16731, 97513, \ldots \}$.
 A: This looks like counting points on hyper-elliptic curves to me...
You are basically finding the integer solutions to 
$Y^2 = 8X^2 - 8X + 1$ 
in you example. But this case is not too difficult, because it's of genus $0$.
It will be more interesting if $P(x)$ is of degree $3$ or higher.
To begin with this very interesting subject of point-counting, probably you can try
http://www.google.com/search?hl=en&source=hp&q=rational+points+on+elliptic+curves&aq=0&aqi=g5&aql=&oq=rational+points+on+&gs_rfai=
A: Your sequence is http://oeis.org/classic/A011900
A: In fact, as shown here ( see link ), solving this problem is equivalent to factoring integers. In the link below, it is shown how factoring can be reduced to finding a polynomial with integer coefficients which takes a perfect square value for a given value of the variable.
So finding an efficient method to zoom in on the value of the variable that makes a polynomial take a perfect square value is equivalent to a solution of the factoring problem.
https://math.stackexchange.com/questions/1112015/is-reducing-factoring-of-integers-to-finding-a-polynomial-which-takes-a-perfect
A: For these equations we use the standard approach.
For a private quadratic form:  $$Y^2=aX^2+bX+1$$  
Using solutions of Pell's equation:  $$p^2-as^2=1$$  
Solutions can be expressed through them is quite simple.  
$$Y=p^2+bps+as^2$$  
$$X=2ps+bs^2$$  
$p,s$ - these numbers can have any sign.
Finding solutions of equations Pell - standard procedure.
