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 A284249 #17 Oct 22 2018 11:05:06 %S A284249 1,1,1,1,1,1,1,2,1,1,1,2,2,1,1,1,2,3,3,1,1,1,3,4,5,3,1,1,1,3,5,8,6,4, %T A284249 1,1,1,3,7,12,11,9,4,1,1,1,3,9,16,20,18,11,5,1,1,1,4,10,22,32,35,26, %U A284249 14,5,1,1,1,4,12,29,48,61,55,36,17,6,1,1,1,4,14,37,70,100,106,84,48,21,6,1,1 %N A284249 Number T(n,k) of k-element subsets of [n] whose sum is a triangular number; triangle T(n,k), n>=0, 0<=k<=n, read by rows. %H A284249 Alois P. Heinz, <a href="/A284249/b284249.txt">Rows n = 0..200, flattened</a> %H A284249 Wikipedia, <a href="https://en.wikipedia.org/wiki/Triangular_number">Triangular number</a> %e A284249 Triangle T(n,k) begins: %e A284249 1; %e A284249 1, 1; %e A284249 1, 1, 1; %e A284249 1, 2, 1, 1; %e A284249 1, 2, 2, 1, 1; %e A284249 1, 2, 3, 3, 1, 1; %e A284249 1, 3, 4, 5, 3, 1, 1; %e A284249 1, 3, 5, 8, 6, 4, 1, 1; %e A284249 1, 3, 7, 12, 11, 9, 4, 1, 1; %e A284249 1, 3, 9, 16, 20, 18, 11, 5, 1, 1; %e A284249 1, 4, 10, 22, 32, 35, 26, 14, 5, 1, 1; %e A284249 1, 4, 12, 29, 48, 61, 55, 36, 17, 6, 1, 1; %e A284249 1, 4, 14, 37, 70, 100, 106, 84, 48, 21, 6, 1, 1; %p A284249 b:= proc(n, s) option remember; expand(`if`(n=0, %p A284249 `if`(issqr(8*s+1), 1, 0), b(n-1, s)+x*b(n-1, s+n))) %p A284249 end: %p A284249 T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, 0)): %p A284249 seq(T(n), n=0..16); %t A284249 b[n_, s_] := b[n, s] = Expand[If[n == 0, If[IntegerQ @ Sqrt[8*s + 1], 1, 0], b[n - 1, s] + x*b[n - 1, s + n]]]; %t A284249 T[n_] := Function [p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n, 0]]; %t A284249 Table[T[n], {n, 0, 16}] // Flatten (*_Jean-François Alcover_, May 29 2018, from Maple *) %Y A284249 Columns k=0-10 give: A000012, A003056, A320848, A320849, A320850, A320851, A320852, A320853, A320854, A320855, A320856. %Y A284249 Second and third lower diagonals give: A008619(n+1), A008747(n+1). %Y A284249 Row sums give A284250. %Y A284249 T(2n,n) gives A284251. %Y A284249 Cf. A000217, A281871. %K A284249 nonn,tabl %O A284249 0,8 %A A284249 _Alois P. Heinz_, Mar 23 2017