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 A295946 #10 Mar 08 2021 06:17:30 %S A295946 1,1,1,2,17,149,1439,16993,373393,6899469,214746442,7287992421 %N A295946 Number of set partitions of [3n] into n subsets of size three such that all element sums are triangular numbers. %e A295946 a(0) = 1: {}. %e A295946 a(1) = 1: {{1,2,3}}. %e A295946 a(2) = 1: {{1,2,3}, {4,5,6}}. %e A295946 a(3) = 2: {{1,6,8}, {2,4,9}, {3,5,7}}, {{1,5,9}, {2,6,7}, {3,4,8}}. %e A295946 a(4) = 17: {{1,2,12}, {3,8,10}, {4,6,11}, {5,7,9}}, {{1,2,12}, {3,7,11}, {4,8,9}, {5,6,10}}, {{1,3,11}, {2,9,10}, {4,5,12}, {6,7,8}}, {{1,6,8}, {2,9,10}, {3,7,11}, {4,5,12}}, {{1,9,11}, {2,3,10}, {4,5,12}, {6,7,8}}, {{1,9,11}, {2,6,7}, {3,8,10}, {4,5,12}}, {{1,4,10}, {2,8,11}, {3,6,12}, {5,7,9}}, {{1,5,9}, {2,8,11}, {3,6,12}, {4,7,10}}, {{1,9,11}, {2,5,8}, {3,6,12}, {4,7,10}}, {{1,3,11}, {2,7,12}, {4,8,9}, {5,6,10}}, {{1,5,9}, {2,7,12}, {3,8,10}, {4,6,11}}, {{1,9,11}, {2,7,12}, {3,4,8}, {5,6,10}}, {{1,9,11}, {2,7,12}, {3,8,10}, {4,5,6}}, {{1,8,12}, {2,3,10}, {4,6,11}, {5,7,9}}, {{1,8,12}, {2,9,10}, {3,5,7}, {4,6,11}}, {{1,8,12}, {2,4,9}, {3,7,11}, {5,6,10}}, {{1,8,12}, {2,9,10}, {3,7,11}, {4,5,6}}. %p A295946 b:= proc(s) option remember; `if`(s={}, 1, (j-> %p A295946 add(add(`if`(i<j and k<i and issqr((k+i+j)*8+1), %p A295946 b(s minus {k, i, j}), 0), k=s), i=s))(max(s))) %p A295946 end: %p A295946 a:= n-> b({$1..3*n}): %p A295946 seq(a(n), n=0..7); %t A295946 b[s_] := b[s] = If[s == {}, 1, With[{j = Max[s]}, %t A295946 Sum[Sum[If[i < j && k < i && IntegerQ@Sqrt[(k + i + j)*8 + 1], %t A295946 b[s ~Complement~ {k, i, j}], 0], {k, s}], {i, s}]]]; %t A295946 a[n_] := b[Range[3n]]; %t A295946 Table[Print[n, " ", a[n]]; a[n], {n, 0, 9}] (* _Jean-François Alcover_, Mar 08 2021, after _Alois P. Heinz_ *) %Y A295946 Cf. A000217, A278329. %K A295946 nonn,more %O A295946 0,4 %A A295946 _Alois P. Heinz_, Nov 30 2017