
EXAMPLE

The upper left 7x7 matrix of A088745 is:
[ 1, 3, 8, 11, 24, 26, 48]
[ 4, 2, 7, 16, 18, 36, 39]
[ 6, 9, 5, 13, 22, 30, 40]
[15, 12, 14, 10, 21, 34, 42]
[17, 25, 23, 20, 19, 31, 47]
[35, 27, 29, 33, 32, 28, 45]
[37, 43, 46, 41, 49, 44, 38]


MATHEMATICA

(* first do *) Needs["LinearAlgebra`MatrixManipulation`"]; Needs["DiscreteMath`Combinatorica`"] (* then *) f[m_List] := Block[{k = 1, lmt, mxm = 0, mtx = m, mtxm, nbr = Sqrt@Length@Flatten@m, pm}, lmt = (2nbr + 1)!; pm = Reverse@ Range[nbr^2 + 1, (nbr + 1)^2]; While[k <= lmt, mtxr = AppendRows[mtx, Partition[Take[pm, nbr], 1]]; mtxc = AppendColumns[mtxr, {Take[pm, (nbr + 1)]}]; ab = Det@mtxc; If[Abs@ab >= mxm, mxm = Abs@ab; mtxm = mtxc; Print[{ab, mtxc // MatrixForm}]]; k++; pm = NextPermutation@pm]; mtxm]; NestList[f, {{1}}, 6] (* Robert G. Wilson v *)
