A098916 Permanent of the n X n (0,1)-matrices with ij-th entry equal to zero iff (i=1,j=1),(i=1,j=n),(i=n,j=1) and (i=n,j=n).
0, 4, 36, 288, 2400, 21600, 211680, 2257920, 26127360, 326592000, 4390848000, 63228211200, 971415244800, 15866448998400, 274611617280000, 5021469573120000, 96746980442112000, 1959126353952768000
Offset: 3
Keywords
Examples
a(3) = 0 because no configuration is allowed, the 2 red balls always occurs by the side of the blue ball. a(4) = 4 because we can have 4 possible permutations: b,g1,r1,r2 b,g1,r2,r1 r1,r2,g1,b r2,r1,g1,b.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 3..200
- Emeric Deutsch, Permutations and their bounding squares, Math Magazine, 85(1) (2012), p. 63.
- Luis Manuel Rivera, Integer sequences and k-commuting permutations, arXiv preprint arXiv:1406.3081 [math.CO], 2014-2015.
Programs
-
Maple
a:= n->(n-2)*(n-3)*(n-2)!: seq(a(n), n=3..20); # Zerinvary Lajos, Jul 01 2007
-
Mathematica
a[n_,r_] := (n-r-1)(n-r)(n-2)! (* Alessandro Nicolosi (xxalenicxx(AT)hotmail.com), Jul 12 2006 *) Table[(n-2)*(n-3)*(n-2)!,{n,3,30}] (* Vincenzo Librandi, Feb 27 2012 *)
-
PARI
permRWNb(a)=n=matsize(a)[1]; if(n==1,return(a[1,1])); sg=1; in=vectorv(n); x=in; x=a[,n]-sum(j=1,n,a[,j])/2; p=prod(i=1,n,x[i]); for(k=1,2^(n-1)-1,sg=-sg; j=valuation(k,2)+1; z=1-2*in[j]; in[j]+=z; x+=z*a[,j]; p+=prod(i=1,n,x[i],sg)); return(2*(2*(n%2)-1)*p) for(n=3,24,a=matrix(n,n,i,j,1); a[1,1]=0; a[1,n]=0; a[n,1]=0; a[n,n]=0; print1(permRWNb(a)", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007
-
PARI
for(n=3,24,print1((n-2)*(n-3)*(n-2)!", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007
-
Python
import math def a(n): return (n-2)*(n-3)*math.factorial(n-2) # David Nacin, Feb 27 2012
Formula
a(n) = (n-2)*(n-3)*(n-2)!. - Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007
From Amiram Eldar, May 17 2022: (Start)
Sum_{n>=4} 1/a(n) = 3 - e, where e = A001113.
Extensions
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007
Comments