Artificial intelligent assistant

A question about tetrahedral and pentagonal numbers My question is: is it possible to find pentagonal numbers which are also tetrahedral? A pentagonal number is obtained by the formula: $$P_k=\frac{1}{2}k(3k-1)$$ The equivalent formula for the tetrahedral number $T_n$ is: $$T_n=\frac{1}{6}n(n+1)(n+2)$$ So the problem is to find a $T_n=P_k$ that means to solve: $$n(n+1)(n+2)=3k(3k-1)$$ with $k\in\mathbb{N}$ and $n\in\mathbb{N}$ Can someone give me a hint how to solve this equation? Thanks

Let $Y=3k-1,X=n+1$, then, as @GerryMyerson said in the comments, you have an elliptic curve $Y^2+Y=X^3-X$, and as such it can only have finitely many integer solutions.

You can use Sage to find them:


sage: E=EllipticCurve([0,0,1,-1,0])
sage: E
Elliptic Curve defined by y^2 + y = x^3 - x over Rational Field
sage: E.integral_points()
[(-1 : 0 : 1), (0 : 0 : 1), (1 : 0 : 1), (2 : 2 : 1), (6 : 14 : 1)]


Or you can look it up in the elliptic curve database at LMFDB.

Three of the solutions have $Y=k=0$, the other two give $k=1,P_k=1$ and $k=5,P_k=35$, so the solutions @MarioCarneiro found are all of them.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a588663f701f6a6ddaac46f5c15a3039