OFFSET
0,3
COMMENTS
An interval such as {3,4,5} is a set with all differences of adjacent elements equal to 1.
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..200
EXAMPLE
The a(1) = 1 through a(3) = 9 set multipartitions (multisets of sets):
{{1}} {{1,2}} {{1,2,3}}
{{1},{1}} {{1},{1,2}}
{{1},{2}} {{1},{2,3}}
{{2},{1,2}}
{{3},{1,2}}
{{1},{1},{1}}
{{1},{1},{2}}
{{1},{2},{2}}
{{1},{2},{3}}
MATHEMATICA
allnorm[n_]:=If[n<=0, {{}}, Function[s, Array[Count[s, y_/; y<=#]+1&, n]]/@Subsets[Range[n-1]+1]];
sps[{}]:={{}}; sps[set:{i_, ___}]:=Join@@Function[s, Prepend[#, s]&/@sps[Complement[set, s]]]/@Cases[Subsets[set], {i, ___}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
chQ[y_]:=Or[Length[y]<=1, Union[Differences[y]]=={1}];
Table[Length[Select[Join@@mps/@allnorm[n], And@@chQ/@#&]], {n, 0, 5}]
PROG
(PARI)
EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}
R(n, k) = {EulerT(vector(n, j, max(0, 1+k-j)))}
seq(n) = {my(A=1+O(y*y^n)); for(k = 1, n, A += x^k*(1 + y*Ser(R(n, k), y) - polcoef(1/(1 - x*A) + O(x^(k+2)), k+1))); Vec(subst(A, x, 1))} \\ Andrew Howroyd, Jan 01 2023
CROSSREFS
A011782 counts multisets covering an initial interval.
KEYWORD
nonn
AUTHOR
Gus Wiseman, Sep 08 2022
EXTENSIONS
Terms a(10) and beyond from Andrew Howroyd, Jan 01 2023
STATUS
approved