A102379 a(n) is the minimal number of nodes in a binary tree of height n.
0, 1, 2, 4, 6, 9, 12, 17, 22, 29, 36, 46, 56, 69, 82, 100, 118, 141, 164, 194, 224, 261, 298, 345, 392, 449, 506, 576, 646, 729, 812, 913, 1014, 1133, 1252, 1394, 1536, 1701, 1866, 2061, 2256, 2481, 2706, 2968, 3230, 3529, 3828, 4174, 4520, 4913
Offset: 1
Keywords
References
- de Bruijn, N. G., On Mahler's partition problem. Nederl. Akad. Wetensch., Proc. 51, (1948) 659-669 = Indagationes Math. 10, 210-220 (1948).
- Gonnet, Gaston H.; Olivie, Henk J.; and Wood, Derick, Height-ratio-balanced trees. Comput. J. 26 (1983), no. 2, 106-108.
- Mahler, Kurt On a special functional equation. J. London Math. Soc. 15, (1940). 115-123.
- Nievergelt, J.; Reingold, E. M., Binary search trees of bounded balance, SIAM J. Comput. 2 (1973), 33-43.
Programs
-
Python
from functools import cache @cache def a(n: int) -> int: return a(n - 1) + a(n // 2) + 1 if n > 1 else 0 print([a(n) for n in range(1, 51)]) # Peter Luschny, Jul 24 2022
Comments