login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


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

%I #42 Mar 07 2020 13:50:20

%S 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,

%T 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,

%U 4,5,2,0,8,5,0,1,4,3,6,3,7,6,0,1,4,4,2,9,5,7,10

%N 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.

%C The second row of the k X k square converges to A004443 as k increases.

%C When filling in the k X k square, always choose the smallest possible number. Each k X k square is uniquely determined.

%C 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_.

%H I. V. Serov, <a href="/A308880/b308880.txt">Rows of first 32 squares, flattened</a> (There are 1^2+2^2+...+32^2 = 11440 entries.)

%H F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, <a href="https://www.combinatorics.org/ojs/index.php/eljc/article/view/v27i1p52/8039">Queens in exile: non-attacking queens on infinite chess boards</a>, Electronic J. Combin., 27:1 (2020), #P1.52.

%e The first eight squares are (here A=10, B=11, C=12):

%e 0

%e --------

%e 01

%e 23

%e --------

%e 012

%e 230

%e 145

%e --------

%e 0123

%e 2301

%e 1452

%e 5014

%e --------

%e 01234

%e 23015

%e 14520

%e 50143

%e 36701

%e --------

%e 012345

%e 230167

%e 145208

%e 501436

%e 376014

%e 42957A

%e --------

%e 0123456

%e 2301674

%e 1452083

%e 5014362

%e 3780145

%e 4265798

%e 9548237

%e --------

%e 01234567

%e 23016745

%e 14520836

%e 50143628

%e 37801459

%e 42675983

%e 9548237A

%e A836BC92

%e --------

%e Concatenating the rows of these squares gives the sequence.

%o (MATLAB)

%o A308880 = [];

%o A308881 = [];

%o for n = 1:oo;

%o M = [0:(n-1)

%o zeros(n-1,n-0)*NaN];

%o for i = 2:n; for j = 1:n; M = Mnext(M,n,i,j); end; end

%o A308880 = [A308880 reshape(M',1,n^2)];

%o A308881 = [A308881 reshape(M ,1,n^2)];

%o end

%o function [M] = Mnext(M,n,i,j);

%o row = M(i,1:j-1);

%o col = M(1:i-1,j);

%o dim = diag( M, j-i);

%o dia = diag(fliplr(M),n-i-j+1);

%o X = ([row col' dim' dia']);

%o for m = 0:length(X)-1; if isempty(find(X==m)); break; end; end;

%o M(i,j) = m;

%o end

%o % _I. V. Serov_, Jun 30 2019

%Y Cf. A004443, A308881, A274528.

%K nonn,tabf

%O 1,4

%A _N. J. A. Sloane_, Jun 29 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 21 19:38 EDT 2024. Contains 376089 sequences. (Running on oeis4.)