OFFSET
1,4
MAPLE
p:=proc(n) local B, k, u, rev, w; with(linalg):u:=n->[seq(i, i=1..n)]; rev:=proc(a) [seq(a[nops(a)+1-i], i=1..nops(a))] end; w:=(m, n)->[seq(i, i=m..n)]; B[0]:=matrix(1, n, u(n)): if n mod 2 = 0 then for k from 1 to n/2 do B[2*k-1]:=concat(submatrix(B[2*k-2], [1], rev(u(2*k-1))), submatrix(B[2*k-2], [1], w(2*k, n))): B[2*k]:=concat(submatrix(B[2*k-1], [1], u(n-2*k)), submatrix(B[2*k-1], [1], rev(w(n+1-2*k, n)))) od else for k from 1 to (n-1)/2 do B[2*k-1]:=concat(submatrix(B[2*k-2], [1], rev(u(2*k-1))), submatrix(B[2*k-2], [1], w(2*k, n))): B[2*k]:=concat(submatrix(B[2*k-1], [1], u(n-2*k)), submatrix(B[2*k-1], [1], rev(w(n+1-2*k, n)))) od: B[n]:=concat(submatrix(B[n-1], [1], rev(u(n))), submatrix(B[n-1], [1], [])) fi end:seq(p(i)[1, i], i=1..89); # Emeric Deutsch, Feb 27 2005
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Leroy Quet, Aug 26 2004
EXTENSIONS
More terms from Emeric Deutsch, Feb 27 2005
STATUS
approved