login
Permanent of the n X n (0,1)-matrices with ij-th entry equal to zero iff it is on the diagonal, the first-upper diagonal, the main antidiagonal or the first-upper antidiagonal.
0

%I #6 Dec 02 2016 21:51:11

%S 0,0,0,8,56,512,4816,50336,572096,7048832,93609984,1333798272,

%T 20304005760,328957185024,5652803666688,102706725572096,

%U 1967499023510528,39636282097375232,837750752009506816

%N Permanent of the n X n (0,1)-matrices with ij-th entry equal to zero iff it is on the diagonal, the first-upper diagonal, the main antidiagonal or the first-upper antidiagonal.

%o (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=1,23,a=matrix(n,n,i,j,((j-i)!=0)&&((j-i)!=1)&&((j+i)!=(n+1))&&((j+i)!=n));print1(permRWNb(a)",")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 14 2007

%K nonn

%O 3,4

%A _Simone Severini_, Oct 17 2004

%E More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 14 2007