0%

Problem 927


Problem 927


Prime-ary Tree

A full k-ary tree is a tree with a single root node, such that every node is either a leaf or has exactly k ordered children. The height of a k-ary tree is the number of edges in the longest path from the root to a leaf.

For instance, there is one full 3-ary tree of height 0, one full 3-ary tree of height 1, and seven full 3-ary trees of height 2. These seven are shown below.

0927_PrimeTrees.jpg

For integers n and k with n0 and k2, define tk(n) to be the number of full k-ary trees of height n or less.

Thus, t3(0)=1, t3(1)=2, and t3(2)=9. Also, t2(0)=1, t2(1)=2, and t2(2)=5.

Define Sk to be the set of positive integers m such that m divides tk(n) for some integer n0. For instance, the above values show that 1, 2, and 5 are in S2 and 1, 2, 3, and 9 are in S3.

Let S=pSp where the intersection is taken over all primes p. Finally, define R(N) to be the sum of all elements of S not exceeding N. You are given that R(20)=18 and R(1000)=2089.

Find R(107).


素数多叉树

一个完满k叉树是一棵具有单一根结点的树,其中每个结点要么是叶结点,要么恰好有k个有序子结点。k叉树的高度是从根结点到任一叶结点的最长路径上的边数。

例如,高度为0的完满3叉树有一棵,高度为1的完满3叉树有一棵,而高度为2的完满3叉树有七棵,如下图所示:

0927_PrimeTrees.jpg

对于整数n0k2,定义tk(n)为高度不超过n的完满k叉树的数量。

因此,t3(0)=1t3(1)=2t3(2)=9。同时,t2(0)=1t2(1)=2t2(2)=5

定义Sk为能整除任意整数n0对应的tk(n)的正整数m的集合。例如,从上面的例子可知,125属于S2,而1239属于S3

S=pSp,其中交集取遍所有素数p。再定义R(N)S中不超过N的所有元素之和。已知R(20)=18R(1000)=2089

R(107)

译注:原文的Full k-ary Tree直译为“满k叉树”;然而,在中文网络中,“满二叉树”的概念其实对应于英文中的Perfect Binary Tree,或“完美二叉树”。为示区别,这里参考网络资料将其翻译为“完满k叉树”。


0 comments
Anonymous
Markdown is supported

Be the first person to leave a comment!