OFFSET
0,7
COMMENTS
The definition generalizes the rule of Sarrus to matrices of order different than 3.
LINKS
Wikipedia, Rule of Sarrus.
EXAMPLE
a(6) = -63936:
[ 1, 2, 3, 4, 5, 6]
[12, 11, 10, 9, 8, 7]
[13, 14, 15, 16, 17, 18]
[24, 23, 22, 21, 20, 19]
[25, 26, 27, 28, 29, 30]
[36, 35, 34, 33, 32, 31]
MATHEMATICA
M[i_, j_, n_] := 1 - j + i n + (-1 + 2 j - n) Mod[i, 2]; a[n_]:=Sum[Product[M[j, Mod[i+j-2, n]+1, n], {j, n}]-Product[M[j, Mod[i-j-1, n]+1, n], {j, n}], {i, n}]; Array[a, 18, 0]
CROSSREFS
KEYWORD
sign
AUTHOR
Stefano Spezia, Oct 03 2025
STATUS
approved
