A386576 Number of anti-runs of length n covering an initial interval of positive integers with strictly decreasing multiplicities.
1, 1, 0, 1, 0, 1, 10, 4, 14, 84, 1136, 967, 3342, 12823, 101762, 1769580
Offset: 0
Examples
The a(7) = 4 anti-runs are: (1,2,1,2,1,2,1) (1,2,1,2,1,3,1) (1,2,1,3,1,2,1) (1,3,1,2,1,2,1)
Crossrefs
Programs
-
Mathematica
seps[ptn_,fir_]:=If[Total[ptn]==1,{{fir}},Join@@Table[Prepend[#,fir]&/@seps[MapAt[#-1&,ptn,fir],nex],{nex,Select[DeleteCases[Range[Length[ptn]],fir],ptn[[#]]>0&]}]]; seps[ptn_]:=If[Total[ptn]==0,{{}},Join@@(seps[ptn,#]&/@Range[Length[ptn]])]; Table[Sum[Length[seps[y]],{y,Select[IntegerPartitions[n],UnsameQ@@#&]}],{n,0,10}]
Comments