OFFSET
0,5
COMMENTS
T(m,n) gives the number of distinct results obtained by repeatedly sorting the m X n (0,1) matrices by columns & then rows until reaching a fixed point. Its diagonal is A089006.
EXAMPLE
Array begins:
1,1,1,1,1,...
1,2,3,4,5,...
1,3,7,14,25,...
1,4,14,45,130,...
1,5,25,130,650,...
PROG
(Haskell)
-- with the function "t" producing the array.
import List
prod = foldr (\x xs -> [y:ys | y <- x, ys <- xs]) [[]]
f xs = let ys = sort (transpose (sort (transpose xs))) in if xs == ys then xs else f ys
t m n = length $ nub $ map f $ prod (replicate m (prod (replicate n [0, 1])))
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Randy Compton (RANDYRulerOfZexernet(AT)gmail.com), Dec 15 2009
EXTENSIONS
Corrected & extended by Randy Compton (RANDYRulerOfZexernet(AT)gmail.com), Dec 18 2009
STATUS
approved