A positive integer $n$ is considered cube-full, if for every prime $p$ that divides $n$, so does $p^3$. Note that $1$ is considered cube-full.
Let $s(n)$ be the function that counts the number of cube-full divisors of $n$. For example, $1$, $8$ and $16$ are the three cube-full divisors of $16$. Therefore, $s(16)=3$.
Let $S(n)$ represent the summatory function of $s(n)$, that is $S(n)=\displaystyle\sum_{i=1}^n s(i)$.
You are given $S(16) = 19$, $S(100) = 126$ and $S(10000) = 13344$.
Find $S(10^{18})$.
The problem is about divisors of numbers that are either powers of 2 (cube-full numbers) or 1. The value for S(n) for a general n cannot be calculated directly, but it is important to understand how the function “s” operates.
Let’s break down s(n), the function which counts the number of cube-full divisors of n.
A cube-full number can have only primes to the power of 3 or greater as divisors. Basically, any number which is a power of 2 (8, 16, 32, etc.) or 1.
The value of s(n) will increase when n hits such a number. If n is not a power of 2 or 1, s(n) will simply equal to s(n – 1) because it doesn’t add any cube-full divisors.
Now, S(n) is a sum of s(i) for i = 1 to n. This means S(n) will increase in steps, where each step corresponds to a number that is a power of 2 (cube-full) or 1. In other words, S(n) is a function which progressively takes into account the cube-full numbers up to n.
So what we need to do to find S(10^18) is count the cube-full numbers up to 10^18. This would involve counting powers of 2 up to this number.
To solve this problem, let’s find the maximum power of 2 that can be a divisor of 10^18. Take a log base 2 of 10^18, we get approximately 59.79. This means the greatest power of 2 that is less than 10^18 is 2^59.
Hence, there are 60 numbers (including 1) which are cube-full and less than or equal to 10^18 (since the powers start from 0 and go up to 59).
That is, S(10^18) is 60.
More Answers:
Tom and JerrySiegbert and Jo
Finite Sequence Generator