%I #8 Nov 21 2023 08:34:01
%S 1,1,1,2,2,3,3,4,1,5,2,6,1,7,2,8,1,4,9,10,1,7,7,12,1,5,13,14,1,9,10,
%T 16,1,6,17,14,6,19,1,20,1,7,21,19,5,20,6,24,1,8,25,18,10,27,1,28,1,9,
%U 29,26,6,28,5,32,1,10,33,22,14,35,1,34,4,23,17,38
%N a(1) = 1, and for any n > 0, a(2*n) is the number of k's among 1..n such that a(k) <= a(n), a(2*n+1) is the number of k's among 1..n such that a(k) >= a(n).
%C This sequence is unbounded: for any m > 0, a(4*m) + a(4*m+1) >= 2*m + 1, as both terms are positive, at least one of them must be >= m.
%C This sequence contains infinitely many 1's: if a(n) > a(k) for all k < n, then a(2*n + 1) = 1, and as the sequence is unbounded, we have infinitely many such n.
%C This sequence contains all positive integers: for any n > 0, if k is the index of the n-th 1, then a(2*k) = n.
%F a(2*n) + a(2*n+1) >= n + 1.
%e a(1) = 1 by definition.
%e a(1) <= a(1) hence a(2) = 1.
%e a(1) >= a(1) hence a(3) = 1.
%e a(1) and a(2) <= a(2) hence a(4) = 2.
%e a(1), a(2), a(3) and a(4) <= a(4) hence a(8) = 4.
%e a(1), a(2) and a(3) < a(4), a(4) >= a(4) hence a(9) = 1.
%o (PARI) { for (n = 1, #a = vector(76), print1 (a[n] = if (n==1, 1, sum (k=1, n\2, if (n%2==0, a[k] <= a[n\2], a[k] >= a[n\2])))", ")) }
%Y Cf. A272727.
%K nonn
%O 1,4
%A _Rémy Sigrist_, Nov 14 2023