0%

Problem 884


Problem 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).


扣除立方数

从任意正整数n开始,每一步依次扣除不超过n的最大立方数,直到n变为0

例如,从n=100开始需要4步:
1004336339231130
D(n)为从n开始所需要的步数,因此D(100)=4

S(N)为所有严格小于N的正整数n所对应的D(n)之和。

例如,S(100)=512

S(1017)


Gitalking ...