A337434 Essentially different n X n matrices with maximal sum of entries satisfying the conditions of A228882. List of solutions for n=5 and n=6. A228882(5) = 63; 20 distinct solutions: [1,2,1,2,3;4,3,4,5,1;2,1,2,3,4;3,4,5,1,2;1,2,3,1,3] [1,2,1,2,3;4,3,4,5,1;2,1,2,3,4;3,5,4,1,2;1,2,3,1,3] [1,2,1,2,3;4,3,5,4,1;2,1,2,3,4;3,4,5,1,2;1,2,3,1,3] [1,2,1,2,3;4,3,5,4,1;2,1,2,3,4;3,5,4,1,2;1,2,3,1,3] [1,2,3,4,1;3,4,1,2,3;2,5,3,4,1;1,1,2,5,3;2,3,4,1,2] [1,2,3,4,1;3,4,1,2,3;2,5,3,4,1;1,1,2,5,3;2,4,3,1,2] [1,2,3,4,1;3,4,1,2,3;2,5,3,5,1;1,1,2,4,3;2,3,4,1,2] [1,2,3,4,1;3,4,1,2,3;2,5,3,5,1;1,1,2,4,3;2,4,3,1,2] [1,2,3,4,1;3,5,1,2,3;2,4,3,5,1;1,1,2,4,3;2,3,4,1,2] [1,2,3,4,1;3,5,1,2,3;2,4,3,5,1;1,1,2,4,3;2,4,3,1,2] [1,2,4,3,1;3,4,1,2,3;2,5,3,4,1;1,1,2,5,3;2,3,4,1,2] [1,2,4,3,1;3,4,1,2,3;2,5,3,4,1;1,1,2,5,3;2,4,3,1,2] [1,2,4,3,1;3,4,1,2,3;2,5,3,5,1;1,1,2,4,3;2,3,4,1,2] [1,2,4,3,1;3,4,1,2,3;2,5,3,5,1;1,1,2,4,3;2,4,3,1,2] [1,2,4,3,1;3,5,1,2,3;2,4,3,5,1;1,1,2,4,3;2,3,4,1,2] [1,2,4,3,1;3,5,1,2,3;2,4,3,5,1;1,1,2,4,3;2,4,3,1,2] [1,3,1,3,2;3,2,4,5,1;4,1,3,2,3;2,5,4,1,4;1,3,2,1,2] [1,3,1,3,2;3,2,4,5,1;4,1,3,2,4;2,5,4,1,3;1,3,2,1,2] [1,3,1,3,2;4,2,4,5,1;3,1,3,2,3;2,5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