login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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

I. V. Serov, Rows of first 32 squares, flattened (There are 1^2+2^2+...+32^2 = 11440 entries.)

F. Michel Dekking, Jeffrey Shallit, and N. J. A. Sloane, Queens in exile: non-attacking queens on infinite chess boards, Electronic J. Combin., 27:1 (2020), #P1.52.

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)

A308880 = [];

A308881 = [];

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

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

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

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

% I. V. Serov, Jun 30 2019

CROSSREFS

Cf. A004443, A308881, A274528.

Sequence in context: A308898 A106728 A292603 * A319047 A276335 A189480

Adjacent sequences:  A308877 A308878 A308879 * A308881 A308882 A308883

KEYWORD

nonn,tabf

AUTHOR

N. J. A. Sloane, Jun 29 2019

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 26 06:00 EST 2021. Contains 340434 sequences. (Running on oeis4.)