TITLE: Can $3p^4-3p^2+1$ be square number?
QUESTION [1 upvotes]: I know $4p^4+1$ can't be square number, cause $4p^4<4p^4+1<4p^4+4p^2+1$ for all natural number p.
But I don't know the way to prove $3p^4-3p^2+1$ can(not) be square number. Is there a well known way to prove it?

REPLY [2 votes]: For those interested, here is a complete solution for all integers (using a bit of theory from elliptic curves - which can be found in Silverman).
Consider the curve
$$ C : y^2 = 3x^4 - 3x^2 + 1$$
which I claim is an elliptic curve over $\mathbb{Q}$. In particular we have that $C$ is birational to the (smooth) elliptic curve with minimal model
$$E : y^2 = x^3 - 15x + 22$$
over $\mathbb{Q}$.
Thus we have a birational map $\phi : C \to E$ with birational inverse $\phi^{-1} : E \to C$ (both defined over $\mathbb{Q}$), so the only rational points on $C$ are the image of $E(\mathbb{Q})$ under $\phi^{-1}$ together with the rational base points of the map $\phi$.
Notice that $E$ has a $2$-torsion point (namely $(2,0)$), so admits a descent by 2-isogeny, and we can compute the rank of $E$ to be $0$. Thus the rational points on $E$ are only the torsion points.
Computing the torsion subgroup is easy (via, e.g., Nagell-Lutz or Formal Groups) and we see that the torsion is of order $6$, generated by $P = (-1,6)$.
Using computer algebra, we compute the base points, and $\phi^{-1}(E(\mathbb{Q}))$ to see that
$$C(\mathbb{Q}) = \{(0, -1), (0, 1), (-1, -1), (-1, 1), (0, -1), (1, 1)\}$$
For those interested, below is Magma code to automate this process
A2<x,y> := AffineSpace(Rationals(), 2);
C := Curve(A2, 3*x^4 - 3*x^2 + 1 - y^2);
C := ProjectiveClosure(C);
P := C![1,1,1];
assert IsNonSingular(P);

E, phi := EllipticCurve(C, P);
_, phi_i := IsInvertible(phi);
E2, phi2 := MinimalModel(E);
_, phi2_i := IsInvertible(phi2);

assert #TorsionSubgroup(E) eq 6;

Sel2 := TwoDescent(E); //2-descent
assert #Sel2 eq 1; //shows rank is 0 since E has 2-tors pt

P := E2![-1,6]; 
assert Order(P) eq 6;  //generator
pts := [P, 2*P, 3*P, 4*P, 5*P, 6*P];

im_pts := {@ @};
for pt in pts do
    Include(~im_pts, phi_i(phi2_i(pt)) );
end for;

bs_pts := BasePoints(phi);
rat_pts := im_pts join bs_pts;

rat_pts;
{"set_name": "stack_exchange", "score": 1, "question_id": 3047428}