Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #15 Jan 04 2015 22:55:59
%S 0,0,0,1,0,1,1,1,0,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,
%T 0,1,0,1,1,1,0,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,
%U 0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0
%N a(n) = A252742(A005940(1+n)).
%C a(n) tells whether the n-th node in A005940 (here counted with offset 0) has a pair of children where the left child is larger than the right child, see illustration in A005940 and one below.
%H Antti Karttunen, <a href="/A252743/b252743.txt">Table of n, a(n) for n = 0..8191</a>
%F a(n) = A252742(A005940(1+n)).
%F a(n) = A252744(A054429(n)). [The tree is a mirror image of the tree of A252744.]
%F Other identities. For all n >= 1:
%F sgn(A252750(n)) = (-1)^(1+a(n)).
%e The first six levels of the binary tree (compare also to the illustration given at A005940):
%e 0
%e |
%e 0
%e ............../ \..............
%e 0 1
%e ....../ \...... ....../ \......
%e 0 1 1 1
%e / \ / \ / \ / \
%e / \ / \ / \ / \
%e 0 1 1 1 0 1 1 1
%e / \ / \ / \ / \ / \ / \ / \ / \
%e 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
%e For n=0, the corresponding node in A005940(0+1) is 1, which has just one child 2, thus we set a(0) = 0.
%e For n=1, the corresponding node in A005940(1+1) is 2, which has children 3 and 4, in correct order, thus a(1) = 0.
%e Similarly for node 3, with children 5 < 6, thus a(2) = 0. But for node 4, with its children 9 > 8, we set a(3) = 1.
%o (Scheme) (define (A252743 n) (A252742 (A005940 (+ 1 n))))
%Y Cf. A005940, A003961, A048673.
%Y Permutations: A252742, A252744.
%Y Cf. A252745 (number of ones) and A252746 (number of zeros on each level of binary tree), A252750, A252751.
%K nonn,tabf
%O 0
%A _Antti Karttunen_, Dec 21 2014