A367251 Lexicographically earliest sequence starting 1,2 which can be arranged in a mirror symmetric array shape such that a(n) is the length of the n-th row and no column has the same value more than once.
1, 2, 1, 2, 1, 2, 3, 3, 3, 1, 4, 1, 2, 5, 2, 3, 6, 3, 7, 1, 4, 4, 1, 8, 5, 5, 1, 4, 9, 4, 1, 6, 6, 5, 10, 5, 1, 2, 7, 7, 2, 1, 6, 11, 6, 1, 2, 7, 12, 7, 2, 1, 13, 3, 8, 8, 3, 4, 9, 9, 4, 14, 1, 2, 5, 10, 10, 5, 2, 1, 3, 8, 15, 8, 3, 4, 9, 16, 9, 4, 17, 6, 11, 11, 6, 1, 2, 5, 10, 18, 10
Offset: 1
Examples
Array (or "tree") begins, with mirror symmetry in row 5 and beyond: columns v v v v v v v row 1: 1, row 2: 2, 1, row 3: 2, row 4: 1, 2, row 5: 3, row 6: 3, 3, row 7: 1, 4, 1, row 8: 2, 5, 2, row 9: 3, 6, 3, row 10: 7, row 11: 1, 4, 4, 1, row 12: 8, row 13: 5, 5,
Links
- Neal Gersh Tolunsky, Table of n, a(n) for n = 1..10000
- Thomas Scheuerle, blue: scatter plot of a(1) to a(10000); red: length of the row where a(n) is contained.
- Neal Gersh Tolunsky, First differences of first 100000 terms.
- Neal Gersh Tolunsky, Ordinal transform of first 100000 terms.
- Neal Gersh Tolunsky, Graph of first 100000 terms.
Programs
-
MATLAB
function a = A367251( max_n ) a = [1 2 1 2 1 2]; odd = zeros(1,max_n); even = odd; odd(1) = 2; even(1)= 2; c = 5; while length(a) < max_n if mod(a(c),2) == 1 odd(1:(a(c)+1)/2) = odd(1:(a(c)+1)/2)+1; a = [a odd((a(c)+1)/2:-1:2) odd(1:(a(c)+1)/2)]; else even(1:a(c)/2) = even(1:a(c)/2)+1; a = [a even(a(c)/2:-1:1) even(1:a(c)/2)]; end c = c + 1; end end % Thomas Scheuerle, Nov 21 2023
Comments