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!)
A330460 Triangle read by rows where T(n,k) is the number of set partitions with k blocks and total sum n. 8

%I #18 May 16 2021 12:24:54

%S 1,0,1,0,1,0,0,2,1,0,0,2,1,0,0,0,3,2,0,0,0,0,4,5,1,0,0,0,0,5,6,1,0,0,

%T 0,0,0,6,9,2,0,0,0,0,0,0,8,13,3,0,0,0,0,0,0,0,10,23,10,1,0,0,0,0,0,0,

%U 0,12,27,11,1,0,0,0,0,0,0,0,0,15,40,19,2,0,0,0,0,0,0,0,0

%N Triangle read by rows where T(n,k) is the number of set partitions with k blocks and total sum n.

%H Andrew Howroyd, <a href="/A330460/b330460.txt">Table of n, a(n) for n = 0..1325</a> (rows n=0..50)

%F T(n,k) = Sum_{k <= i <= n} A060016(n,i) * A008277(i,k).

%F For n > 0, T(n,2) = Sum_{k = 1..n} (2^(k - 1) -1) * A060016(n,k).

%e Triangle begins:

%e 1

%e 0 1

%e 0 1 0

%e 0 2 1 0

%e 0 2 1 0 0

%e 0 3 2 0 0 0

%e 0 4 5 1 0 0 0

%e 0 5 6 1 0 0 0 0

%e 0 6 9 2 0 0 0 0 0

%e 0 8 13 3 0 0 0 0 0 0

%e 0 10 23 10 1 0 0 0 0 0 0

%e 0 12 27 11 1 0 0 0 0 0 0 0

%e 0 15 40 19 2 0 0 0 0 0 0 0 0

%e Row n = 8 counts the following set partitions:

%e {{8}} {{1},{7}} {{1},{2},{5}}

%e {{3,5}} {{2},{6}} {{1},{3},{4}}

%e {{2,6}} {{3},{5}}

%e {{1,7}} {{1},{3,4}}

%e {{1,3,4}} {{1},{2,5}}

%e {{1,2,5}} {{2},{1,5}}

%e {{3},{1,4}}

%e {{4},{1,3}}

%e {{5},{1,2}}

%p b:= proc(n, i, k) option remember; `if`(i*(i+1)/2<n, 0,

%p `if`(n=0, x^k, b(n, i-1, k) +(t-> k*

%p b(n-i, t, k)+b(n-i, t, k+1))(min(n-i, i-1))))

%p end:

%p T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n$2, 0)):

%p seq(T(n), n=0..15); # _Alois P. Heinz_, Dec 29 2019

%t ppl[n_,k_]:=Switch[k,0,{n},1,IntegerPartitions[n],_,Join@@Table[Union[Sort/@Tuples[ppl[#,k-1]&/@ptn]],{ptn,IntegerPartitions[n]}]];

%t Table[Length[Select[ppl[n,2],Length[#]==k&&And[UnsameQ@@#,UnsameQ@@Join@@#]&]],{n,0,10},{k,0,n}]

%t (* Second program: *)

%t b[n_, i_, k_] := b[n, i, k] = If[i(i+1)/2 < n, 0, If[n == 0, x^k, b[n, i-1, k] + Function[t, k*b[n-i, t, k] + b[n-i, t, k + 1]][Min[n-i, i-1]]]];

%t T[n_] := PadRight[CoefficientList[b[n, n, 0], x], n + 1];

%t T /@ Range[0, 15] // Flatten (* _Jean-François Alcover_, May 16 2021, after _Alois P. Heinz_ *)

%o (PARI)

%o A(n)={my(v=Vec(prod(k=1, n, 1 + x^k*y + O(x*x^n)))); vector(#v, n, my(p=v[n]); vector(n, k, sum(i=k, n, polcoef(p,i-1)*stirling(i-1, k-1, 2))))}

%o {my(T=A(12)); for(n=1, #T, print(T[n]))} \\ _Andrew Howroyd_, Dec 29 2019

%Y Row sums are A294617.

%Y Column k = 1 is A000009 (n > 0).

%Y Cf. A000110, A008277, A050342, A060016, A072706, A270995, A271619, A279375, A279785, A326701, A330459, A330462, A330463, A330759.

%K nonn,tabl

%O 0,8

%A _Gus Wiseman_, Dec 18 2019

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 July 19 05:59 EDT 2024. Contains 374389 sequences. (Running on oeis4.)