I've the following number:
$$12\left(n-2\right)^2x^3+36\left(n-2\right)x^2-12\left(n-5\right)\left(n-2\right)x+9\left(n-4\right)^2\tag1$$
Now I know that $n\in\mathbb{N}^+$ and $n\ge3$ (and $n$ has a given value) besides that $x\in\mathbb{N}^+$ and $x\ge2$.
I want to check if the number is a perfect square.
Yesterday, this question was answered using the software SageMathCell. And the code that was used is the following:
E = EllipticCurve([0, β, 0, γ, δ])
P = E.integral_points()
for p in P:
if p[0] % α == 0:
print(p[0] // α, p[1] // α)
Using $(1)$ I found that:
- $$\alpha=12(n-2)^2\tag2$$
- $$\beta=36(n-2)\tag3$$
- $$\gamma=-144(n-5)(n-2)^3\tag4$$
- $$\delta=1296(n-4)^2(n-2)^4\tag5$$
Now, when I tried $n=71$ it should have found that $x=1585$ is a solution but it gave me nothing in return.
What mistake have I made?
You must first multiply all coefficients by $144(n-2)^4$ in order to bring your equation to elliptic curve form ( the coefficient of $x^3$ and $y^2$ has to be $1$ in particular) this is why in the end you will also mod out and divide by $a$.
To clarify use instead the following in the code: $\beta'=\beta,\gamma'=12(n-2)^2\gamma,\delta'=144(n-2)^4\delta$ and $a'=12(n-2)^2=a$.
In general you have $y^2=ax^3+bx^2+cx+d$, multiplying by $a^2$ then gives $(ay)^2=(ax)^3+b(ax)^2+ac(ax)+a^2d$. So $b'=b,c'=ac,d'=a^2d$.