login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287416 Number T(n,k) of set partitions of [n] such that the maximal value of all absolute differences between least elements of consecutive blocks and between consecutive elements within the blocks equals k; triangle T(n,k), n>=0, 0<=k<=max(n-1,0), read by rows. 5
1, 1, 0, 2, 0, 3, 2, 0, 4, 8, 3, 0, 5, 22, 19, 6, 0, 6, 52, 81, 48, 16, 0, 7, 114, 289, 267, 147, 53, 0, 8, 240, 941, 1250, 968, 529, 204, 0, 9, 494, 2894, 5310, 5469, 3919, 2174, 878, 0, 10, 1004, 8601, 21256, 28083, 25326, 17593, 9961, 4141 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

The maximal value is assumed to be zero if there are no consecutive blocks and no consecutive elements.

T(n,k) is defined for all n,k >= 0. The triangle contains only the terms for k <= max(n-1,0). T(n,k) = 0 if k>=n and k>0.

LINKS

Alois P. Heinz, Rows n = 0..23, flattened

Wikipedia, Partition of a set

FORMULA

T(n,k) = A287417(n,k) - A287417(n,k-1) for k>0, T(n,0) = 1.

T(n+2,n+1) = 1 + A000110(n).

EXAMPLE

T(4,1) = 4: 1234, 1|234, 1|2|34, 1|2|3|4.

T(4,2) = 8: 124|3, 12|34, 12|3|4, 134|2, 13|24, 13|2|4, 1|23|4, 1|24|3.

T(4,3) = 3: 123|4, 14|23, 14|2|3.

T(5,3) = 19: 1235|4, 123|45, 123|4|5, 125|34, 125|3|4, 134|25, 134|2|5, 13|24|5, 13|25|4, 145|23, 14|235, 14|23|5, 1|234|5, 145|2|3, 14|25|3, 14|2|35, 14|2|3|5, 1|25|34, 1|25|3|4.

Triangle T(n,k) begins:

1;

1;

0, 2;

0, 3,   2;

0, 4,   8,   3;

0, 5,  22,  19,    6;

0, 6,  52,  81,   48,  16;

0, 7, 114, 289,  267, 147,  53;

0, 8, 240, 941, 1250, 968, 529, 204;

MAPLE

b:= proc(n, k, l, t) option remember; `if`(n<1, 1, `if`(t-n>k, 0,

       b(n-1, k, map(x-> `if`(x-n>=k, [][], x), [l[], n]), n)) +add(

       b(n-1, k, sort(map(x-> `if`(x-n>=k, [][], x), subsop(j=n, l))),

       `if`(t-n>k, infinity, t)), j=1..nops(l)))

    end:

A:= (n, k)-> b(n, min(k, n-1), [], n):

T:= (n, k)-> A(n, k)-`if`(k=0, 0, A(n, k-1)):

seq(seq(T(n, k), k=0..max(n-1, 0)), n=0..12);

MATHEMATICA

b[n_, k_, l_, t_] := b[n, k, l, t] = If[n < 1, 1, If[t - n > k, 0, b[n - 1, k, If[# - n >= k, Nothing, #]& /@ Append[l, n], n]] + Sum[b[n - 1, k, Sort[If[# - n >= k, Nothing, #]& /@ ReplacePart[l, j -> n]], If[t - n > k, Infinity, t]], {j, 1, Length[l]}]];

A[n_, k_] := b[n, Min[k, n - 1], {}, n];

T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];

Table[T[n, k], {n, 0, 12}, { k, 0, Max[n - 1, 0]}] // Flatten (* Jean-Fran├žois Alcover, May 24 2018, translated from Maple *)

CROSSREFS

Columns k=1-2 give: A001477 (for n>1), A005803 (for n>0).

Row sums give A000110.

Cf. A287213, A287215, A287417, A287640.

Sequence in context: A154559 A269133 A143324 * A097418 A154752 A271868

Adjacent sequences:  A287413 A287414 A287415 * A287417 A287418 A287419

KEYWORD

nonn,tabf

AUTHOR

Alois P. Heinz, May 24 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 19 05:13 EDT 2018. Contains 313844 sequences. (Running on oeis4.)