OFFSET
0,8
COMMENTS
The height of binary trees is computed here in the same way as in A073345, except that whenever a complete binary tree of (2^k)-1 nodes with all its leaves at the same level, i.e., one of the following trees:
____________________\/\/\/\/_
_____________\/__\/__\/__\/__
______________\__/____\_ /___
____.____\/____\/______\/____ etc.
is encountered as a terminating subtree, it is regarded just a variant of . (an empty tree, a single leaf) and contributes nothing to the height of the tree.
LINKS
H. Bottomley and A. Karttunen, Notes concerning diagonals of the square arrays A073345 and A073346.
FORMULA
(See the Maple code below. Note that here we use the same convolution recurrence as with A073345, but only the initial conditions for the first two rows (k=0 and k=1) are different. Is there a nicer formula?)
EXAMPLE
The top-left corner of this square array:
1 1 0 1 0 0 0 1 ...
0 0 2 0 2 2 0 0 ...
0 0 0 4 4 8 12 12 ...
0 0 0 0 8 16 40 80 ...
MAPLE
A073346bi := proc(n, k) option remember; local i, j; if(0 = k) then RETURN(A036987(n)); fi; if(0 = n) then RETURN(0); fi; 2 * add(A073346bi(n-i-1, k-1) * add(A073346bi(i, j), j=0..(k-1)), i=0..floor((n-1)/2)) + 2 * add(A073346bi(n-i-1, k-1) * add(A073346bi(i, j), j=0..(k-2)), i=(floor((n-1)/2)+1)..(n-1)) - (`mod`(n, 2))*(A073346bi(floor((n-1)/2), k-1)^2) - (`if`((1=k), 1, 0))*A036987(n); end;
A025581 := n -> binomial(1+floor((1/2)+sqrt(2*(1+n))), 2) - (n+1);
A002262 := n -> n - binomial(floor((1/2)+sqrt(2*(1+n))), 2);
CROSSREFS
Variant: A073345. The first row: A036987. Column sums: A000108. Diagonals: T(n, n) = A000007(n), T(n+1, n) = A000079(n), T(n+2, n) = A058922(n), T(n+3, n) = A074092(n) - [see the attached notes.].
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Jul 31 2002
EXTENSIONS
Sequence number in comments corrected
STATUS
approved