login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A085807
Permanent of the symmetric n X n matrix A defined by A[i,j] = |i-j| for 1 <= i,j <= n.
18
1, 0, 1, 4, 64, 1152, 34372, 1335008, 69599744, 4577345152, 374491314176, 37154032517376, 4402467119882240, 613680867638476800, 99443966100565999872, 18534733913629064343552, 3937496200758879526977536, 945776134421421651222708224, 255043190756805184245158084608
OFFSET
0,4
COMMENTS
Conjecture: For any odd prime p, we have a(p) == -1/2 (mod p). - Zhi-Wei Sun, Aug 30 2021
Conjecture: a(n) is the minimal permanent of an n X n symmetric Toeplitz matrix having 0 on the main diagonal and all the integers 1, 2, ..., n-1 off-diagonal. - Stefano Spezia, Jul 05 2024
LINKS
Zhi-Wei Sun, Arithmetic properties of some permanents, arXiv:2108.07723 [math.GM], 2021.
MAPLE
with(LinearAlgebra):
a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)-> abs(i-j)))):
seq(a(n), n=0..18); # Alois P. Heinz, Nov 14 2016
MATHEMATICA
a[n_]:=Permanent[Table[Abs[i - j], {i, n}, {j, n}]]; Join[{1}, Array[a, 18]] (* Stefano Spezia, Jun 28 2024 *)
PROG
(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, 22, a=matrix(n, n, i, j, abs(i-j)); print1(permRWNb(a)", ")) \\ Herman Jamke (hermanjamke(AT)fastmail.fm), May 14 2007
(PARI) {a(n) = matpermanent(matrix(n, n, i, j, abs(i-j)))}
for(n=0, 20, print1(a(n), ", ")) \\ Vaclav Kotesovec, Aug 12 2021
(Python)
from sympy import Matrix
def A085807(n): return Matrix(n, n, [abs(j-k) for j in range(n) for k in range(n)]).per() # Chai Wah Wu, Sep 14 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Yuval Dekel (dekelyuval(AT)hotmail.com), Jul 24 2003
EXTENSIONS
More terms from Vladeta Jovovic, Jul 26 2003
a(0)=1 prepended by Alois P. Heinz, Nov 14 2016
STATUS
approved