cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A085807 Permanent of the symmetric n X n matrix A defined by A[i,j] = |i-j| for 1 <= i,j <= n.

This page as a plain text file.
%I A085807 #35 Jul 05 2024 17:24:26
%S A085807 1,0,1,4,64,1152,34372,1335008,69599744,4577345152,374491314176,
%T A085807 37154032517376,4402467119882240,613680867638476800,
%U A085807 99443966100565999872,18534733913629064343552,3937496200758879526977536,945776134421421651222708224,255043190756805184245158084608
%N A085807 Permanent of the symmetric n X n matrix A defined by A[i,j] = |i-j| for 1 <= i,j <= n.
%C A085807 Conjecture: For any odd prime p, we have a(p) == -1/2 (mod p). - _Zhi-Wei Sun_, Aug 30 2021
%C A085807 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
%H A085807 Vaclav Kotesovec, <a href="/A085807/b085807.txt">Table of n, a(n) for n = 0..37</a>
%H A085807 Zhi-Wei Sun, <a href="https://arxiv.org/abs/2108.07723">Arithmetic properties of some permanents</a>, arXiv:2108.07723 [math.GM], 2021.
%p A085807 with(LinearAlgebra):
%p A085807 a:= n-> `if`(n=0, 1, Permanent(Matrix(n, (i, j)-> abs(i-j)))):
%p A085807 seq(a(n), n=0..18);  # _Alois P. Heinz_, Nov 14 2016
%t A085807 a[n_]:=Permanent[Table[Abs[i - j], {i, n}, {j, n}]]; Join[{1}, Array[a, 18]] (* _Stefano Spezia_, Jun 28 2024 *)
%o A085807 (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)
%o A085807 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
%o A085807 (PARI) {a(n) = matpermanent(matrix(n, n, i, j, abs(i-j)))}
%o A085807 for(n=0, 20, print1(a(n), ", ")) \\ _Vaclav Kotesovec_, Aug 12 2021
%o A085807 (Python)
%o A085807 from sympy import Matrix
%o A085807 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
%Y A085807 Cf. A085750, A204249, A278845, A278847.
%K A085807 nonn
%O A085807 0,4
%A A085807 Yuval Dekel (dekelyuval(AT)hotmail.com), Jul 24 2003
%E A085807 More terms from _Vladeta Jovovic_, Jul 26 2003
%E A085807 a(0)=1 prepended by _Alois P. Heinz_, Nov 14 2016