A010027
Triangle read by rows: T(n,k) is the number of permutations of [n] having k consecutive ascending pairs (0 <= k <= n-1).
Original entry on oeis.org
1, 1, 1, 1, 2, 3, 1, 3, 9, 11, 1, 4, 18, 44, 53, 1, 5, 30, 110, 265, 309, 1, 6, 45, 220, 795, 1854, 2119, 1, 7, 63, 385, 1855, 6489, 14833, 16687, 1, 8, 84, 616, 3710, 17304, 59332, 133496, 148329, 1, 9, 108, 924, 6678, 38934, 177996, 600732, 1334961, 1468457, 1
Offset: 1
Triangle starts:
1;
1, 1;
1, 2, 3;
1, 3, 9, 11;
1, 4, 18, 44, 53;
1, 5, 30, 110, 265, 309;
1, 6, 45, 220, 795, 1854, 2119;
1, 7, 63, 385, 1855, 6489, 14833, 16687;
1, 8, 84, 616, 3710, 17304, 59332, 133496, 148329;
1, 9, 108, 924, 6678, 38934, 177996, 600732, 1334961, 1468457;
...
For n=3, the permutations 123, 132, 213, 231, 312, 321 have respectively 2,0,0,1,1,0 consecutive ascending pairs, so row 3 of the triangle is 3,2,1. - _N. J. A. Sloane_, Apr 12 2014
In the alternative definition, T(4,2)=3 because we have 234.1, 4.123, and 34.12 (the blocks are separated by dots). - _Emeric Deutsch_, May 16 2010
- F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
A289632 is the analogous triangle with the additional restriction that all consecutive pairs must be isolated, i.e., must not be back-to-back to form longer consecutive sequences.
-
U := proc (n, k) options operator, arrow: factorial(k+1)*binomial(n, k)*(sum((-1)^i/factorial(i), i = 0 .. k+1))/n end proc: for n to 10 do seq(U(n, k), k = 1 .. n) end do; # yields sequence in triangular form; # Emeric Deutsch, May 15 2010
-
t[n_, k_] := Binomial[n, k]*Subfactorial[k+1]/n; Table[t[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Jan 07 2014, after Emeric Deutsch *)
T[0,0]:=0; T[1,1]:=1; T[n_,n_]:=T[n,n]=(n-1)T[n-1,n-1]+(n-2)T[n-2,n-2]; T[n_,k_]:=T[n,k]=T[n-1,k] (n-1)/(n-k); Flatten@Table[T[n,k],{n,1,10},{k,1,n}] (* Oliver Seipel, Dec 01 2024 *)
Original definition from David, Kendall and Barton restored by
N. J. A. Sloane, Apr 12 2014
A123513
Triangle read by rows: T(n,k) is the number of permutations of [n] having k small descents (n >= 1; 0 <= k <= n-1). A small descent in a permutation (x_1,x_2,...,x_n) is a position i such that x_i - x_(i+1) = 1.
Original entry on oeis.org
1, 1, 1, 3, 2, 1, 11, 9, 3, 1, 53, 44, 18, 4, 1, 309, 265, 110, 30, 5, 1, 2119, 1854, 795, 220, 45, 6, 1, 16687, 14833, 6489, 1855, 385, 63, 7, 1, 148329, 133496, 59332, 17304, 3710, 616, 84, 8, 1, 1468457, 1334961, 600732, 177996, 38934, 6678, 924, 108, 9, 1
Offset: 1
Triangle starts:
1;
1, 1;
3, 2, 1;
11, 9, 3, 1;
53, 44, 18, 4, 1;
309, 265, 110, 30, 5, 1;
2119, 1854, 795, 220, 45, 6, 1;
...
T(4,2)=3 because we have 14/3/2, 2/14/3 and 3/2/14 (the unit descents are shown by a /).
T(4,2)=3 because we have 14/3/2, 2/14/3 and 3/2/14 (the small descents are shown by a /).
- Ch. A. Charalambides, Enumerative Combinatorics, Chapman & Hall/CRC, Boca Raton, Florida, 2002, p. 179, Table 5.4 for S_{n,k} (without row n=1 and column k=0).
- F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263 (Table 7.5.1).
- Alois P. Heinz, Rows n = 1..150, flattened
- Bhadrachalam Chitturi and Krishnaveni K S, Adjacencies in Permutations, arXiv preprint arXiv:1601.04469 [cs.DM], 2016. See Table 0.
- FindStat - Combinatorial Statistic Finder, The number of adjacencies of a permutation
- Sergey Kitaev and Philip B. Zhang, Distributions of mesh patterns of short lengths, arXiv:1811.07679 [math.CO], 2018.
- J. Liese and J. Remmel, Q-analogues of the number of permutations with k-excedances, PU. M. A. Vol. 21 (2010), No. 2, pp. 285-320 (see E_{n,1}(x) in Table 1 p. 291).
- F. Poussin, Énumération des permutations par nombre de marches, RAIRO, Informatique théorique, 13 no. 3, 1979, p. 251-255.
-
G:=exp(-x+t*x)/(1-x)^2: Gser:=simplify(series(G,x=0,15)): for n from 0 to 10 do P[n+1]:=sort(n!*coeff(Gser,x,n)) od: for n from 1 to 11 do seq(coeff(P[n],t,k),k=0..n-1) od; # yields sequence in triangular form
-
Needs["Combinatorica`"];
Table[Map[Count[#,1]&,Map[Differences,Permutations[n]]]//Distribution,{n,1,10}]//Grid
(* Geoffrey Critzer, Dec 15 2012 *)
T[n_, k_] := (n-1)! SeriesCoefficient[Exp[-x + t x]/(1-x)^2, {x, 0, n-1}, {t, 0, k}];
Table[T[n, k], {n, 1, 10}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, Sep 25 2019 *)
T[1,1]:=1;T[0,1]:=0;T[n_,1]:=T[n,1]=(n-1)T[n-1,1]+(n-2)T[n-2,1];T[n_,k_]:=T[n,k]=T[n-1, k-1](n-1)/(k-1);Flatten@Table[T[n,k],{n,1,10},{k,1,n}] (* Oliver Seipel, Dec 01 2024 *)
A000274
Number of permutations of length n with 2 consecutive ascending pairs.
Original entry on oeis.org
0, 0, 1, 3, 18, 110, 795, 6489, 59332, 600732, 6674805, 80765135, 1057289046, 14890154058, 224497707343, 3607998868005, 61576514013960, 1112225784377144, 21197714949305577, 425131949816628507, 8950146311929021210, 197350726178034917670, 4548464355722328578691
Offset: 1
- F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 210 (divided by 2).
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
a:= n->sum((n-1)!*sum((-1)^k/k!/2, j=1..n-1), k=0..n-1): seq(a(n), n=1..23); # Zerinvary Lajos, May 17 2007
-
Table[Subfactorial[n]*n/2, {n, 2, 20}] (* Zerinvary Lajos, Jul 09 2009 *)
A001260
Number of permutations of length n with 4 consecutive ascending pairs.
Original entry on oeis.org
0, 0, 0, 0, 1, 5, 45, 385, 3710, 38934, 444990, 5506710, 73422855, 1049946755, 16035550531, 260577696015, 4489954146860, 81781307674780, 1570201107355980, 31698434854748604, 671260973394676605, 14879618243581997745
Offset: 1
- F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
a:=n->sum((n+2)!*sum((-1)^k/k!/4!, j=1..n), k=0..n): seq(a(n), n=2..19); # Zerinvary Lajos, May 25 2007
series(hypergeom([2, 5],[],x/(x+1))/(x+1)^5,x=0,30); # Mark van Hoeij, Nov 07 2011
-
Drop[CoefficientList[Series[x^4/4! Exp[-x]/(1 - x)^2, {x, 0, 20}], x] Range[0, 20]!, 4] (* Vaclav Kotesovec, Mar 26 2014 *)
A001261
Number of permutations of length n with 5 consecutive ascending pairs.
Original entry on oeis.org
0, 0, 0, 0, 0, 1, 6, 63, 616, 6678, 77868, 978978, 13216104, 190899423, 2939850914, 48106651593, 833848627248, 15265844099324, 294412707629208, 5966764207952724, 126793739418994416, 2819296088257641741, 65470320271760790078
Offset: 1
- F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
- N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
-
a:=n->sum((n+3)!*sum((-1)^k/k!/5!, j=1..n), k=0..n): seq(a(n), n=2..19); # Zerinvary Lajos, May 25 2007
-
Range[0, 30]! CoefficientList[Series[x^5/5!*Exp[-x]/(1 - x)^2, {x, 0, 40}], x] (* Vincenzo Librandi, Apr 13 2014 *)
Original entry on oeis.org
0, 0, 3, 12, 90, 660, 5565, 51912, 533988, 6007320, 73422855, 969181620, 13744757598, 208462156812, 3367465610145, 57727981888080, 1046800738237320, 20020064118788592, 402756584036805963, 8502638996332570140, 187953072550509445410, 4341715975916768188740
Offset: 0
-
a[n_] := Subfactorial[n]*Binomial[n + 1, 2];
Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Aug 18 2024 *)
A305730
a(n) is the total displacement of all letters in all permutations of n letters with no fixed points.
Original entry on oeis.org
0, 0, 2, 8, 60, 440, 3710, 34608, 355992, 4004880, 48948570, 646121080, 9163171732, 138974771208, 2244977073430, 38485321258720, 697867158824880, 13346709412525728, 268504389357870642, 5668425997555046760, 125302048367006296940, 2894477317277845459160
Offset: 0
n | 1 2 3 4 | the displacement of all letters | a(n)
--+---------+---------------------------------+------
2 | 2 1 | 1 + 1 = 2 | 2
3 | 2 3 1 | 1 + 1 + 2 = 4 | 8
| 3 1 2 | 2 + 1 + 1 = 4 |
4 | 2 1 4 3 | 1 + 1 + 1 + 1 = 4 | 60
| 2 3 4 1 | 1 + 1 + 1 + 3 = 6 |
| 2 4 1 3 | 1 + 2 + 2 + 1 = 6 |
| 3 1 4 2 | 2 + 1 + 1 + 2 = 6 |
| 3 4 1 2 | 2 + 2 + 2 + 2 = 8 |
| 3 4 2 1 | 2 + 2 + 1 + 3 = 8 |
| 4 1 2 3 | 3 + 1 + 1 + 1 = 6 |
| 4 3 1 2 | 3 + 1 + 2 + 2 = 8 |
| 4 3 2 1 | 3 + 1 + 1 + 3 = 8 |
A345462
Triangle T(n,k) (n >= 1, 0 <= k <= n-1) read by rows: number of distinct permutations after k steps of the "first transposition" algorithm.
Original entry on oeis.org
1, 2, 1, 6, 3, 1, 24, 13, 4, 1, 120, 67, 23, 5, 1, 720, 411, 146, 36, 6, 1, 5040, 2921, 1067, 272, 52, 7, 1, 40320, 23633, 8800, 2311, 456, 71, 8, 1, 362880, 214551, 81055, 21723, 4419, 709, 93, 9, 1, 3628800, 2160343, 825382, 224650, 46654, 7720, 1042, 118, 10, 1
Offset: 1
Triangle begins:
1;
2, 1;
6, 3, 1;
24, 13, 4, 1;
120, 67, 23, 5, 1;
720, 411, 146, 36, 6, 1;
5040, 2921, 1067, 272, 52, 7, 1;
40320, 23633, 8800, 2311, 456, 71, 8, 1;
...
- D. E. Knuth, The Art of Computer Programming, Vol. 3 / Sorting and Searching, Addison-Wesley, 1973.
Cf.
A107111 a triangle with some common parts.
-
b:= proc(n, k) option remember; (k+1)!*
binomial(n, k)*add((-1)^i/i!, i=0..k+1)/n
end:
T:= proc(n, k) option remember;
`if`(k=0, n!, T(n, k-1)-b(n, n-k+1))
end:
seq(seq(T(n, k), k=0..n-1), n=1..10); # Alois P. Heinz, Aug 11 2021
-
b[n_, k_] := b[n, k] = (k+1)!*Binomial[n, k]*Sum[(-1)^i/i!, {i, 0, k+1}]/n;
T[n_, k_] := T[n, k] = If[k == 0, n!, T[n, k-1] - b[n, n-k+1]];
Table[Table[T[n, k], {k, 0, n - 1}], {n, 1, 10}] // Flatten (* Jean-François Alcover, Mar 06 2022, after Alois P. Heinz *)
Original entry on oeis.org
6, 24, 180, 1320, 11130, 103824, 1067976, 12014640, 146845710, 1938363240, 27489515196, 416924313624, 6734931220290, 115455963776160, 2093601476474640, 40040128237577184, 805513168073611926
Offset: 3
-
a:=n->sum(n!*sum((-1)^k/k!, j=0..n), k=0..n): seq(a(n)*n, n=2..17); # Zerinvary Lajos, Dec 18 2007
Showing 1-9 of 9 results.
Comments