OFFSET
1,2
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..30 calculated by Herman Jamke's code.
Carl Pomerance, Coprime permutations, arXiv:2203.03085 [math.NT], 2022.
FORMULA
PROG
(PARI) permRWNb(a)=n=matsize(a)[1]; if(n==1, return(a[1, 1])); sg=1; nc=0; 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; nc+=z; x+=z*a[, j]; p+=prod(i=1, n, x[i], sg)); return(2*(2*(n%2)-1)*p)
for(n=1, 26, a=matrix(n, n, i, j, gcd(2*i, 2*j-1)==1); print1(permRWNb(a)", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 13 2007
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved