login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A039917
Number of orderings of 1,2,...,n^2 in an n X n matrix such that each row, each column and both diagonals are increasing.
2
1, 1, 9, 2017, 21569213, 17835527619513, 1677123511579177202174, 24742950249259362969953039657613, 75512002909758683196631913316950684079768626, 60752021865167494642984305761115275381534124800396484901989, 15991585283632910454908797943467512732011897255095362833558749286619895509557
OFFSET
1,3
EXAMPLE
From Alois P. Heinz, Jul 23 2012: (Start)
a(2) = 1: [1, 3]
[2, 4].
a(3) = 9:
[1, 4, 7] [1, 3, 7] [1, 2, 7] [1, 4, 6] [1, 3, 6]
[2, 5, 8] [2, 5, 8] [3, 5, 8] [2, 5, 8] [2, 5, 8]
[3, 6, 9] [4, 6, 9] [4, 6, 9] [3, 7, 9] [4, 7, 9]
.
[1, 2, 6] [1, 4, 6] [1, 3, 6] [1, 2, 6]
[3, 5, 8] [2, 5, 7] [2, 5, 7] [3, 5, 7]
[4, 7, 9] [3, 8, 9] [4, 8, 9] [4, 8, 9]. (End)
MAPLE
b:= proc(l) option remember; local n; n:= nops(l); `if`({l[]}={0},
1, add(`if`((l[i]-1<>n-i or i=1 or l[i-1]-1<=n-i) and l[i]>
`if`(i=n, 0, l[i+1]), b(subsop(i=l[i]-1, l)), 0), i=1..n))
end:
a:= n-> b([n$n]):
seq(a(n), n=1..8); # Alois P. Heinz, Jul 23 2012
MATHEMATICA
b[l_List] := b[l] = Module[{n = Length[l]}, If[Union[l] == {0}, 1, Sum[If[ (l[[i]]-1 != n-i || i == 1 || l[[i-1]]-1 <= n-i) && l[[i]] > If[i == n, 0, l[[i+1]]], b[ReplacePart[l, i -> l[[i]]-1]], 0], {i, 1, n}]]];
a[n_] := b[Table[n, {n}]];
Array[a, 8] (* Jean-François Alcover, Nov 08 2020, after Alois P. Heinz *)
CROSSREFS
Sequence in context: A218692 A024125 A232684 * A376823 A162140 A006945
KEYWORD
nonn
EXTENSIONS
One more term from Jud McCranie, Aug 09 2001
a(6)-a(13) from Alois P. Heinz, Jul 23 2012
STATUS
approved