A303697
Number T(n,k) of permutations p of [n] whose difference between sum of up-jumps and sum of down-jumps equals k; triangle T(n,k), n>=0, min(0,1-n)<=k<=max(0,n-1), read by rows.
Original entry on oeis.org
1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 1, 4, 5, 4, 5, 4, 1, 1, 11, 19, 19, 20, 19, 19, 11, 1, 1, 26, 82, 100, 101, 100, 101, 100, 82, 26, 1, 1, 57, 334, 580, 619, 619, 620, 619, 619, 580, 334, 57, 1, 1, 120, 1255, 3394, 4339, 4420, 4421, 4420, 4421, 4420, 4339, 3394, 1255, 120, 1
Offset: 0
Triangle T(n,k) begins:
: 1 ;
: 1 ;
: 1, 0, 1 ;
: 1, 1, 2, 1, 1 ;
: 1, 4, 5, 4, 5, 4, 1 ;
: 1, 11, 19, 19, 20, 19, 19, 11, 1 ;
: 1, 26, 82, 100, 101, 100, 101, 100, 82, 26, 1 ;
: 1, 57, 334, 580, 619, 619, 620, 619, 619, 580, 334, 57, 1 ;
Cf.
A000295,
A001720,
A005165,
A008292,
A081285,
A153229,
A291680,
A291684,
A291722,
A316292,
A316293,
A321316.
-
b:= proc(u, o) option remember; expand(`if`(u+o=0, 1,
add(b(u-j, o+j-1)*x^(-j), j=1..u)+
add(b(u+j-1, o-j)*x^( j), j=1..o)))
end:
T:= n-> (p-> seq(coeff(p, x, i), i=ldegree(p)..degree(p)))(
`if`(n=0, 1, add(b(j-1, n-j), j=1..n))):
seq(T(n), n=0..12);
-
b[u_, o_] := b[u, o] = Expand[If[u+o == 0, 1,
Sum[b[u-j, o+j-1] x^-j, {j, 1, u}] +
Sum[b[u+j-1, o-j] x^j, {j, 1, o}]]];
T[0] = {1};
T[n_] := x^n Sum[b[j-1, n-j], {j, 1, n}] // CoefficientList[#, x]& // Rest;
T /@ Range[0, 12] // Flatten (* Jean-François Alcover, Feb 20 2021, after Alois P. Heinz *)
A291685
Number of permutations p of [n] such that 0p has a nonincreasing jump sequence.
Original entry on oeis.org
1, 1, 2, 5, 16, 52, 189, 683, 2621, 10061, 40031, 159201, 650880, 2657089, 11062682, 46065143, 194595138, 822215099, 3513875245, 15021070567, 64785349064, 279575206629, 1214958544538, 5283266426743, 23106210465665, 101120747493793, 444614706427665
Offset: 0
a(3) = 5 = 6 - 1 counts all permutations of {1,2,3} except 132 with jump sequence 1, 2, 1.
Row sums and main diagonal (shifted) of
A291684.
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, j), j=1..min(t, u))+
add(b(u+j-1, o-j, j), j=1..min(t, o)))
end:
a:= n-> b(0, n$2):
seq(a(n), n=0..30);
-
b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1,
Sum[b[u-j, o+j-1, j], {j, Min[t, u]}]+
Sum[b[u+j-1, o-j, j], {j, Min[t, o]}]];
a[n_] := b[0, n, n];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Aug 30 2021, after Alois P. Heinz *)
A303204
Number of permutations p of [n] such that 0p has a nonincreasing jump sequence beginning with ceiling(n/2).
Original entry on oeis.org
1, 1, 1, 2, 5, 12, 36, 98, 327, 988, 3392, 10872, 38795, 129520, 469662, 1609176, 5935728, 20786804, 77416352, 274792342, 1035050705, 3719296036, 14094000938, 51119572738, 195075365778, 712918642042, 2734475097609, 10055531355652, 38747262233793
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(sort([u-j, o+j-1])[], j), j=1..min(t, u))+
add(b(sort([u+j-1, o-j])[], j), j=1..min(t, o)))
end:
a:= n-> `if`(n=0, 1, (j-> b(0, n, j)-b(0, n, j-1))(ceil(n/2))):
seq(a(n), n=0..30);
-
b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1,
Sum[b[Sequence @@ Sort[{u-j, o+j-1}], j], {j, Min[t, u]}]+
Sum[b[Sequence @@ Sort[{u+j-1, o-j}], j], {j, Min[t, o]}]];
a[n_] := If[n == 0, 1,
Function[j, b[0, n, j] - b[0, n, j-1]][Ceiling[n/2]]];
Table[a[n], {n, 0, 30}]; (* Jean-François Alcover, Aug 30 2021, after Alois P. Heinz *)
A291688
Number of permutations p of [2n] such that 0p has a nonincreasing jump sequence beginning with n.
Original entry on oeis.org
1, 1, 5, 36, 327, 3392, 38795, 469662, 5935728, 77416352, 1035050705, 14094000938, 195075365778, 2734475097609, 38747262233793, 554199475506095, 7990492729051526, 115995691148658656, 1694340616136589743, 24882428969673439384, 367160435328847044586
Offset: 0
a(2) = 5: 2134, 2314, 2341, 2413, 2431.
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, j), j=1..min(t, u))+
add(b(u+j-1, o-j, j), j=1..min(t, o)))
end:
a:= n-> b(0, 2*n, n)-`if`(n=0, 0, b(0, 2*n, n-1)):
seq(a(n), n=0..25);
-
b[u_, o_, t_] := b[u, o, t] = If[u + o == 0, 1,
Sum[b[u - j, o + j - 1, j], {j, Min[t, u]}] +
Sum[b[u + j - 1, o - j, j], {j, Min[t, o]}]];
a[n_] := b[0, 2n, n] - If[n == 0, 0, b[0, 2n, n - 1]];
Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Aug 30 2021, after Alois P. Heinz *)
A303203
Number of permutations p of [2n+1] such that 0p has a nonincreasing jump sequence beginning with n+1.
Original entry on oeis.org
1, 2, 12, 98, 988, 10872, 129520, 1609176, 20786804, 274792342, 3719296036, 51119572738, 712918642042, 10055531355652, 143287150725298, 2058368140071146, 29796314629826814, 434051906728752164, 6359063811707227298, 93635249115751389952, 1385028309353547034876
Offset: 0
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(sort([u-j, o+j-1])[], j), j=1..min(t, u))+
add(b(sort([u+j-1, o-j])[], j), j=1..min(t, o)))
end:
a:= n-> b(0, 2*n+1, n+1)-b(0, 2*n+1, n):
seq(a(n), n=0..25);
-
b[u_, o_, t_] := b[u, o, t] = If[u+o == 0, 1,
Sum[b[u-j, o+j-1, j], {j, 1, Min[t, u]}] +
Sum[b[u+j-1, o-j, j], {j, 1, Min[t, o]}]];
a[n_] := b[0, 2n+1, n+1] - b[0, 2n+1, n];
a /@ Range[0, 25] (* Jean-François Alcover, Sep 01 2021, after Alois P. Heinz *)
A292168
Number of permutations p of [n] such that 0p has a nonincreasing jump sequence beginning with two.
Original entry on oeis.org
1, 2, 5, 9, 17, 31, 57, 101, 185, 333, 599, 1089, 1975, 3563, 6505, 11829, 21455, 39257, 71641, 130403, 239193, 437677, 799127, 1468777, 2693853, 4930871, 9079127, 16684737, 30605159, 56441227, 103900161, 190934999, 352606721, 650072239, 1196527319, 2212404279
Offset: 2
a(2) = 1: 21.
a(3) = 2: 213, 231.
a(4) = 5: 2134, 2314, 2341, 2413, 2431.
a(5) = 9: 21345, 23145, 23415, 23451, 24135, 24153, 24315, 24351, 24531.
a(6) = 17: 213456, 231456, 234156, 234516, 234561, 241356, 241536, 241563, 243156, 243516, 243561, 245316, 245361, 245631, 246315, 246351, 246531.
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, j), j=1..min(t, u))+
add(b(u+j-1, o-j, j), j=1..min(t, o)))
end:
a:= n-> b(0, n, 2)-b(0, n, 1):
seq(a(n), n=2..50);
A292169
Number of permutations p of [n] such that 0p has a nonincreasing jump sequence beginning with three.
Original entry on oeis.org
2, 5, 12, 36, 81, 174, 413, 889, 1870, 4031, 8490, 17580, 36647, 75801, 154676, 316873, 646614, 1309277, 2653548, 5358828, 10786403, 21697201, 43539382, 87208388, 174392929, 348359875, 694913277, 1384281163, 2755398784, 5476741024, 10878139055, 21590446589
Offset: 3
a(3) = 2: 312, 321.
a(4) = 5: 3124, 3142, 3214, 3241, 3421
a(5) = 12: 31245, 31425, 31452, 32145, 32415, 32451, 34215, 34251, 34521, 35214, 35241, 35421.
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, j), j=1..min(t, u))+
add(b(u+j-1, o-j, j), j=1..min(t, o)))
end:
a:= n-> b(0, n, 3)-b(0, n, 2):
seq(a(n), n=3..50);
A292170
Number of permutations p of [n] such that 0p has a nonincreasing jump sequence beginning with four.
Original entry on oeis.org
5, 14, 36, 98, 327, 788, 1890, 4523, 11483, 27209, 61983, 139568, 323531, 730494, 1618531, 3543509, 7851556, 17204960, 37331967, 80312122, 173234350, 372183777, 794587802, 1686743710, 3579347697, 7578433425, 15984149737, 33580700124, 70467297970, 147600492302
Offset: 4
a(4) = 5: 4123, 4132, 4213, 4231, 4321.
a(5) = 14: 41235, 41325, 41352, 41523, 41532, 42135, 42315, 42351, 42513, 42531, 43215, 43251, 43521, 45321.
a(6) = 36: 412356, 413256, 413526, 413562, 413625, 413652, 415236, 415263, 415326, 415362, 415632, 421356, 423156, 423516, 423561, 425136, 425163, 425316, 425361, 425631, 432156, 432516, 432561, 435216, 435261, 435621, 453216, 453261, 453621, 456321, 463125, 463152, 463215, 463251, 463521, 465321.
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, j), j=1..min(t, u))+
add(b(u+j-1, o-j, j), j=1..min(t, o)))
end:
a:= n-> b(0, n, 4)-b(0, n, 3):
seq(a(n), n=4..50);
A292171
Number of permutations p of [n] such that 0p has a nonincreasing jump sequence beginning with five.
Original entry on oeis.org
16, 47, 117, 327, 988, 3392, 8739, 21372, 53596, 135791, 362528, 887060, 2117839, 4997836, 11731828, 28229247, 66196942, 152418888, 347010327, 784580873, 1794241712, 4064606075, 9109879761, 20253187230, 44774963928, 99368298849, 219638865759, 482519177252
Offset: 5
a(5) = 16: 51234, 51324, 51342, 51423, 51432, 52134, 52314, 52341, 52413, 52431, 53124, 53142, 53214, 53241, 53421, 54321.
a(6) = 47: 512346, 513246, 513426, 513462, 513624, ..., 543216, 543261, 543621, 546321, 564321.
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, j), j=1..min(t, u))+
add(b(u+j-1, o-j, j), j=1..min(t, o)))
end:
a:= n-> b(0, n, 5)-b(0, n, 4):
seq(a(n), n=5..50);
A292172
Number of permutations p of [n] such that 0p has a nonincreasing jump sequence beginning with six.
Original entry on oeis.org
52, 166, 425, 1116, 3392, 10872, 38795, 102634, 260334, 651704, 1707641, 4477199, 12277412, 30970764, 75239813, 181934538, 440594545, 1063081418, 2625678546, 6286974074, 14803016600, 34534616815, 80129926919, 185059517397, 431845849360, 997735570874
Offset: 6
a(6) = 52: 612345, 613245, 613425, 613452, 613524, 613542, 614235, 614253, 614325, 614352, 614532, 615234, 615243, 615324, 615342, 615432, 621345, 623145, 623415, 623451, 624135, 624153, 624315, 624351, 624531, 625134, 625143, 625314, 625341, 625431, 631245, 631425, 631452, 632145, 632415, 632451, 634215, 634251, 634521, 635214, 635241, 635421, 642135, 642315, 642351, 642513, 642531, 643215, 643251, 643521, 645321, 654321.
-
b:= proc(u, o, t) option remember; `if`(u+o=0, 1,
add(b(u-j, o+j-1, j), j=1..min(t, u))+
add(b(u+j-1, o-j, j), j=1..min(t, o)))
end:
a:= n-> b(0, n, 6)-b(0, n, 5):
seq(a(n), n=6..50);
Showing 1-10 of 14 results.
Comments