A153239 Balance of binary trees as ordered by A014486: number of vertices in the right subtree minus number of vertices in the left subtree.
0, 0, 1, -1, 2, 2, 0, -2, -2, 3, 3, 3, 3, 3, 1, 1, -1, -3, -3, -1, -3, -3, -3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 2, 2, 2, 2, 2, 0, 0, -2, -4, -4, -2, -4, -4, -4, 0, 0, -2, -4, -4, -2, -4, -4, -4, -2, -4, -4, -4, -4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 0
Keywords
Examples
A014486(19) encodes the following binary tree: .\/ ..\/.\/ ...\./ Because the subtree at the right contains just one internal node and the subtree at the left contains two, we have a(19) = 1-2 = -1.
Links
- A. Karttunen, Table of n, a(n) for n = 0..2055
Comments