A180191 Number of permutations of [n] having at least one succession. A succession of a permutation p is a position i such that p(i+1)-p(i) = 1.
0, 1, 3, 13, 67, 411, 2921, 23633, 214551, 2160343, 23897269, 288102189, 3760013027, 52816397219, 794536751217, 12744659120521, 217140271564591, 3916221952414383, 74539067188152941, 1493136645424092773, 31400620285465593339, 691708660911435955579
Offset: 1
Keywords
A306234 Number T(n,k) of occurrences of k in a (signed) displacement set of a permutation of [n] divided by |k|!; triangle T(n,k), n>=1, 1-n<=k<=n-1, read by rows.
1, 1, 1, 1, 1, 3, 4, 3, 1, 1, 5, 13, 15, 13, 5, 1, 1, 7, 28, 67, 76, 67, 28, 7, 1, 1, 9, 49, 179, 411, 455, 411, 179, 49, 9, 1, 1, 11, 76, 375, 1306, 2921, 3186, 2921, 1306, 375, 76, 11, 1, 1, 13, 109, 679, 3181, 10757, 23633, 25487, 23633, 10757, 3181, 679, 109, 13, 1
Offset: 1
Examples
Triangle T(n,k) begins: : 1 ; : 1, 1, 1 ; : 1, 3, 4, 3, 1 ; : 1, 5, 13, 15, 13, 5, 1 ; : 1, 7, 28, 67, 76, 67, 28, 7, 1 ; : 1, 9, 49, 179, 411, 455, 411, 179, 49, 9, 1 ; : 1, 11, 76, 375, 1306, 2921, 3186, 2921, 1306, 375, 76, 11, 1 ;
Links
- Alois P. Heinz, Rows n = 1..142, flattened
- Wikipedia, Permutation
Crossrefs
Programs
-
Maple
b:= proc(s, d) option remember; (n-> `if`(n=0, add(x^j, j=d), add(b(s minus {i}, d union {n-i}), i=s)))(nops(s)) end: T:= n-> (p-> seq(coeff(p, x, i)/abs(i)!, i=1-n..n-1))(b({$1..n}, {})): seq(T(n), n=1..8); # second Maple program: T:= (n, k)-> -add((-1)^j*binomial(n-abs(k), j)*(n-j)!, j=1..n)/abs(k)!: seq(seq(T(n, k), k=1-n..n-1), n=1..9);
-
Mathematica
T[n_, k_] := (-1/Abs[k]!) Sum[(-1)^j Binomial[n-Abs[k], j] (n-j)!, {j, 1, n}]; Table[T[n, k], {n, 1, 9}, {k, 1-n, n-1}] // Flatten (* Jean-François Alcover, Feb 15 2021 *)
A306506 Number T(n,k) of permutations p of [n] having at least one index i with |p(i)-i| = k; triangle T(n,k), n>=1, 0<=k<=n-1, read by rows.
1, 1, 1, 4, 4, 3, 15, 19, 15, 10, 76, 99, 86, 67, 42, 455, 603, 544, 455, 358, 216, 3186, 4248, 3934, 3486, 2921, 2250, 1320, 25487, 34115, 32079, 29296, 25487, 21514, 16296, 9360, 229384, 307875, 292509, 272064, 245806, 214551, 179058, 133800, 75600
Offset: 1
Comments
T(n,k) is defined for n,k>=0. The triangle contains only the terms with k=n.
Examples
The 6 permutations p of [3]: 123, 132, 213, 231, 312, 321 have absolute displacement sets {|p(i)-i|, i=1..3}: {0}, {0,1}, {0,1}, {1,2}, {1,2}, {0,2}, respectively. Number 0 occurs four times, 1 occurs four times, and 2 occurs thrice. So row n=3 is [4, 4, 3]. Triangle T(n,k) begins: 1; 1, 1; 4, 4, 3; 15, 19, 15, 10; 76, 99, 86, 67, 42; 455, 603, 544, 455, 358, 216; 3186, 4248, 3934, 3486, 2921, 2250, 1320; 25487, 34115, 32079, 29296, 25487, 21514, 16296, 9360; ...
Links
- Alois P. Heinz, Rows n = 1..35, flattened
- Wikipedia, Permutation
Crossrefs
Programs
-
Maple
b:= proc(s, d) option remember; (n-> `if`(n=0, add(x^j, j=d), add(b(s minus {i}, d union {abs(n-i)}), i=s)))(nops(s)) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..n-1))(b({$1..n}, {})): seq(T(n), n=1..9); # second Maple program: T:= proc(n, k) option remember; n!-LinearAlgebra[Permanent]( Matrix(n, (i, j)-> `if`(abs(i-j)=k, 0, 1))) end: seq(seq(T(n, k), k=0..n-1), n=1..9);
-
Mathematica
T[n_, k_] := n!-Permanent[Table[If[Abs[i-j]==k, 0, 1], {i, 1, n}, {j, 1, n} ]]; Table[T[n, k], {n, 1, 9}, {k, 0, n-1}] // Flatten (* Jean-François Alcover, May 01 2019, from 2nd Maple program *)
A306455 Total number of covered falling diagonals in all n X n permutation matrices.
0, 1, 3, 14, 73, 454, 3253, 26480, 241505, 2440538, 27075301, 327197452, 4278799105, 60205974230, 907025841317, 14567520651224, 248474458923073, 4485765986251570, 85454391074596165, 1713134893536617348, 36052727133118151201, 794697884305583064302
Offset: 0
Keywords
Comments
A covered diagonal in a permutation matrix contains at least one 1.
Alternatively: Total number of covered raising diagonals in all n X n permutation matrices.
Also one half of the total number of all covered diagonals in all n X n permutation matrices.
Sum over all permutations p of [n] of the cardinality of the (signed) displacement set {p(i)-i, i=1..n}.
Alternatively: Sum over all permutations p of [n] of the cardinality of the set {p(i)+i, i=1..n}.
Examples
The 6 permutations p of [3]: 123, 132, 213, 231, 312, 321 have (signed) displacement sets {p(i)-i, i=1..3}: {0}, {-1,0,1}, {-1,0,1}, {-2,1}, {-1,2}, {-2,0,2}, representing the indices of covered falling diagonals in the permutation matrices [1 ] [1 ] [ 1 ] [ 1 ] [ 1] [ 1] [ 1 ] [ 1] [1 ] [ 1] [1 ] [ 1 ] [ 1] [ 1 ] [ 1] [1 ] [ 1 ] [1 ] , respectively, the sum of the set cardinalities gives a(3) = 1 + 3 + 3 + 2 + 2 + 3 = 14.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..450
- Wikipedia, Permutation
- Wikipedia, Permutation matrix
Programs
-
Maple
a:= proc(n) option remember; `if`(n<3, n*(n+1)/2, ((2*n^2-5*n+1)*a(n-1)-(n-1)*(n^2-4*n+2)*a(n-2) -(n-2)*(n-1)^2*a(n-3))/(n-2)) end: seq(a(n), n=0..23);
-
Mathematica
a[n_] := a[n] = If[n<3, n(n+1)/2, ((2n^2-5n+1) a[n-1] - (n-1)(n^2-4n+2) a[n-2] - (n-2)(n-1)^2 a[n-3])/(n-2)]; a /@ Range[0, 23] (* Jean-François Alcover, Aug 24 2021, after Alois P. Heinz *)
Formula
E.g.f.: (exp(-x)*(x+1)+x-1)/(x-1)^2.
a(n) = ((2*n^2-5*n+1)*a(n-1) - (n-1)*(n^2-4*n+2)*a(n-2) - (n-2)*(n-1)^2*a(n-3)) / (n-2) for n > 2, a(n) = n*(n+1)/2 for n < 3.
a(n) = Sum_{k=1..n} k * A125182(n,k).
a(n) = A259834(n+2) - n!.
a(n) = Sum_{k=1-n..n-1} A306461(n,k).
a(n) = Sum_{k=1-n..n-1} |k|! * A306234(n,k).
a(n) mod 2 = 1 - (n mod 2) = A059841(n) for n >= 2.
A324225 Total number T(n,k) of 1's in falling diagonals with index k in all n X n permutation matrices; triangle T(n,k), n>=1, 1-n<=k<=n-1, read by rows.
1, 1, 2, 1, 2, 4, 6, 4, 2, 6, 12, 18, 24, 18, 12, 6, 24, 48, 72, 96, 120, 96, 72, 48, 24, 120, 240, 360, 480, 600, 720, 600, 480, 360, 240, 120, 720, 1440, 2160, 2880, 3600, 4320, 5040, 4320, 3600, 2880, 2160, 1440, 720, 5040, 10080, 15120, 20160, 25200, 30240, 35280, 40320, 35280, 30240, 25200, 20160, 15120, 10080, 5040
Offset: 1
Comments
T(n,k) is the number of occurrences of k in all (signed) displacement lists [p(i)-i, i=1..n] of permutations p of [n].
Examples
The 6 permutations p of [3]: 123, 132, 213, 231, 312, 321 have (signed) displacement lists [p(i)-i, i=1..3]: [0,0,0], [0,1,-1], [1,-1,0], [1,1,-2], [2,-1,-1], [2,0,-2], representing the indices of falling diagonals of 1's in the permutation matrices [1 ] [1 ] [ 1 ] [ 1 ] [ 1] [ 1] [ 1 ] [ 1] [1 ] [ 1] [1 ] [ 1 ] [ 1] [ 1 ] [ 1] [1 ] [ 1 ] [1 ] , respectively. Indices -2 and 2 occur twice, -1 and 1 occur four times, and 0 occurs six times. So row n=3 is [2, 4, 6, 4, 2]. Triangle T(n,k) begins: : 1 ; : 1, 2, 1 ; : 2, 4, 6, 4, 2 ; : 6, 12, 18, 24, 18, 12, 6 ; : 24, 48, 72, 96, 120, 96, 72, 48, 24 ; : 120, 240, 360, 480, 600, 720, 600, 480, 360, 240, 120 ;
Links
- Alois P. Heinz, Rows n = 1..100, flattened
- Nadir Samos Sáenz de Buruaga, Rafał Bistroń, Marcin Rudziński, Rodrigo Miguel Chinita Pereira, Karol Życzkowski, and Pedro Ribeiro, Fidelity decay and error accumulation in quantum volume circuits, arXiv:2404.11444 [quant-ph], 2024. See p. 18.
- Wikipedia, Permutation
- Wikipedia, Permutation matrix
Crossrefs
Columns k=0-6 give (offsets may differ): A000142, A001563, A062119, A052571, A052520, A282822, A052521.
Row sums give A001563.
T(n+1,n) gives A000142.
T(n+1,n-1) gives A052849.
T(n+1,n-2) gives A052560 for n>1.
Cf. A152883 (right half of this triangle without center column), A162608 (left half of this triangle), A306461, A324224.
Cf. A001710.
Programs
-
Maple
b:= proc(s, c) option remember; (n-> `if`(n=0, c, add(b(s minus {i}, c+x^(n-i)), i=s)))(nops(s)) end: T:= n-> (p-> seq(coeff(p, x, i), i=1-n..n-1))(b({$1..n}, 0)): seq(T(n), n=1..8); # second Maple program: egf:= k-> (t-> x^t/t*hypergeom([2, t], [t+1], x))(abs(k)+1): T:= (n, k)-> n! * coeff(series(egf(k), x, n+1), x, n): seq(seq(T(n, k), k=1-n..n-1), n=1..8); # third Maple program: T:= (n, k)-> (t-> `if`(t
-
Mathematica
T[n_, k_] := With[{t = Abs[k]}, If[t
Jean-François Alcover, Mar 25 2021, after 3rd Maple program *)
Comments
Examples
Links
Crossrefs
Programs
Haskell
Maple
Mathematica
PARI
Formula