I recently found out about tritriduoprismic numbers (squares of triangular numbers), related to a 4D figure called tritriduoprism (which is a product of two triangles). The first few are 0, 1, 9, 36, 100, 225, 441, and so on. Notice that 0, 1 and 36 are triangular numbers themselves. In order to look for more, I wrote a Python script, as below :
import numpy as np
def square_tri(k):
#Tests if k² is triangular
a = np.sqrt(2*k**2+0.25) - 0.5
return a==int(a)
c=0 #c is a counter, it will take all the integer values
s=0 #s is the c-th triangular number
for i in range(244452):
if square_tri(s) :
print(s)
c+=1
s+=c
print('The squares of these are triangular numbers')
print(f'Last number tested : {s}')
The output is as follows :
1
6
The squares of these are triangular numbers
Last number tested : 29878512378
0 isn't included because of rounding errors, and bigger numbers aren't well managed either. The point is, there aren't any such numbers (meaning triangular numbers that are squares of triangular numbers) below 29878512378, besides 0, 1 and 36. My conjecture is there aren't any at all, but I can't manage to prove it. Does anyone have ideas ?