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!)
A214257 Number A(n,k) of compositions of n where the difference between largest and smallest parts is <= k; square array A(n,k), n>=0, k>=0, read by antidiagonals. 8
1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 1, 1, 2, 4, 6, 2, 1, 1, 2, 4, 8, 11, 4, 1, 1, 2, 4, 8, 14, 15, 2, 1, 1, 2, 4, 8, 16, 27, 27, 4, 1, 1, 2, 4, 8, 16, 30, 47, 39, 3, 1, 1, 2, 4, 8, 16, 32, 59, 88, 63, 4, 1, 1, 2, 4, 8, 16, 32, 62, 111, 158, 100, 2 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
FORMULA
T(n,k) = Sum_{i=0..k} A214258(n,i).
EXAMPLE
A(3,0) = 2: [3], [1,1,1].
A(4,1) = 6: [4], [2,2], [2,1,1], [1,2,1], [1,1,2], [1,1,1,1].
A(5,1) = 8: [5], [3,2], [2,3], [2,2,1], [2,1,2], [2,1,1,1], [1,2,2], [1,2,1,1], [1,1,2,1], [1,1,1,2], [1,1,1,1,1],
A(5,2) = 14: [5], [3,2], [3,1,1], [2,3], [2,2,1], [2,1,2], [2,1,1,1], [1,3,1], [1,2,2], [1,2,1,1], [1,1,3], [1,1,2,1], [1,1,1,2], [1,1,1,1,1].
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
2, 2, 2, 2, 2, 2, 2, 2, ...
2, 4, 4, 4, 4, 4, 4, 4, ...
3, 6, 8, 8, 8, 8, 8, 8, ...
2, 11, 14, 16, 16, 16, 16, 16, ...
4, 15, 27, 30, 32, 32, 32, 32, ...
2, 27, 47, 59, 62, 64, 64, 64, ...
MAPLE
b:= proc(n, k, s, t) option remember;
`if`(n<0, 0, `if`(n=0, 1, add(b(n-j, k,
min(s, j), max(t, j)), j=max(1, t-k+1)..s+k-1)))
end:
A:= (n, k)-> `if`(n=0, 1, add(b(n-j, k+1, j, j), j=1..n)):
seq(seq(A(n, d-n), n=0..d), d=0..11);
# second Maple program:
b:= proc(n, s, t) option remember; `if`(n=0, x^(t-s),
add(b(n-j, min(s, j), max(t, j)), j=1..n))
end:
T:= (n, k)-> coeff(b(n$2, 0), x, k):
A:= proc(n, k) option remember; `if`(k<0, 0,
`if`(k>n, A(n$2), A(n, k-1)+T(n, k)))
end:
seq(seq(A(n, d-n), n=0..d), d=0..11); # Alois P. Heinz, Jan 05 2019
MATHEMATICA
b[n_, k_, s_, t_] := b[n, k, s, t] = If[n < 0, 0, If[n == 0, 1, Sum [b[n - j, k, Min[s, j], Max[t, j]], {j, Max[1, t - k + 1], s + k - 1}]]]; A[n_, k_] := If[n == 0, 1, Sum[b[n - j, k + 1, j, j], {j, 1, n}]]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 11}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)
CROSSREFS
Columns k=0-1 give: A000005, A072951.
Main diagonal gives: A011782.
Sequence in context: A103444 A099172 A214246 * A214248 A152719 A107044
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Jul 08 2012
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 April 24 07:44 EDT 2024. Contains 371922 sequences. (Running on oeis4.)