cp's OEIS Frontend

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.

A072575 Triangle T(n,k) of number of compositions (ordered partitions) of n into distinct parts where largest part is exactly k, 1<=k<=n.

This page as a plain text file.
%I A072575 #21 Aug 11 2020 16:25:36
%S A072575 1,0,1,0,2,1,0,0,2,1,0,0,2,2,1,0,0,6,2,2,1,0,0,0,8,2,2,1,0,0,0,6,8,2,
%T A072575 2,1,0,0,0,6,8,8,2,2,1,0,0,0,24,12,8,8,2,2,1,0,0,0,0,30,14,8,8,2,2,1,
%U A072575 0,0,0,0,30,36,14,8,8,2,2,1,0,0,0,0,24,36,38,14,8,8,2,2,1,0,0,0,0,24,54,42,38,14,8,8,2,2,1
%N A072575 Triangle T(n,k) of number of compositions (ordered partitions) of n into distinct parts where largest part is exactly k, 1<=k<=n.
%H A072575 Alois P. Heinz, <a href="/A072575/b072575.txt">Rows n = 1..141, flattened</a>
%H A072575 <a href="/index/Com#comp">Index entries for sequences related to compositions</a>
%e A072575 Rows start:
%e A072575   1;
%e A072575   0, 1;
%e A072575   0, 2, 1;
%e A072575   0, 0, 2, 1;
%e A072575   0, 0, 2, 2, 1;
%e A072575   0, 0, 6, 2, 2, 1;
%e A072575   0, 0, 0, 8, 2, 2, 1;
%e A072575   0, 0, 0, 6, 8, 2, 2, 1;
%e A072575   ...
%e A072575 T(7,4)=8 since 7 can be written as 4+3 =4+2+1 =4+1+2 =3+4 =2+4+1 =2+1+4 =1+4+2 =1+2+4.
%p A072575 b:= proc(n, i) option remember; `if`(n=0, 1,
%p A072575       `if`(i<1, [][], zip((x, y)->x+y, [b(n, i-1)],
%p A072575       `if`(i>n, [], [0, b(n-i, i-1)]), 0)[]))
%p A072575     end:
%p A072575 T:= proc(n, k) local l; l:= [b(n-k, k-1)];
%p A072575        add(l[i]*(i)!, i=1..nops(l))
%p A072575     end:
%p A072575 seq(seq(T(n, k), k=1..n), n=1..20);  # _Alois P. Heinz_, Nov 20 2012
%t A072575 b[n_, i_] := b[n, i] = If[n == 0, {1}, If[i<1, {}, Plus @@ PadRight[{b[n, i-1], If[i>n, {}, Join[{0}, b[n-i, i-1]]]}]]]; T[n_, k_] := Module[{l}, l = b[n-k, k-1]; Sum[l[[i]]*i!, {i, 1, Length[l]}]]; Table[Table [T[n, k], {k, 1, n}], {n, 1, 20}] // Flatten (* _Jean-François Alcover_, Jan 31 2014, after _Alois P. Heinz_ *)
%Y A072575 Cf. A026836, A072574. Row sums are A032020. Column sums appear to be A001339 (offset). Starting terms of columns tend towards A072576 as k increases.
%K A072575 nonn,tabl
%O A072575 1,5
%A A072575 _Henry Bottomley_, Jun 21 2002