A259776
Number A(n,k) of permutations p of [n] with no fixed points and displacement of elements restricted by k: 1 <= |p(i)-i| <= k, square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 4, 0, 0, 1, 0, 1, 2, 9, 6, 1, 0, 1, 0, 1, 2, 9, 24, 13, 0, 0, 1, 0, 1, 2, 9, 44, 57, 24, 1, 0, 1, 0, 1, 2, 9, 44, 168, 140, 45, 0, 0, 1, 0, 1, 2, 9, 44, 265, 536, 376, 84, 1, 0
Offset: 0
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, 1, ...
0, 0, 0, 0, 0, 0, 0, 0, ...
0, 1, 1, 1, 1, 1, 1, 1, ...
0, 0, 2, 2, 2, 2, 2, 2, ...
0, 1, 4, 9, 9, 9, 9, 9, ...
0, 0, 6, 24, 44, 44, 44, 44, ...
0, 1, 13, 57, 168, 265, 265, 265, ...
0, 0, 24, 140, 536, 1280, 1854, 1854, ...
Columns k=0-10 give:
A000007,
A059841,
A033305,
A079997,
A259777,
A259778,
A259779,
A259780,
A259781,
A259782,
A259783.
-
b:= proc(n, s, k) option remember; `if`(n=0, 1, `if`(n+k in s,
b(n-1, (s minus {n+k}) union `if`(n-k>1, {n-k-1}, {}), k),
add(`if`(j=n, 0, b(n-1, (s minus {j}) union
`if`(n-k>1, {n-k-1}, {}), k)), j=s)))
end:
A:= (n, k)-> `if`(k=0, `if`(n=0, 1, 0), b(n, {$max(1, n-k)..n}, k)):
seq(seq(A(n, d-n), n=0..d), d=0..12);
-
b[n_, s_, k_] := b[n, s, k] = If[n==0, 1, If[MemberQ[s, n+k], b[n-1, Join[s ~Complement~ {n+k}] ~Union~ If[n-k>1, {n-k-1}, {}], k], Sum[If[j==n, 0, b[n -1, Join[s ~Complement~ {j}] ~Union~ If[n-k>1, {n-k-1}, {}], k]], {j, s}]] ];
A[n_, k_] := If[k == 0, If[n == 0, 1, 0], b[n, Range[Max[1, n-k], n], k]];
Table[A[n, d-n], {d, 0, 12}, {n, 0, d}] // Flatten (* Jean-François Alcover, Mar 29 2017, translated from Maple *)
A260111
Number of permutations p of [n] with no fixed points and cyclic displacement of elements restricted by six: p(i)<>i and (i-p(i) mod n <= 6 or p(i)-i mod n <= 6).
Original entry on oeis.org
1, 0, 1, 2, 9, 44, 265, 1854, 14833, 133496, 1334961, 14684570, 176214841, 2290792932, 10930514688, 52034548064, 247272708868, 1173385630596, 5560837425792, 26322368822528, 124470922522980, 589274182149120, 2793967092494408, 13269446868206480, 63125696320334912
Offset: 0
-
a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](Matrix(n, (i, j)->
`if`(i<>j and (i-j mod n<=6 or j-i mod n<=6), 1, 0)))):
seq(a(n), n=0..16);
-
a[n_] := If[n == 0, 1, Permanent[Table[If[i != j && (Mod[i - j, n] <= 6 || Mod[j - i, n] <= 6), 1, 0], {i, 1, n}, {j, 1, n}]]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 16}] (* Jean-François Alcover, Jan 06 2016, adapted from Maple *)
A321052
Number of permutations of [n] with no fixed points where the maximal displacement of an element equals six.
Original entry on oeis.org
0, 574, 5571, 34948, 181193, 870934, 4113244, 19845700, 99472963, 505871096, 2572439079, 12975021278, 64715221044, 319501249574, 1566516774344, 7660714576044, 37445731303872, 183081927465284, 895275467752721, 4376669424005308, 21379883128454905
Offset: 6
A321053
Number of permutations of [n] with no fixed points where the maximal displacement of an element equals seven.
Original entry on oeis.org
0, 3973, 46662, 359724, 2270840, 12994207, 71401928, 389384029, 2162806868, 12393816965, 72063175820, 420431229772, 2443816138204, 14098735154983, 80635213447724, 457661900843292, 2583741730021382, 14552232847553984, 81904772313605164, 461011600699499344
Offset: 7
Showing 1-4 of 4 results.
Comments