The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A214268 Number A(n,k) of compositions of n where the difference between largest and smallest parts is <= k and adjacent parts are unequal; square array A(n,k), n>=0, k>=0, read by antidiagonals. 8
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 3, 4, 4, 1, 1, 1, 1, 3, 4, 5, 3, 1, 1, 1, 1, 3, 4, 7, 11, 5, 1, 1, 1, 1, 3, 4, 7, 12, 12, 3, 1, 1, 1, 1, 3, 4, 7, 14, 20, 16, 5, 1, 1, 1, 1, 3, 4, 7, 14, 21, 28, 30, 5, 1 (list; table; graph; refs; listen; history; text; internal format)
OFFSET
0,14
LINKS
Alois P. Heinz, Antidiagonals n = 0..140
EXAMPLE
A(3,0) = 1: [3].
A(4,1) = 2: [4], [1,2,1].
A(5,2) = 5: [5], [3,2], [2,3], [2,1,2], [1,3,1].
A(6,3) = 12: [6], [4,2], [3,2,1], [3,1,2], [2,4], [2,3,1], [2,1,3], [2,1,2,1], [1,4,1], [1,3,2], [1,2,3], [1,2,1,2].
A(7,4) = 21: [7], [5,2], [4,3], [4,2,1], [4,1,2], [3,4], [3,1,3], [3,1,2,1], [2,5], [2,4,1], [2,3,2], [2,1,4], [2,1,3,1], [1,5,1], [1,4,2], [1,3,2,1], [1,3,1,2], [1,2,4], [1,2,3,1], [1,2,1,3], [1,2,1,2,1].
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 1, ...
1, 3, 3, 3, 3, 3, 3, 3, ...
1, 2, 4, 4, 4, 4, 4, 4, ...
1, 4, 5, 7, 7, 7, 7, 7, ...
1, 3, 11, 12, 14, 14, 14, 14, ...
1, 5, 12, 20, 21, 23, 23, 23, ...
MAPLE
b:= proc(n, k, s, t, l) option remember;
`if`(n<0, 0, `if`(n=0, 1, add(`if`(j=l, 0, b(n-j, k,
min(s, j), max(t, j), 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), j=1..n)):
seq(seq(A(n, d-n), n=0..d), d=0..14);
MATHEMATICA
b[n_, k_, s_, t_, l_] := b[n, k, s, t, l] = If[n < 0, 0, If[n == 0, 1, Sum[If[j == l, 0, b[n - j, k, Min[s, j], Max[t, j], 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], {j, 1, n}]]; Table[Table[A [n, d - n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Dec 27 2013, translated from Maple *)
CROSSREFS
Columns k=0, 1 give: A000012, 1+A214270(n).
Main diagonal gives: A003242.
Sequence in context: A256452 A330827 A010276 * A214249 A271714 A049639
KEYWORD
nonn,tabl
AUTHOR
Alois P. Heinz, Jul 09 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 May 13 07:22 EDT 2024. Contains 372498 sequences. (Running on oeis4.)