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.

A336140 Number of ways to choose a set partition of the parts of a strict integer composition of n.

This page as a plain text file.
%I A336140 #21 May 21 2021 04:17:09
%S A336140 1,1,1,5,5,9,39,43,73,107,497,531,951,1345,2125,8789,9929,16953,24723,
%T A336140 38347,52717,219131,240461,419715,600075,938689,1278409,1928453,
%U A336140 6853853,7815657,13205247,19051291,29325121,40353995,60084905,80722899,277280079,312239953
%N A336140 Number of ways to choose a set partition of the parts of a strict integer composition of n.
%C A336140 A strict composition of n is a finite sequence of distinct positive integers summing to n.
%H A336140 Alois P. Heinz, <a href="/A336140/b336140.txt">Table of n, a(n) for n = 0..5000</a>
%F A336140 a(n) = Sum_{k = 0..n} A000110(k) * A072574(n,k) = Sum_{k = 0..n} k! * A000110(k) * A008289(n,k).
%p A336140 b:= proc(n, i, p) option remember; `if`(i*(i+1)/2<n, 0,
%p A336140       `if`(n=0, combinat[bell](p)*p!, b(n, i-1, p)+
%p A336140          b(n-i, min(n-i, i-1), p+1)))
%p A336140     end:
%p A336140 a:= n-> b(n$2, 0):
%p A336140 seq(a(n), n=0..40);  # _Alois P. Heinz_, Jul 30 2020
%t A336140 Table[Sum[BellB[Length[ctn]],{ctn,Join@@Permutations/@Select[ IntegerPartitions[n],UnsameQ@@#&]}],{n,0,10}]
%t A336140 (* Second program: *)
%t A336140 b[n_, i_, p_] := b[n, i, p] = If[i(i+1)/2 < n, 0, If[n == 0,
%t A336140      BellB[p]*p!, b[n, i-1, p] + b[n-i, Min[n-i, i-1], p+1]]];
%t A336140 a[n_] := b[n, n, 0];
%t A336140 a /@ Range[0, 40] (* _Jean-François Alcover_, May 21 2021, after _Alois P. Heinz_ *)
%Y A336140 Set partitions are A000110.
%Y A336140 Strict compositions are A032020.
%Y A336140 Set partitions of binary indices are A050315.
%Y A336140 Set partitions of strict partitions are A294617.
%Y A336140 Cf. A000009, A001055, A008289, A035470, A063834, A072574, A137341, A279375.
%K A336140 nonn
%O A336140 0,4
%A A336140 _Gus Wiseman_, Jul 16 2020