A326335 Number of set partitions of {1..n} whose nesting blocks are connected.
1, 1, 1, 1, 2, 6, 21, 86, 394, 1974, 10696
Offset: 0
Examples
The a(0) = 1 through a(6) = 21 set partitions: {} {1} {12} {123} {1234} {12345} {123456} {14}{23} {125}{34} {1236}{45} {134}{25} {1245}{36} {14}{235} {125}{346} {145}{23} {1256}{34} {15}{234} {126}{345} {134}{256} {1345}{26} {1346}{25} {136}{245} {14}{2356} {145}{236} {1456}{23} {146}{235} {15}{2346} {156}{234} {16}{2345} {15}{26}{34} {16}{23}{45} {16}{24}{35} {16}{25}{34}
Crossrefs
Programs
-
Mathematica
nesXQ[stn_]:=MatchQ[stn,{_,{_,x_,y_,_},_,{_,z_,t_,_},_}/;x
0]&]},If[c=={},s,csm[Sort[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]]; nestcmpts[stn_]:=csm[Union[List/@stn,Select[Subsets[stn,{2}],nesXQ]]]; sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}]; Table[Length[Select[sps[Range[n]],Length[nestcmpts[#]]<=1&]],{n,0,5}]
Comments