login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A287213 Number T(n,k) of set partitions of [n] such that the maximal absolute difference between consecutive elements within a block equals k; triangle T(n,k), n>=0, 0<=k<=max(n-1,0), read by rows. 15
1, 1, 1, 1, 1, 3, 1, 1, 7, 5, 2, 1, 15, 18, 13, 5, 1, 31, 57, 61, 38, 15, 1, 63, 169, 248, 215, 129, 52, 1, 127, 482, 935, 1061, 836, 495, 203, 1, 255, 1341, 3368, 4835, 4789, 3573, 2108, 877, 1, 511, 3669, 11777, 20973, 25430, 22986, 16657, 9831, 4140 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
COMMENTS
The maximal absolute difference is assumed to be zero if there is no block with consecutive elements.
T(n,k) is defined for all n,k >= 0. The triangle contains only the positive terms. T(n,k) = 0 if k>=n and k>0.
LINKS
FORMULA
T(n,k) = A287214(n,k) - A287214(n,k-1) for k>0, T(n,0) = 1.
EXAMPLE
T(4,0) = 1: 1|2|3|4.
T(4,1) = 7: 1234, 123|4, 12|34, 12|3|4, 1|234, 1|23|4, 1|2|34.
T(4,2) = 5: 124|3, 134|2, 13|24, 13|2|4, 1|24|3.
T(4,3) = 2: 14|23, 14|2|3.
Triangle T(n,k) begins:
1;
1;
1, 1;
1, 3, 1;
1, 7, 5, 2;
1, 15, 18, 13, 5;
1, 31, 57, 61, 38, 15;
1, 63, 169, 248, 215, 129, 52;
1, 127, 482, 935, 1061, 836, 495, 203;
MAPLE
b:= proc(n, k, l) option remember; `if`(n=0, 1, b(n-1, k, map(x->
`if`(x-n>=k, [][], x), [l[], n]))+add(b(n-1, k, sort(map(x->
`if`(x-n>=k, [][], x), subsop(j=n, l)))), j=1..nops(l)))
end:
A:= (n, k)-> b(n, min(k, n-1), []):
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[0, _, _] = 1; b[n_, k_, l_] := b[n, k, l] =b[n - 1, k, If[# - n >= k, Nothing, #]& /@ Append[l, n]] + Sum[b[n - 1, k, Sort[If[# - n >= k, Nothing, #]& /@ ReplacePart[l, j -> n]]], {j, 1, Length[l]}];
A[n_, k_] := b[n, Min[k, n - 1], {}];
T[n_, k_] := A[n, k] - If[k == 0, 0, A[n, k - 1]];
Table[Table[T[n, k], {k, 0, Max[n - 1, 0]}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Apr 30 2018, after Alois P. Heinz *)
CROSSREFS
Row sums and T(n+2,n+1) give A000110.
T(2n,n) gives A294024.
Sequence in context: A343237 A094507 A065625 * A284631 A154341 A348863
KEYWORD
nonn,tabf
AUTHOR
Alois P. Heinz, May 21 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 16 16:20 EDT 2024. Contains 374358 sequences. (Running on oeis4.)