By AK, 12. August 2002, the first musings, concerning A007595. First, we apply Raney's lemma to case where we have a sequence of n +1's and n+2 -1's, and prove that exactly two of its cyclical shifts are such that all the proper partial sums are >= -2. (For information about Raney's lemma, see Graham, Knuth, Patashnik: "Concrete Mathematics", pages 345 & 346 (from the Chapter 7, "Generating Function") Raney's lemma says that "If is any sequence of integers whose sum is +1, then exactly one of the cyclic shifts , , ..., has all of its partial sums positive." For the starters we change this to an equivalent fact: "If is any sequence of integers whose sum is -1, then exactly one of the cyclic shifts , , ..., has all of its proper partial sums non-negative." which is based on the same geometric thinking as the original formulation, except that the aspect of the tangential line is now -(1/m) instead of 1/m. We will refer to this condition as (*1). Then, if we have n +1's and n+2 -1's, their total sum is -2. But if we divide all summands by 2, then the total sum is -1 again, and using the same geometric thinking as behind Raney's lemma, we can be sure that there is _at least one_ cyclic shift of the summands such that all of its proper partial sums are non-negative, thus there is at least one cyclic shift of n +1's and n+2 -1's such that all the proper partial sums are > -2. We will refer to this condition as (*2). We mark r(s,k) the sequence s cyclically shifted left by k steps. We let 'a' stand for the amount needed to shift s, so that it satisfies the condition (*2), so r(s,a) is the corresponding sequence. To prove that there exists only one other amount 'b', distinct from 'a' modulo 2n+2 (the length of the whole sequence), such that also r(s,b) satisfies the condition (*2), we proceed as follows: We start constructing from r(s,a) a rooted planar binary tree, by mapping +1's to branching nodes and 0's to leaves, in left-to-right, depth-first fashion. E.g. if r(s,a) is the sequence +1, +1, -1, +1, -1, -1, -1, +1, -1, +1, -1, -1 we start constructing a binary tree (here we indicate branching nodes with 1's, corresponding to +1's in the above sequence, and leaves with 0's, corresponding to -1's): i.e. after consuming the three first terms, +1, +1 and -1, the tree looks like this, and there are two nodes open from which to continue it: 0 \ / 1 \ / 1 and when we continue we see that after "consuming" the first seven terms of the sequence, +1, +1, -1, +1, -1, -1, -1, the binary tree is ready, and there's no further "open nodes" from which to extend it. 0 0 \ / 0 1 \ / 1 0 \ / 1 Because the final sum of any cyclical shift is -2, including also ones which fulfill the condition (*2), and the absolute values of all summands are 1, there must be somewhere a point 'u' with the partial sum -1. Let's call the proper prefix of the the terms from the first one to the point 'u' a sequence 'p1', which we know to contain some k amount of +1's, and k+1 -1's. If the whole sequence satisfies the condition (*2), then this prefix must satisfy the condition (*1). Then, the terms after the point u, to the end of the cyclical shift satisfy also the condition (*1). This u is precisely the point where we need to cyclically shift s, to obtain another rotation satisfying the condition (*2): r(s,u) = r(s,b) Now, imagine that there were yet other point u' to which to rotate the sequence s, so that it would satisfy the condition (*2). Now, the prefix sub(r(s,...)) must form a valid binary tree by above construction algorithm. And the same applies to the suffix following it. Surely it begins by 1, so that 1 starts a subtree of either of the binary trees corresponding to the prefix x and suffix y. That means that if we consume ... at least when we reach the delimiting point 'u' between x and y, there will be no further open nodes left. ... there are no further "open nodes" left precisely at the delimiting point of x and y. So, next comes either x or y or one of their (other) subtrees, and when we have consumed that and built a second binary tree, we still have a few terms of the sequence left, but these cannot form a valid binary tree, because then we would have already a partial sum -3, so there are exactly one way to partition ... the rotation r(s,a) into and that is a contradiction, because after constructing two plane binary trees, we already have a partial sum -2. Now, if construct the prefix x of the sequence in depth-first left-to-right fashion, and the suffix y of the sequence in depth-first but from RIGHT-TO-LEFT fashion, and then combine these binary trees with one extra node as their root, we have a bijection from (n,n+2) binary necklaces to the plane binary trees upto the reflection. construct rooted plane binary trees