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 A382312 #18 May 06 2025 00:34:15 %S A382312 1,0,1,0,2,0,3,1,0,5,3,0,8,8,0,14,17,1,0,24,36,4,0,43,72,13,0,77,143, %T A382312 36,0,140,281,90,1,0,256,550,213,5,0,472,1073,484,19,0,874,2093,1068, %U A382312 61,0,1628,4079,2308,177,0,3045,7950,4912,476,1,0,5719,15498,10328,1217,6 %N A382312 Irregular triangle read by rows: T(n,k) is the number of compositions of n with k records. %C A382312 A record in a composition is a part that is greater than all parts before it, reading left to right. The first part of any nonempty composition is considered a record. %H A382312 Alois P. Heinz, <a href="/A382312/b382312.txt">Rows n = 0..500, flattened</a> (first 201 rows from John Tyler Rascoe) %F A382312 G.f.: Product_{i>0} (1 + y*x^i * (1 - x)/(1 - 2*x + x^(i+1))). %F A382312 Sum_{k>0} T(n,k)*k = A336482(n). %e A382312 Triangle begins: %e A382312 k=0 1 2 3 4 %e A382312 n= 0 1; %e A382312 n= 1 0, 1; %e A382312 n= 2 0, 2; %e A382312 n= 3 0, 3, 1; %e A382312 n= 4 0, 5, 3; %e A382312 n= 5 0, 8, 8; %e A382312 n= 6 0, 14, 17, 1; %e A382312 n= 7 0, 24, 36, 4; %e A382312 n= 8 0, 43, 72, 13; %e A382312 n= 9 0, 77, 143, 36; %e A382312 n=10 0, 140, 281, 90, 1; %e A382312 ... %e A382312 The composition (2,1,1,2,4,2,1,5,7) has 4 records. %e A382312 ^ ^ ^ ^ %e A382312 T(4,1) = 5 counts: (4), (3,1), (2,2), (2,1,1), (1,1,1,1). %e A382312 T(4,2) = 3 counts: (1,1,2), (1,2,1), (1,1,3). %p A382312 b:= proc(n, m) option remember; expand(`if`(n=0, 1, add( %p A382312 b(n-j, max(m, j))*`if`(j>m, x, 1), j=1..n))) %p A382312 end: %p A382312 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)): %p A382312 seq(T(n), n=0..16); # _Alois P. Heinz_, Mar 28 2025 %o A382312 (PARI) %o A382312 T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N), h=prod(i=1,N,1+y*x^i*(1-x)/(1-2*x+x^(i+1)))); vector(N, n, Vecrev(polcoeff(h, n-1)))} %o A382312 T_xy(12) %Y A382312 Cf. A002024 (row lengths), A011782 (row sums), A079500 (column k=1), A336482, A352525. %K A382312 nonn,tabf,easy %O A382312 0,5 %A A382312 _John Tyler Rascoe_, Mar 21 2025