Let be a sequence which is defined recursively as follows: , for , and for where is the maximal nonnegative integer such that divides . Prove that
Problem 1796
Official solution
Solution (By Josh Nichols-Barrer). Observe that the right-hand side of the given expression is the Catalan number, which we recall is the number of well-formed strings of pairs of parentheses. Given such a string, let its signature be the integer represented in binary by the -term string whose digit from the left is 0 or 1 according to whether the parenthesis from the left is closed or open, respectively.
Let be the number of well-formed strings of pairs of parentheses with signature . Notice that the value of does not depend on , as adding leading 0's to the binary representation of inserts strings of the form after the leading open parenthesis. It suffices to show that and coincide.
Note that for any , as a string of parentheses with signature 0 must take the form
It remains only to show that and satisfy the same recursion. First, if a string has signature , its signature has a trailing 1, which forces the parenthesis string to end with . Thus, the number of strings of pairs of parentheses with signature simply equals the number of strings of pairs of parentheses with signature , which shows that (since was independent of ).
Now consider a string of pairs of parentheses with signature , where is the largest power of 2 dividing . In this case, has exactly trailing 0's. Consider the open parenthesis at position . If the parenthesis to its immediate right is a closed parenthesis, then these two may be removed as a pair, leaving a string with signature . If the parenthesis at position is open, then it may be removed with the parenthesis to its right (a closed parenthesis because had trailing 0's), leaving a string with signature . Both operations are reversible, showing that .
Therefore, and have the same initial value and are uniquely determined by the same recursion, so for all , as needed.