[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Solution correction
Hi there !
My value obviously is not right (it must be less than 700 right?)
So I correct it as follow:
* Suppose N(k) is the number of 7 btw 1 and 7^(k+1)-1
then we have:
N(0) = 0, N(1) = 6
N(k) = 7*N(k-1) + 6*k (1)
(details of the proof is not shown here)
* From (1) we get N(2) = 54 (number of 7s btw 1 and 7^3-1). So we need 45
7s more.
* From 7^3+1 to 2*7^3-1 there are also N(2) 7s (not include
2*7^3). Thus we already have 54*2 = 108 (7s) include 7^3 which is 111
(7s). From (7^3+5*7^2)+1 to (7^3+6*7^3)-1 there are N(1) number 7.
From (7^3+6*7^2)+1 to 2*7^3-1 there are N(1) number 7.
Thus,
From (7^3+5*7^2)+1 to 2*7^3-1 there are 2*N(1) + 2 = 14 (7s)
(number '2' comes from 7^3+ 6*7^2)
We only need throw away 11 7s, so we keep three numbers:
7^3+5*7^2 + 7
7^3+5*7^2 + 14
7^3+5*7^2 + 21 (609)
========> The solution is 609 <==============
Hope this time it is correct.
Quang.