login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 8

%I #21 Aug 11 2020 16:25:36

%S 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 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 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 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 Alois P. Heinz, <a href="/A072575/b072575.txt">Rows n = 1..141, flattened</a>

%H <a href="/index/Com#comp">Index entries for sequences related to compositions</a>

%e Rows start:

%e 1;

%e 0, 1;

%e 0, 2, 1;

%e 0, 0, 2, 1;

%e 0, 0, 2, 2, 1;

%e 0, 0, 6, 2, 2, 1;

%e 0, 0, 0, 8, 2, 2, 1;

%e 0, 0, 0, 6, 8, 2, 2, 1;

%e ...

%e 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 b:= proc(n, i) option remember; `if`(n=0, 1,

%p `if`(i<1, [][], zip((x, y)->x+y, [b(n, i-1)],

%p `if`(i>n, [], [0, b(n-i, i-1)]), 0)[]))

%p end:

%p T:= proc(n, k) local l; l:= [b(n-k, k-1)];

%p add(l[i]*(i)!, i=1..nops(l))

%p end:

%p seq(seq(T(n, k), k=1..n), n=1..20); # _Alois P. Heinz_, Nov 20 2012

%t 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 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 nonn,tabl

%O 1,5

%A _Henry Bottomley_, Jun 21 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)