I am a hobbyist in number theory. Suggestion from the math majors are welcomed.
n(n + 1)/2 = 2(x(x + 1)/2) + 1
is a Pell-like equation and WL/Mathematica can recognize the pattern and solve it with Reduce:
Reduce[n (n + 1)/2 == 2 (x (x + 1)/2) + 1, {x, n}, Integers] (*same implementation in W|A*)
Your question seems much more complicated and challenging for finding a general solution. I am not sure if there is a generic quadratic Diophantine equation solver for this type of problem with 3 unknowns.
I tried something here:
For
(n(n + 1)/2)(m(m + 1)/2) = x(x + 1)/2 <-> T(m)*(n*(n+1)/2) = (x+1)*x/2 if T(i) == i*(i+1)/2
I can do some algebra and make the rhs a perfect square. Recall:
(2 x + 1)^2 = 4 x^2 + 4 x +1
I hence transfer the triangle number identity into the following:
p^2 - T(m)*q^2 == -T(m)+1 with p == 2*x+1 and q = 2*n+1,
which is of the following form:
p^2 - D q^2 ==c with |c| = T(m)-1 > Sqrt(T(m))
Unfortunately this is really something like "Hilbert 10th" problem for generic solution. Math world also gives the following quote:
If |c|>sqrt(D), the procedure is significantly more complicated
(Beiler 1966, p. 265; Dickson 2005, pp. 387-388) and is discussed by
GĂ©rardin (1910) and Chrystal (1961).
Link: http://mathworld.wolfram.com/PellEquation.html
Yet with given numbers, you can find the solution:
d = (m*(m + 1))/2 /. m -> 7;
Reduce[p^2 - d q^2 == -d + 1 && p > 0 && q > 0, {p, q}, Integers]
A sample notebook is also attached.
Attachments: