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 A106351 #28 Jan 18 2025 18:42:21 %S A106351 1,1,0,1,2,0,1,2,1,0,1,4,2,0,0,1,4,7,2,0,0,1,6,9,6,1,0,0,1,6,15,14,3, %T A106351 0,0,0,1,8,21,24,15,2,0,0,0,1,8,28,46,30,10,1,0,0,0,1,10,35,66,68,30, %U A106351 4,0,0,0,0,1,10,46,100,119,76,24,2,0,0,0,0,1,12,54,138,204,168,69,14,1,0,0,0,0 %N A106351 Triangle read by rows: T(n,k) = number of compositions of n into k parts such that no two adjacent parts are equal. %H A106351 Alois P. Heinz, <a href="/A106351/b106351.txt">Rows n = 1..141, flattened</a> %H A106351 A. Knopfmacher and H. Prodinger, <a href="http://dx.doi.org/10.1006/eujc.1998.0216">On Carlitz compositions</a>, European Journal of Combinatorics, Vol. 19, 1998, pp. 579-589. %F A106351 G.f.: 1/(1 - Sum_{k>0} (-1)^(k+1)*x^k*y^k/(1-x^k)). %e A106351 T(6,3) = 7 because the compositions of 6 into 3 parts with no adjacent equal parts are 3+2+1, 3+1+2, 2+3+1, 2+1+3, 1+3+2, 1+2+3, 1+4+1. %e A106351 Triangle begins: %e A106351 1; %e A106351 1, 0; %e A106351 1, 2, 0; %e A106351 1, 2, 1, 0; %e A106351 1, 4, 2, 0, 0; %e A106351 1, 4, 7, 2, 0, 0; %e A106351 1, 6, 9, 6, 1, 0, 0; %e A106351 1, 6, 15, 14, 3, 0, 0, 0; %e A106351 1, 8, 21, 24, 15, 2, 0, 0, 0; %e A106351 ... %p A106351 b:= proc(n, h, t) option remember; %p A106351 if n<t then 0 %p A106351 elif n=0 then `if`(t=0, 1, 0) %p A106351 else add(`if`(h=j, 0, b(n-j, j, t-1)), j=1..n) %p A106351 fi %p A106351 end: %p A106351 T:= (n, k)-> b(n, -1, k): %p A106351 seq(seq(T(n, k), k=1..n), n=1..15); # _Alois P. Heinz_, Oct 23 2011 %t A106351 nn=10;CoefficientList[Series[1/(1-Sum[y x^i/(1+y x^i),{i,1,nn}]),{x,0,nn}],{x,y}]//Grid (* _Geoffrey Critzer_, Nov 23 2013 *) %o A106351 (PARI) %o A106351 gf(n,y)={1/(1 - sum(k=1, n, (-1)^(k+1)*x^k*y^k/(1-x^k) + O(x*x^n)))} %o A106351 for(n=1, 10, my(p=polcoeff(gf(n,y),n)); for(k=1, n, print1(polcoeff(p,k), ", ")); print); \\ _Andrew Howroyd_, Oct 12 2017 %Y A106351 Row sums: A003242. Columns 3-6: A106352, A106353, A106354, A106355. %Y A106351 Cf. A131044 (at least two adjacent parts are equal). %Y A106351 T(2n,n) gives A221235. %K A106351 nonn,tabl %O A106351 1,5 %A A106351 _Christian G. Bower_, Apr 29 2005