|
|
A308880
|
|
Irregular array read by rows: row k (k>=1) contains k^2 numbers, formed by filling in a k X k square by rows so entries in all rows, columns, diagonals, antidiagonals are distinct, and then reading that square across rows.
|
|
2
|
|
|
0, 0, 1, 2, 3, 0, 1, 2, 2, 3, 0, 1, 4, 5, 0, 1, 2, 3, 2, 3, 0, 1, 1, 4, 5, 2, 5, 0, 1, 4, 0, 1, 2, 3, 4, 2, 3, 0, 1, 5, 1, 4, 5, 2, 0, 5, 0, 1, 4, 3, 3, 6, 7, 0, 1, 0, 1, 2, 3, 4, 5, 2, 3, 0, 1, 6, 7, 1, 4, 5, 2, 0, 8, 5, 0, 1, 4, 3, 6, 3, 7, 6, 0, 1, 4, 4, 2, 9, 5, 7, 10
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,4
|
|
COMMENTS
|
The second row of the k X k square converges to A004443 as k increases.
When filling in the k X k square, always choose the smallest possible number. Each k X k square is uniquely determined.
Each k X k square read downwards by antidiagonals up to and including the main antidiagonal is A274528(1..k*(k+1)/2). - I. V. Serov, Jun 30 2019, following an argument by Bernard Schott.
|
|
LINKS
|
|
|
EXAMPLE
|
The first eight squares are (here A=10, B=11, C=12):
0
--------
01
23
--------
012
230
145
--------
0123
2301
1452
5014
--------
01234
23015
14520
50143
36701
--------
012345
230167
145208
501436
376014
42957A
--------
0123456
2301674
1452083
5014362
3780145
4265798
9548237
--------
01234567
23016745
14520836
50143628
37801459
42675983
9548237A
A836BC92
--------
Concatenating the rows of these squares gives the sequence.
|
|
PROG
|
(MATLAB)
for n = 1:oo;
M = [0:(n-1)
zeros(n-1, n-0)*NaN];
for i = 2:n; for j = 1:n; M = Mnext(M, n, i, j); end; end
end
function [M] = Mnext(M, n, i, j);
row = M(i, 1:j-1);
col = M(1:i-1, j);
dim = diag( M, j-i);
dia = diag(fliplr(M), n-i-j+1);
X = ([row col' dim' dia']);
for m = 0:length(X)-1; if isempty(find(X==m)); break; end; end;
M(i, j) = m;
end
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,tabf
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|