A357420 a(n) is the hafnian of the 2n X 2n symmetric matrix defined by M[i,j] = abs(i - j) if min(i, j) < max(i, j) <= 2*min(i, j), and otherwise 0.
1, 1, 1, 8, 86, 878, 13730, 348760, 11622396, 509566864, 26894616012, 1701189027944, 125492778658096, 10738546182981256, 1049631636279244832, 117756049412699967072
Offset: 0
Examples
a(4) = 86: 0, 1, 0, 0, 0, 0, 0, 0; 1, 0, 1, 2, 0, 0, 0, 0; 0, 1, 0, 1, 2, 3, 0, 0; 0, 2, 1, 0, 1, 2, 3, 4; 0, 0, 2, 1, 0, 1, 2, 3; 0, 0, 3, 2, 1, 0, 1, 2; 0, 0, 0, 3, 2, 1, 0, 1; 0, 0, 0, 4, 3, 2, 1, 0.
Links
- Wikipedia, Hafnian
- Wikipedia, Symmetric matrix
Crossrefs
Programs
-
Mathematica
M[i_, j_, n_] := If[Min[i, j] < Max[i, j] <= 2 Min[i, j], Abs[j - i], 0]; a[n_] := Sum[Product[M[Part[PermutationList[s, 2 n], 2 i - 1], Part[PermutationList[s, 2 n], 2 i], 2 n], {i, n}], {s, SymmetricGroup[2 n] // GroupElements}]/(n!*2^n); Array[a, 6, 0]
Extensions
a(6)-a(15) from Pontus von Brömssen, Oct 16 2023