OFFSET
0,6
FORMULA
EXAMPLE
a(8) = 7844:
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.
MATHEMATICA
Join[{1}, Table[Permanent[Table[If[Min[i, j]<Max[i, j]<=2Min[i, j], Abs[j-i], 0], {i, n}, {j, n}]], {n, 22}]]
PROG
(PARI) a(n) = matpermanent(matrix(n, n, i, j, if ((min(i, j) < max(i, j)) && (max(i, j) <= 2*min(i, j)), abs(i-j)))); \\ Michel Marcus, Apr 20 2022
(Python)
from sympy import Matrix
def A353453(n): return Matrix(n, n, lambda i, j: abs(i-j) if min(i, j)<max(i, j)<=(min(i, j)<<1)+1 else 0).per() if n else 1 # Chai Wah Wu, Aug 29 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Stefano Spezia, Apr 19 2022
STATUS
approved