OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..10000
EXAMPLE
14 is a term because 14*15 + 14*15 = 20*21.
MATHEMATICA
max = 220; lst = {}; For[x = 1, x < max, x++,
For[y = x, y < max, y++,
For[z = y, z < max, z++,
If[x (x + 1) + y (y + 1) == z (z + 1),
lst = AppendTo[lst, y]]]]]; Select[Union[lst], # < max/2 &]
PROG
(Python)
from sympy import integer_nthroot
A308395_list, y, w = [], 1, 0
while len(A308395_list) < 10000:
w += y
z = 0
for x in range(1, y+1):
z += x
if integer_nthroot(8*(w+z)+1, 2)[1]:
A308395_list.append(y)
break
y += 1 # Chai Wah Wu, Aug 02 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Ralf Steiner, Jul 31 2019
STATUS
approved