Given triangular numbers,
$$T_n:= {n(n+1)\over 2} = 1,3,6,10,15,...$$
Let $T_n, T_{n+1}$ and $T_{n+2}$ be three consecutive triangular numbers.
My question is: Are there more of $T_n^2+T_{n+1}^2+T_{n+2}^2$ that only yield a square number? Or this is $$T_3^2+T_4^2+T_5^2=6^2+10^2+15^2=19^2$$ the only one? I can't seem to find anymore.
I've checked this for all $X$ up to $10^{10^5}$, here's how. We are searching for integer solutions to $T_{n-1}^2 + T_n^2 + T_{n+1}^2 = X^2$ (note I've reparametrised, compared to the OP), which expands to $$3 n^4 + 6 n^3 + 15 n^2 + 12 n + 4 =4X^2. $$ Curiously enough, this is an invertible expression, and we can instead say $$n = \frac{1}{6} \left(\sqrt{24 \sqrt{3X^2 + 6} - 63}- 3\right)$$ assuming $n>0$.
For $n$ to be an integer, $\sqrt{24 \sqrt{3X^2 + 6} - 63}$ must be an integer, so $24 \sqrt{3X^2 + 6} - 63$ must be a square. Furthermore, it must be an integer, hence $ \sqrt{3X^2 + 6}$ must be an integer. (Note that $3X^2 + 6$ is an integer, so $ \sqrt{3X^2 + 6}$ is either an integer or irrational - being $\frac{1}{24}$ of an integer cannot work.) So, it suffices to search for integer solutions $(X,Y)$ to the equation $Y^2 - 3X^2 = 6$ such that $24Y-63$ is a square.
But, these are easy to generate, with some knowledge of Pell equations. I'll switch to talking about $x^2 - 3y^2 = 6$ for now, for consistency with literature. First observe that the equation $a^2 - 3b^2 = 1$ has a solution given by $(a,b) = (2, 1)$, and that this is the positive non-trivial solution with smallest $b$. By Theorem 5.3 (and Example 5.6) in Keith Conrad's first blurb on Pell equations, all solutions to this equation are generated by this one. Consulting Keith Conrad's second blurb on Pell equations, we can see that every other solution is a Pell multiple of this one. Considering the original equation $x^2 - 3y^2 = 6$ now, Theorem 3.3 in the second blurb tells us that every solution of this is given by a Pell multiple of a solution $(x_1, y_1)$ where $|x_1| \leq 22$ and $|y_1| \leq 7$. A quick computer check gives only $(3, 1)$ and $(9, 5)$ as the positive solutions here, and $(9, 5)$ is a Pell multiple of $(3, 1)$.
Hence, all solutions of $x^2 - 3y^2 = 6$ are Pell multiples of $(3, 1)$, where the next Pell multiple of pair $(x, y)$ is given by $(2x + 3y, x + 2y)$, so we can easily generate all the positive integer solutions in Haskell! (using the
arithmoilibrary)valsis a list of the solutions to the Pell equation, generated using the recurrence explained above. A pair $(Y, X) = (x, y)$worksif $24Y - 63$ is a square, checked using the arithmoi package for number theory. Finally,solutions limitchecks every possible $(Y, X)$ that satisfiesX < limitto see if itworksor not.solutions (10^(10^5))gives[(3, 1), (33, 19)]and the pair $(3, 1)$ corresponds to the trivial solution $T_{-1}^2 + T_0^2 + T_1^2 = 1$, while $(33, 19)$ corresponds to the solution in the OP. In particular, $24 \times 33 - 63 = 729$, so $n=4$, and $T_3^2 + T_4^2 + T_5^2 = 19$.My computer checks this in under two minutes, but fails for $10^{10^6}$, seemingly due to memory errors. Hopefully someone can grow this into a full proof using cleverer ideas about Pell equations, or check larger values.
EDIT: Now checked up to $10^{2\times {10^5}}$.