Evaluate:
a = 2 ∑ 1 0 0 b = 2 ∑ 1 0 0 ⌊ lo g b a ⌋
Notation: ⌊ ⋅ ⌋ denotes the floor function .
Bonus: Find an efficient way to do this problem without using a program.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
We will use the fact that ⌊ lo g b a ⌋ = k iff b k ≤ a < b k + 1 , and this inequality holds for exactly b k + 1 − b k = b k ( b − 1 ) natural numbers.
To develop this into a formula, we consider what happens when b = 4 . For a < 4 , we will have ⌊ lo g 4 a ⌋ = 0 , so they contribute nothing to our sum. When 4 ≤ a < 4 2 , we will have ⌊ lo g 4 a ⌋ = 1 , and there will be 4 ( 3 ) such terms, so they contribute 4 ( 3 ) ⋅ 1 to our sum. Similarly, when 4 2 ≤ a < 4 3 , we will have ⌊ lo g 4 a ⌋ = 2 , and there will be 4 2 ( 3 ) such terms, so they contribute 4 2 ( 3 ) ⋅ 2 to our sum. Now, however, we have to use a different formula for the contribution of the remaining terms, because the next power, 4 4 is greater than 1 0 0 . So for 4 3 ≤ a ≤ 1 0 0 , we will have ⌊ lo g 4 a ⌋ = 1 , and there will be 1 0 0 − 4 3 + 1 such terms, so they contribute ( 1 0 0 − 4 3 + 1 ) ⋅ 3 to our sum. So the total contribution to our sum for b = 4 is
4 ( 3 ) ⋅ 1 + 4 2 ( 3 ) ⋅ 2 + ( 1 0 0 − 4 3 + 1 ) ⋅ 3 = 2 1 9
In general, for b = k , the contribution will be
k ( k − 1 ) ⋅ 1 + k 2 ( k − 1 ) ⋅ 2 + k 3 ( k − 1 ) ⋅ 3 + . . . . + k n − 1 ( k − 1 ) ⋅ ( n − 1 ) + ( 1 0 0 − k n + 1 ) ⋅ n
where n ∈ N is the highest exponent such that k n ≤ 1 0 0 .
Admittedly, this is not very efficient for very low values of b , even if there's a fairly simple pattern to the terms; however, the number of terms quickly decreases as there are fewer and fewer powers of b under 1 0 0 , and in fact as we will see, when b > 1 0 we will be able to count all the contributions in one step.
\begin{aligned} &b = 2: \qquad &&2(1) \cdot 1 + 2^2(1) \cdot 2 + 2^3(1) \cdot 3 + 2^4(1) \cdot 4 + 2^5(1) \cdot 5 + (100 - 2^6 + 1) \cdot 6 &= 480 \\ &b = 3: &&3(2) \cdot 1 + 3^2(2) \cdot 2 + 3^3(2) \cdot 3 + (100 - 3^4 + 1) \cdot 4 &= 284 \\ &b = 4: &&4(3) \cdot 1 + 4^2(3) \cdot 2 + (100 - 4^3 + 1) \cdot 3 &= 219 \\ &b = 5: &&5(4) \cdot 1 + (100 - 5^2 + 1) \cdot 2 &= 172 \\ &b = 6: &&6(5) \cdot 1 + (100 - 6^2 + 1) \cdot 2 &= 160 \\ &b = 7: &&7(6) \cdot 1 + (100 - 7^2 + 1) \cdot 2 &= 146 \\ &b = 8: &&8(7) \cdot 1 + (100 - 8^2 + 1) \cdot 2 &= 130 \\ &b = 9: &&9(8) \cdot 1 + (100 - 9^2 + 1) \cdot 2 &= 112 \\ &b = 10: &&10(9) \cdot 1 + (100 - 10^2 + 1) \cdot 2 &= 92 \\ &\hline \\ & b = 2 \text{ to } 10: &&\text{ } &= 1795 \end{aligned}
For b ≥ 1 1 we will only have one term, namely ( 1 0 0 − b + 1 ) ⋅ 1 as there is only a single power of b under 100. So all those contributions can be calculated as
b = 1 1 ∑ 1 0 0 ( 1 0 1 − b ) = c = 1 ∑ 9 0 c [Using the substitution c = 1 0 1 − b ] = 2 ( 9 0 ) ( 9 1 ) = 4 0 9 5
Thus we finally arrive (not too painfully) at
a = 2 ∑ 1 0 0 b = 2 ∑ 1 0 0 ⌊ lo g b a ⌋ = 1 7 9 5 + 4 0 9 5 = 5 8 9 0
Problem Loading...
Note Loading...
Set Loading...
Relevant wiki: Arithmetic-Geometric Progression
Note that for ⌊ lo g b a ⌋ = k for b k ≤ a < b k + 1 , where k is a positive integer. Therefore, a = b k ∑ b k + 1 − 1 ⌊ lo g b a ⌋ = ( b k + 1 − b k ) k = ( b − 1 ) k b k . And the general solution is
S b S 2 S 3 S 4 = ( b − 1 ) k = 1 ∑ n − 1 k b k + ( 1 0 1 − b n ) n = ( n − 1 ) b n − b − 1 b ( b n − 1 − 1 ) + ( 1 0 1 − b n ) n = 5 ( 2 6 ) − 1 2 ( 2 5 − 1 ) + ( 1 0 1 − 2 6 ) 6 = 4 8 0 = 3 ( 3 4 ) − 2 3 ( 3 3 − 1 ) + ( 1 0 1 − 3 4 ) 4 = 2 8 4 = 2 ( 4 3 ) − 3 4 ( 4 2 − 1 ) + ( 1 0 1 − 4 3 ) 3 = 2 1 9 An AGP sum where n = ⌊ lo g b 1 0 0 ⌋
For 5 ≤ b ≤ 1 0 , n = ⌊ lo g b 1 0 0 ⌋ = 2 , then
S b ⟹ b = 5 ∑ 1 0 S b = 2 0 2 − b 2 − b = b = 5 ∑ 1 0 ( 2 0 2 − b 2 − b ) = 2 0 2 ( 6 ) − 6 1 0 ( 1 1 ) ( 2 1 ) + 6 4 ( 5 ) ( 9 ) − 2 1 0 ( 1 1 ) + 2 4 ( 5 ) = 8 1 2
For 1 1 ≤ b ≤ 1 0 0 , n = 1 , then S b = 1 0 1 − b ⟹ b = 1 1 ∑ 1 0 0 ( 1 0 1 − b ) = k = 1 ∑ 9 0 k = 2 9 0 ( 9 1 ) = 4 0 9 5 .
Therefore, a = 2 ∑ 1 0 0 b = 2 ∑ 1 0 0 ⌊ lo g b a ⌋ = b = 2 ∑ 1 0 0 S b = 4 8 0 + 2 8 4 + 2 1 9 + 8 1 2 + 4 0 9 5 = 5 8 9 0 .