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.

A332872 Number of ordered set partitions of {1..n} where no element of any block is greater than any element of a non-adjacent consecutive block.

Original entry on oeis.org

1, 1, 3, 10, 34, 116, 396, 1352, 4616, 15760
Offset: 0

Views

Author

Gus Wiseman, Mar 06 2020

Keywords

Comments

After initial terms, first differs from A291292 at a(7) = 1352, A291292(8) = 1353.
Conjectured to be the same as A007052, shifted right once.

Examples

			The a(1) = 1 through a(3) = 10 ordered set partitions:
  {{1}}  {{1,2}}    {{1,2,3}}
         {{1},{2}}  {{1},{2,3}}
         {{2},{1}}  {{1,2},{3}}
                    {{1,3},{2}}
                    {{2},{1,3}}
                    {{2,3},{1}}
                    {{3},{1,2}}
                    {{1},{2},{3}}
                    {{1},{3},{2}}
                    {{2},{1},{3}}
		

Crossrefs

Row sums of A332673.
Set partitions are A000110.
Ordered set-partitions are A000670.
Unimodal sequences covering an initial interval are A007052.

Programs

  • Mathematica
    sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
    Table[Length[Select[Join@@Permutations/@sps[Range[n]],!MatchQ[#,{_,{_,a_,_},,{_,b_,_},_}/;a>b]&]],{n,0,5}]