OFFSET
0,6
FORMULA
EXAMPLE
a(8) = -172:
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[Det[Table[If[Min[i, j]<Max[i, j]<=2Min[i, j], Abs[j-i], 0], {i, n}, {j, n}]], {n, 27}]]
PROG
(PARI) a(n) = matdet(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 A353452(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).det() # Chai Wah Wu, Aug 29 2023
CROSSREFS
KEYWORD
sign
AUTHOR
Stefano Spezia, Apr 19 2022
STATUS
approved