This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A350367 #18 Feb 06 2022 21:29:19 %S A350367 231,276,406,666,861,1081,1225,1431,1711,1891,2211,2556,3081,3741, %T A350367 3916,4186,4371,4560,4656,5151,5356,5671,5886,6786,7021,7381,7875, %U A350367 8001,8128,8256,8778,9316,10731,11781,12246,12561,12720,13366,13861,14196,14706,15576 %N A350367 Triangular numbers that are the sum of two distinct nonzero triangular numbers in more than one way. %e A350367 231 = 21 + 210 = 78 + 153. %e A350367 276 = 45 + 231 = 66 + 210 = 105 + 171. %t A350367 (P=PolygonalNumber)[3,Select[Range@176,Length@Select[Subsets[P[3,Range[s=#]],{2}],Total@#==P[3,s]&]>1&]] (* _Giorgos Kalogeropoulos_, Dec 31 2021 *) %o A350367 (Python) %o A350367 from collections import Counter %o A350367 from itertools import count, takewhile, combinations as combs %o A350367 def aupto(limit): %o A350367 tris = takewhile(lambda x: x <= limit, (k*(k+1)//2 for k in count(1))) %o A350367 trilst = list(tris); triset = set(trilst) %o A350367 tri2ct = Counter(sum(c) for c in combs(trilst, 2) if sum(c) in triset) %o A350367 return sorted(t for t in tri2ct if t <= limit and tri2ct[t] > 1) %o A350367 print(aupto(16000)) # _Michael S. Branicky_, Dec 27 2021 %Y A350367 Intersection of A000217 and A262749. %Y A350367 Cf. A089982, A112352. %K A350367 nonn %O A350367 1,1 %A A350367 _Shyam Sunder Gupta_, Dec 27 2021