A sequence of rooted trees is constructed such that has nodes numbered to .
The sequence starts at , a tree with a single node as a root with the number .
For , is constructed from using the following procedure:
Trace a path from the root of to a leaf by following the largest-numbered child at each node.
Remove all edges along the traced path, disconnecting all nodes along it from their parents.
Connect all orphaned nodes directly to a new node numbered , which becomes the root of .
For example, the following figure shows and . The path traced through during the construction of is coloured red.

Let be the sum of the node numbers along the path connecting the root of to the node , including the root and the node . For example, and .
Find .
872. 递归生成的树
我们按如下规则生成一列有根树 ,使得 恰有标号为 的 个结点。初始时, 是只含 号结点且以该结点为根的有根树。
对诸 ,我们按如下流程,用 构造 :
下图展示了用 构造出 的过程,第一步中走出的路径已被标红。

记 为:从 的根节点到 号结点的最短路径上,所有结点(包括根节点、 号结点)标号的和。例如,、。
求 。
点 这个链接 回到源站。
点 这个链接 回到详细版题目目录。