%I #95 May 28 2021 20:01:36
%S 1,2,2,3,1,3,4,4,4,4,5,3,1,3,5,6,6,2,2,6,6,7,5,7,1,7,5,7,8,8,8,8,8,8,
%T 8,8,9,7,5,7,1,7,5,7,9,10,10,6,6,2,2,6,6,10,10,11,9,11,5,3,1,3,5,11,9,
%U 11,12,12,12,12,4,4,4,4,12,12,12,12,13,11,9,11,13,3,1,3,13,11,9,11,13
%N Lexicographically earliest table of positive integers read by antidiagonals such that no row or column contains a repeated term.
%C The table is symmetrical about the main diagonal.
%C The first row/column is A000027.
%C The second row/column is A103889.
%C The third row/column is A256008.
%C The fourth row/column is A113778.
%C Conjecture: The (2^k)-th antidiagonal consists entirely of 2^k.
%C Similar in spirit to A269526, A274528. - _N. J. A. Sloane_, Dec 27 2016
%C From _Daniel Forgues_, Sep 14 2019: (Start)
%C Plot of a(n) looks like a transform of a Sierpinski equilateral triangle.
%C Considering t(a(n)) = a(n)*(a(n)+1)/2: top edge of plot would be linear, but left & right sides of [concave curved] triangles would grow/decrease quadratically. a(n), a univalued sequence, tries to plot a Sierpinski triangle, which requires a multivalued sequence: a(n) uses t(2^k) terms to draw a Sierpinski triangle of width & height 2^k.
%C Conjecture: T(2n, k) = 2 * T(n, ceiling(k/2)), n >= 1, 1 <= k <= 2n. E.g.
%C row 5: 5, 3, 1, 3, 5
%C row 10: 10, 10, 6, 6, 2, 2, 6, 6, 10, 10 (End)
%C From _Daniel Forgues_, Sep 15 2019: (Start)
%C Conjectured algorithm for equilateral triangle (1-indexed rows and row terms), whose concatenated rows give this sequence: T(1, 1) = 1;
%C For each k >= 0, the height of the Sierpinski triangle is doubled:
%C * Left and right triangles: for 1 <= i <= 2^k, 1 <= j <= i:
%C T(2^k + i, j) = T(2^k + i, 2^k + i + 1 - j) = T(i, j) + 2^k;
%C * Central triangle: for 1 <= i <= 2^k - 1, 1 <= j <= i:
%C T(2^(k+1) - i, 2^k - i + j) = T(i, j).
%C Left and right triangles copies rows 1 to 2^k, terms augmented by 2^k.
%C Central triangle is mirrored through row 2^k.
%C When n is t(2^k), k >= 0, i.e., a triangular number with index a power of 2, a phase of the Sierpinski triangle plot is neatly completed. (End)
%H Peter Kagey, <a href="/A280172/b280172.txt">Table of n, a(n) for n = 1..32896</a> (first 256 rows, flattened)
%H Peter Kagey, <a href="/A280172/a280172_1.png">Bitmap of first 2^10 = 1024 rows and columns</a>. (Black pixels correspond to numbers divisible by 3; white pixels to all other numbers.)
%H Rémy Sigrist, <a href="/A280172/a280172.png">Scatterplot of (n, a(n)*(a(n)+1)/2) for n = 1..2100225</a>
%F T(n, k) = ( (n-1) XOR (k-1) ) + 1 = A003987(n-1, k-1) + 1. - _Rémy Sigrist_, Sep 18 2019
%F a(n) = T(row, n - t(row - 1)), n >= 1, where row = ceiling((-1 + sqrt(1 + 8*n))/2) and t(i) = i*(i+1)/2. - _Daniel Forgues_, Sep 20 2019
%e As table (upper anti-triangular matrix) (concat. antidiagonals):
%e 1 2 3 4 5 6 7 8
%e 2 1 4 3 6 5 8
%e 3 4 1 2 7 8
%e 4 3 2 1 8
%e 5 6 7 8
%e 6 5 8
%e 7 8
%e 8
%e As equilateral triangle (concat. rows): (see formula section)
%e 1
%e 2 2
%e 3 1 3
%e 4 4 4 4
%e 5 3 1 3 5
%e 6 6 2 2 6 6
%e 7 5 7 1 7 5 7
%e 8 8 8 8 8 8 8 8
%e Lexicographically earliest equilateral triangle of positive integers read by rows such that no diagonal or antidiagonal contains a repeated term.
%p A280172 := (n, k) -> 1 + Bits:-Xor(k-1, n-k):
%p seq(print(seq(A280172(n, k), k=1..n)), n=1..14); # _Peter Luschny_, Sep 21 2019
%Y Cf. A003987, A269526, A274528.
%Y Rows (or columns) 1 to 4: A000027, A103889, A256008, A113778.
%K nonn,tabl,look
%O 1,2
%A _Peter Kagey_, Dec 27 2016