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!)
A189389 Number of permutations p of [n] such that (n-p(i)+i) mod n >= 5 for all i. 5

%I #22 Oct 25 2023 16:19:52

%S 1,0,0,0,0,0,1,2,49,484,6208,79118,1081313,15610304,238518181,

%T 3850864416,65598500129,1177003136892,22203823852849,439598257630414,

%U 9117748844458320,197776095898147080,4479171132922158213,105749311074795459594,2598770324359627927649

%N Number of permutations p of [n] such that (n-p(i)+i) mod n >= 5 for all i.

%H Shalosh B. Ekhad and Doron Zeilberger, <a href="/A189389/b189389.txt">Table of n, a(n) for n = 0..100</a>

%H D. Zeilberger, <a href="http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/menages.html">Automatic Enumeration of Generalized Ménage Numbers</a>

%e a(7) = 2: (2,3,4,5,6,7,1), (3,4,5,6,7,1,2).

%p with(LinearAlgebra):

%p a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)->

%p `if`(i-j<=0 and i-j>-5 or i-j>n-5, 0, 1)))):

%p seq(a(n), n=0..15);

%t a[n_] := Permanent[Table[If[i-j <= 0 && i-j > -5 || i-j > n-5, 0, 1], {i, 1, n}, {j, 1, n}]]; a[0] = 1; Table[a[n], {n, 0, 15}] (* _Jean-François Alcover_, Jan 07 2016, adapted from Maple *)

%Y A diagonal of A008305.

%Y Cf. A000142, A000166, A000179, A000183, A004307.

%K nonn

%O 0,8

%A _Alois P. Heinz_, Apr 20 2011

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 7 09:38 EDT 2024. Contains 372302 sequences. (Running on oeis4.)