There are infinitely many solutions. I'll first give infinitely many, and then talk about describing the set of all solutions.
Let $(a,u)$ be a solution to Pell's equation
$$a^2-24u^2 =1$$
with $a$ and $u$ odd. All the integer solutions to this equation are of the form $a+u\sqrt{24} = (5+\sqrt{24})^n$ (using the methods in the Wikipedia link) and, when $n$ is odd, so are $a$ and $u$. The first few values of $a$ and $u$ are: $(5,1)$, $(485, 99)$, $(47525, 9701)$, $(4656965, 950599)$...
Then $(a,b,c,d) = (a, 5u, 7u, u)$ obeys
$$a^2-1 = 24u^2 = c^2-b^2 = d^2-c^2$$
and $(a,b,c,d)$ are all odd.
Let $p=c/b$ and $q=d/b$, so $p^2+q^2=2$. There is a standard method for describing rational points on a conic once you know one point. In this case, $(1,1)$ is on conic. Consider the line through $(1,1)$ with slope $k/\ell$. Its other intersection with the conic is at
$$\left( 1-\frac{2k(k+\ell)}{k^2+\ell^2}, 1-\frac{2k(k+\ell)}{k^2+\ell^2} \right) = \left( \frac{-k^2-2k\ell+\ell^2}{k^2+\ell^2}, \frac{k^2-2k\ell-\ell^2}{k^2+\ell^2} \right).$$
The line between two rational points always has rational slope, so every rational solution to $p^2+q^2=2$ is of the above form. Clearing denominators, we have
$$(b,c,d) = u \cdot (k^2+\ell^2, -k^2-2k\ell+\ell^2, k^2-2k\ell-\ell^2).$$
In order to get $(b,c,d)$ all odd, take $k$ and $\ell$ of different parities and $u$ odd. I found $(5,7,1)$ by taking $(k,\ell) = (1,2)$. (There are also some solutions where $u$ is a half integer and $k$ and $\ell$ are both odd. I didn't check this carefully, since my goal was to find infinitely many solutions, not to classify them all, but if you want to throughly understand the problem you should consider the possibility that the three terms inside parentheses have a common factor.)
In any case, my strategy was to think about fixing $(k, \ell)$ and looking for $u$'s such that the common difference
$$d^2-c^2 = c^2 - b^2 = u^2 \cdot 4 k \ell (k^2 - \ell^2)$$
would be of the form $a^2-1$. This is just Pell's equation
$$a^2 - Nu^2=1$$
with $N=4 k \ell (k^2 - \ell^2)$ and the auxilliary condition that $a$ and $u$ are odd.
Pell's equation will be solvable whenever $N>0$ and not a square. There are certainly plenty of examples when $N$ is not a square. In fact, it will never be a square unless it is $0$. If $N=m^2$ were square, then $c^2=b^2+(mu)^2$ and $d^2 = (mu)^2 + c^2$. Fermat showed that there are no solutions to $x^2+y^2=z^2$ and $y^2+z^2=t^2$ with $y \neq 0$, see here.
But will there be odd solutions to Pell's equation? Parity considerations show that, since $N$ is even, $a$ will always be odd. If the primitive solution $a_0 + u_0 \sqrt{N}$ to Pell's equation has $u_0$ odd, then so will the solutions of the form $(a_0+u_0 \sqrt{N})^{2m+1}$. But if $u_0$ is even, then every solution to Pell's equation will have $u$ even.
I don't know a principle which predicts which of these two cases will occur but, as the example above shows, $u_0$ is odd at least some of the time, and that's all you need for infinitely many solutions.
Just to show off, here's one more example. I'll take $(k, \ell) = (3,4)$. This leads to the discovery that
$$31^2 - 25^2 = 25^2-17^2$$
We have $N = 336$. The primitive solution to $a^2 - 336 u^2 =1$ is $55^2-3^2\cdot 336=1$. So there are infinitely many solutions of the form
$$(a,b,c,d) = (a, 25u, 31u, 17u)$$
the smallest of which is
$$(55, 75, 93, 51).$$
Because $p,q,r,s,t$ are consecutive positive integers, we know immediately that $q=r-1,p=r-2,s=r+1,t=r+2$. This means that $q+r+s=r-1+r+r+1=3r$ and that $p+q+r+s+t=5r$.
If $3r$ is a perfect square, then this means that the prime factorization of $r$ must have $3^{2n+1}$ for some $n$; similarly, for $5r$ to be a perfect cube, we must have that the prime factorization of $r$ must have $5^{3m+2}$ for some $m$.
Clearly having other factors will lead to $r$ being larger, so we can say that $r$ is of the form $r=3^{2n+1}5^{3m+2}$. But $3r$ being a perfect square means that $3m+2$ must be even, so $m$ is even; the least such $m$ is 0. Similarly, $5r$ being a perfect cube means that $2n+1$ must be a (positive) multiple of 3; the least such $n$ to make this possible is $n=1$.
It follows that $r=3^35^2$.
Best Answer
OK you have two different questions... programming in Maple is probably taken elsewhere, but I will say that for most programs, clarity is more important than efficiency. So having separate variables for your triangular numbers and for the square you're aiming at is fine if that makes your program clearer.
For mathematical analysis, though, if two items are related it's best to make that as explicit as possible. So your:
$\frac{1}{2} j(j+1) + \frac{1}{2} k(k+1) + \frac{1}{2} l(l+1) = m^2 $
since we're talking about $T_{k-1}+T_{k}+T_{k+1}, \to j=k-1$ and $l=k+1$ we can write as
$\frac{1}{2} (k-1)(k) + \frac{1}{2} k(k+1) + \frac{1}{2} (k+1)(k+2) = m^2 $
which could be simplified - or, more directly: $$\begin{align} T_{k-1}+T_{k}+T_{k+1} &= (T_{k} - k)+T_{k}+(T_{k}+(k+1))\\ &= 3T_k+1\\ &= 3\frac{1}{2}(k^2+k) + 1 \end{align}$$
which might help - it certainly shows that $m$ cannot be a multiple of 3.