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 A377123 #7 Nov 01 2024 21:31:59 %S A377123 1,2,4,5,8,13,18,29,48,81,136,228,420,747,1326,2468,4520,8296,15232, %T A377123 28196,52504,96936,181699,340998,640091,1207386,2282956,4328536, %U A377123 8211989,15623003,29787092,56831499,108591159,207851120,398222781,763760138,1466661416,2819529654,5425826011,10450403468 %N A377123 Number of subsets of the first n nonzero triangular numbers whose sum is a nonzero triangular number. %e A377123 a(5) = 8 subsets: {1}, {3}, {6}, {10}, {15}, {6, 15}, {1, 3, 6} and {3, 10, 15}. %o A377123 (Python) %o A377123 from math import isqrt %o A377123 from functools import cache %o A377123 def cond(s): k = 8*s+1; return s > 0 and isqrt(k)**2 == k %o A377123 def u(n): return n*(n+1)//2 %o A377123 @cache %o A377123 def b(n, s): %o A377123 if n == 0: return int(cond(s)) %o A377123 return b(n-1, s) + b(n-1, s+u(n)) %o A377123 a = lambda n: b(n, 0) %o A377123 print([a(n) for n in range(1, 51)]) # _Michael S. Branicky_, Oct 18 2024 %Y A377123 Cf. A000217, A284250. %K A377123 nonn %O A377123 1,2 %A A377123 _Ilya Gutkovskiy_, Oct 17 2024 %E A377123 a(23) and beyond from _Michael S. Branicky_, Oct 18 2024