Creating an K-nary tree that is balanced in both width and depth for N nodes. N known a priori
This sounds as follows.


The answer is that the optimal number of children in a tree is $e$. What was "optimal" in the question?


One such question is as follows.


Let us construct a tree of $N$ nodes.
Imagine we arrange them into a perfect $K$-ary tree with $L$ levels of internal vertices.
When we search over such tree, assume that the worst case is that we visit $K$ vertices in each of the $L$ internal levels, making the search $O (K \cdot L)$.
What is the optimal $K$ as $N$ tends to infinity?


Here, we select $K$, and then $L$ is computed as $log_K N$.

When we think about it a bit, here is an arithmetic rephrase.


We have a number $N$.
We want to express some integer $M \ge N$ as a product of integers $S_1 \cdot S_2 \cdots S_L$ so that the sum $S_1 + S_2 + \ldots + S_L$ is minimal possible.
When $N$ tends to infinity, what will be the sequence $\{S\}$?


The values $S_1, S_2, \ldots, S_L$ are the number of children at levels $1, 2, \ldots, L$, respectively.
If we had a perfect $K$-ary tree, all our $S_i$ would be equal to $K$, but we lifted the restriction that they are all equal: the essence of the solution remains the same.

When we don't insist that $N$ and $S_i$ are integers, after performing some basic calculus, we can see that the optimal answer is to pick all $S_i$ close to $e$.
Note that the closest integer to $e$ is $3$.
So for the integer version, the optimal answers turn out to be of the following forms:
$$(3 \cdot 3 \cdots 3)$$
$$(3 \cdot 3 \cdots 3) \cdot 2$$
$$(3 \cdot 3 \cdots 3) \cdot 2 \cdot 2$$