Following Charlie’s posting, I’ve been trying to prove that his was the only solution, but I’ve found another in the process, just outside his search area. I’m still not sure whether the number of solutions is finite.

In square 1, let the sequence of corner numbers start with the m th triangular number. Each of these is counted twice in the summation, so denoting the central number by 2p^{2} gives: 2p^{2} = m(m + 1) + (m + 1)(m + 2) + (m + 2)(m + 3) + (m + 3)(m + 4) p^{2} = 2m^{2} + 8m + 10(1)

In square 2, let the sequence of corner numbers be the nth, (n+d)th, (n+2d)th and (n+3d)th triangular numbers. The central number is now p^{2}, giving: p^{2} = n(n + 1) + (n + d)(n + d + 1) + (n + 2d)(n + 2d + 1) + (n + 3d)(n + 3d + 1) p^{2} = 4n^{2} + 4n(3d + 1) + 14d^{2} + 6d(2)

A computer search for integer solutions that satisfy both (1) and (2) finds: m=5, n=1, d=2, p=10, which give the squares shown below, found by Charlie, but is very time consuming for larger values of m, n and d.

153621176 51200492910021 366428284315

From (1) it is clear that p is even, so p/2 is an integer, and (1) can be written as 2(p/2)^{2} = m^{2} + 4m + 5 2(p/2)^{2} = (m + 2)^{2} + 1

This is Pell’s equation, with m+2 and p/2 therefore being given by alternate numerators and denominators of the convergents of sqrt(2).

Convergents of sqrt(2) are:1/1,3/2,7/5,17/12,41/29,239/169 …….

so m+2 can take the values:1741… giving m =-1539…

with corresponding p/2 values:1529… giving p = 21058…

These can also be found from recurrence relations (subscripts in square brackets):

Having tried all the values of p as far p=13250218, only p=10 and p=1970 have produced solutions, and to go further is very time consuming (computer-wise). I had hoped to find an analytical method that could help to usefully combine (1) and (2) and to rule out further solutions, but have so far failed. There may be a way of filtering the p values before searching, but I haven’t yet found it.