884. Removing Cubes

Starting from a positive integer n, at each step we subtract from n the largest perfect cube not exceeding n, until n becomes 0.
For example, with n=100 the procedure ends in 4 steps:

1004336339231130.

Let D(n) denote the number of steps of the procedure. Thus D(100)=4.

Let S(N) denote the sum of D(n) for all positive integers n strictly less than N.
For example, S(100)=512.

Find S(1017).

884. 移除立方数

对某正整数 n,我们不断将 n 减去不大于它的最大立方数,直至 n0 时停止。我们记 D(n) 为该过程中执行的减法的次数。例如 n=100 时,一共需要减去 4 个立方数,所以 D(100)=4

1004336339231130.

再记 S(N) 为:对于所有严格小于 Nn,其 D(n) 之和。已知:S(100)=512

S(1017)


这个链接 回到源站。

这个链接 回到详细版题目目录。