A386974 a(n) is the permanent of the symmetric n X n matrix M_n where M_n(j,k) = n for j = k, M_n(j,n) = n-j, M_n(n,k) = n-k, M_n(j,k) = 0 otherwise.
1, 1, 5, 42, 480, 6875, 117936, 2352980, 53477376, 1363146165, 38500000000, 1193121531646, 40246286745600, 1467779362716303, 57544321060925440, 2413281884765625000, 107798160680740192256, 5109425146945021190505, 256115971082717276995584, 13536555538728461399269330
Offset: 0
Keywords
Examples
a(5) = permanent(M_5) = 6875 where M_5 is the matrix [5 0 0 0 4] [0 5 0 0 3] [0 0 5 0 2] [0 0 0 5 1] [4 3 2 1 5]
Programs
-
Mathematica
M[j_, k_, n_]:=If[j==k, n, If[k==n, n-j, If[j==n, n-k, 0]]]; a[n_]:=Permanent[Table[M[i, j, n], {i, n}, {j, n}]];Join[{1}, Array[a, 18]]
-
PARI
a(n) = matpermanent(matrix(n, n, j, k, if (j==k, n, if (k==n, n-j, if (j==n, n-k, 0))))); \\ Michel Marcus, Aug 12 2025