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 A238279 #41 Jul 17 2024 07:48:32 %S A238279 1,1,2,2,2,3,4,1,2,10,4,4,12,14,2,2,22,29,10,1,4,26,56,36,6,3,34,100, %T A238279 86,31,2,4,44,148,200,99,16,1,2,54,230,374,278,78,8,6,58,322,680,654, %U A238279 274,52,2,2,74,446,1122,1390,814,225,22,1,4,88,573,1796,2714,2058,813,136,10,4,88,778,2694,4927 %N A238279 Triangle read by rows: T(n,k) is the number of compositions of n into nonzero parts with k parts directly followed by a different part, n>=0, 0<=k<=A004523(n-1). %C A238279 Same as A238130, with zeros omitted. %C A238279 Last elements in rows are 1, 1, 2, 2, 1, 4, 2, 1, 6, 2, 1, 8, ... with g.f. -(x^6+x^4-2*x^2-x-1)/(x^6-2*x^3+1). %C A238279 For n > 0, also the number of compositions of n with k + 1 runs. - _Gus Wiseman_, Apr 10 2020 %H A238279 Joerg Arndt and Alois P. Heinz, <a href="/A238279/b238279.txt">Rows n = 0..180, flattened</a> %F A238279 G.f.: A(x,y) = ( 1 + Sum_{i>0} ((x^i)*(1 - y)/(1 + y*x^i - x^i)) )/( 1 - Sum_{i>0} ((y*x^i)/(1 + y*x^i - x^i)) ). - _John Tyler Rascoe_, Jul 10 2024 %e A238279 Triangle starts: %e A238279 00: 1; %e A238279 01: 1; %e A238279 02: 2; %e A238279 03: 2, 2; %e A238279 04: 3, 4, 1; %e A238279 05: 2, 10, 4; %e A238279 06: 4, 12, 14, 2; %e A238279 07: 2, 22, 29, 10, 1; %e A238279 08: 4, 26, 56, 36, 6; %e A238279 09: 3, 34, 100, 86, 31, 2; %e A238279 10: 4, 44, 148, 200, 99, 16, 1; %e A238279 11: 2, 54, 230, 374, 278, 78, 8; %e A238279 12: 6, 58, 322, 680, 654, 274, 52, 2; %e A238279 13: 2, 74, 446, 1122, 1390, 814, 225, 22, 1; %e A238279 14: 4, 88, 573, 1796, 2714, 2058, 813, 136, 10; %e A238279 15: 4, 88, 778, 2694, 4927, 4752, 2444, 618, 77, 2; %e A238279 16: 5, 110, 953, 3954, 8531, 9930, 6563, 2278, 415, 28, 1; %e A238279 ... %e A238279 Row n=5 is 2, 10, 4 because in the 16 compositions of 5 %e A238279 ##: [composition] no. of changes %e A238279 01: [ 1 1 1 1 1 ] 0 %e A238279 02: [ 1 1 1 2 ] 1 %e A238279 03: [ 1 1 2 1 ] 2 %e A238279 04: [ 1 1 3 ] 1 %e A238279 05: [ 1 2 1 1 ] 2 %e A238279 06: [ 1 2 2 ] 1 %e A238279 07: [ 1 3 1 ] 2 %e A238279 08: [ 1 4 ] 1 %e A238279 09: [ 2 1 1 1 ] 1 %e A238279 10: [ 2 1 2 ] 2 %e A238279 11: [ 2 2 1 ] 1 %e A238279 12: [ 2 3 ] 1 %e A238279 13: [ 3 1 1 ] 1 %e A238279 14: [ 3 2 ] 1 %e A238279 15: [ 4 1 ] 1 %e A238279 16: [ 5 ] 0 %e A238279 there are 2 with no changes, 10 with one change, and 4 with two changes. %p A238279 b:= proc(n, v) option remember; `if`(n=0, 1, expand( %p A238279 add(b(n-i, i)*`if`(v=0 or v=i, 1, x), i=1..n))) %p A238279 end: %p A238279 T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n, 0)): %p A238279 seq(T(n), n=0..14); %t A238279 b[n_, v_] := b[n, v] = If[n == 0, 1, Expand[Sum[b[n-i, i]*If[v == 0 || v == i, 1, x], {i, 1, n}]]]; T[n_] := Function[{p}, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n, 0]]; Table[T[n], {n, 0, 14}] // Flatten (* _Jean-François Alcover_, Feb 11 2015, after Maple *) %t A238279 Table[If[n==0,1,Length[Select[Join@@Permutations/@IntegerPartitions[n],Length[Split[#]]==k+1&]]],{n,0,12},{k,0,If[n==0,0,Floor[2*(n-1)/3]]}] (* _Gus Wiseman_, Apr 10 2020 *) %o A238279 (PARI) %o A238279 T_xy(max_row) = {my(N=max_row+1, x='x+O('x^N),h=(1+ sum(i=1,N,(x^i-y*x^i)/(1+y*x^i-x^i)))/(1-sum(i=1,N, y*x^i/(1+y*x^i-x^i)))); for(n=0,N-1, print(Vecrev(polcoeff(h,n))))} %o A238279 T_xy(16) \\ _John Tyler Rascoe_, Jul 10 2024 %Y A238279 Columns k=0-10 give: A000005 (for n>0), 2*A002133, A244714, A244715, A244716, A244717, A244718, A244719, A244720, A244721, A244722. %Y A238279 Row lengths are A004523. %Y A238279 Row sums are A011782. %Y A238279 The version counting adjacent equal parts is A106356. %Y A238279 The version for ascents/descents is A238343. %Y A238279 The version for weak ascents/descents is A333213. %Y A238279 The k-th composition in standard-order has A124762(k) adjacent equal parts, A124767(k) maximal runs, A333382(k) adjacent unequal parts, and A333381(k) maximal anti-runs. %Y A238279 Cf. A064113, A333214, A333216. %K A238279 nonn,tabf %O A238279 0,3 %A A238279 _Joerg Arndt_ and _Alois P. Heinz_, Feb 22 2014