OFFSET
1,2
COMMENTS
Fill the main diagonal, then come back up the adjacent diagonal, skip over to the other adjacent diagonal and precede with 2n through 3n-2, etc.
EXAMPLE
Matrix of order 4 is:
1 8 13 16
7 2 9 14
12 6 3 10
15 11 5 4
PROG
(PARI) {init_m(n)= m=matrix(n, n, row, col, row*(row==col)); next_entry=n+1; for(i=2, n, col=n-i+1; forstep(row=n, i, -1, m[row, col]=next_entry; next_entry++; col--); col=i; for(row=1, n-i+1, m[row, col]=next_entry; next_entry++; col++))} for(n=1, 15, init_m(n); print1(matdet(m), ", ")) (Rick L. Shepherd)
CROSSREFS
KEYWORD
sign
AUTHOR
Robert G. Wilson v, Jun 16 2003
EXTENSIONS
Corrected by Rick L. Shepherd, Jun 12 2004
STATUS
approved