OFFSET
0,4
LINKS
Vaclav Kotesovec, Table of n, a(n) for n = 0..36
MAPLE
with(linalg):with(numtheory):mu:=proc(n) if n=0 then 0 else mobius(n) fi end:a:=(i, j)->mu(abs(i-j)):seq(permanent(matrix(n, n, a)), n=1..19); # the Maple mobius command is not used since it assigns mobius(0)=-1 # Emeric Deutsch, Dec 23 2004
# second Maple program:
a:= n-> `if`(n=0, 1, LinearAlgebra[Permanent](Matrix(n, (i, j)
-> `if`(i=j, 0, numtheory[mobius](abs(i-j)))))):
seq(a(n), n=0..18); # Alois P. Heinz, Jan 28 2021
MATHEMATICA
a[n_] := Permanent[Table[MoebiusMu[Abs[i - j]], {i, 1, n}, {j, 1, n}]]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 19}] (* Jean-François Alcover, Jan 07 2016 *)
PROG
(PARI) permRWN(a)=n=matsize(a)[1]; if(n==1, return(a[1, 1])); n1=n-1; sg=1; m=1; nc=0; in=vector(n); x=in; for(i=1, n, x[i]=a[i, n]-sum(j=1, n, a[i, j])/2); p=prod(i=1, n, x[i]); while(m, sg=-sg; j=1; if((nc%2)!=0, j++; while(in[j-1]==0, j++)); in[j]=1-in[j]; z=2*in[j]-1; nc+=z; m=nc!=in[n1]; for(i=1, n, x[i]+=z*a[i, j]); p+=sg*prod(i=1, n, x[i])); return(2*(2*(n%2)-1)*p)
mobius(n)=if(n!=0, moebius(n), 0)
for(n=1, 40, a=matrix(n, n, i, j, mobius(abs(i-j))); print1(permRWN(a)", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 11 2007
CROSSREFS
KEYWORD
sign
AUTHOR
Yuval Dekel (dekelyuval(AT)hotmail.com), Aug 24 2003
EXTENSIONS
More terms from Emeric Deutsch, Dec 23 2004
More terms from Herman Jamke (hermanjamke(AT)fastmail.fm), May 11 2007
a(0) and a(26)-a(29) from Pontus von Brömssen, Jan 28 2021
STATUS
approved