cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A189389 #22 Oct 25 2023 16:19:52
%S A189389 1,0,0,0,0,0,1,2,49,484,6208,79118,1081313,15610304,238518181,
%T A189389 3850864416,65598500129,1177003136892,22203823852849,439598257630414,
%U A189389 9117748844458320,197776095898147080,4479171132922158213,105749311074795459594,2598770324359627927649
%N A189389 Number of permutations p of [n] such that (n-p(i)+i) mod n >= 5 for all i.
%H A189389 Shalosh B. Ekhad and Doron Zeilberger, <a href="/A189389/b189389.txt">Table of n, a(n) for n = 0..100</a>
%H A189389 D. Zeilberger, <a href="http://www.math.rutgers.edu/~zeilberg/mamarim/mamarimhtml/menages.html">Automatic Enumeration of Generalized Ménage Numbers</a>
%e A189389 a(7) = 2: (2,3,4,5,6,7,1), (3,4,5,6,7,1,2).
%p A189389 with(LinearAlgebra):
%p A189389 a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)->
%p A189389                      `if`(i-j<=0 and i-j>-5 or i-j>n-5, 0, 1)))):
%p A189389 seq(a(n), n=0..15);
%t A189389 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 A189389 A diagonal of A008305.
%Y A189389 Cf. A000142, A000166, A000179, A000183, A004307.
%K A189389 nonn
%O A189389 0,8
%A A189389 _Alois P. Heinz_, Apr 20 2011