⌈ 1 ⌉ + ⌈ 1 . 7 ⌉ + ⌈ 2 . 4 ⌉ + ⌈ 3 . 1 ⌉ + … + ⌈ 9 9 9 . 9 ⌉ = ?
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.
Exactly Same Solution, It's one of the best questions on Brilliant ever.
Near about the same method. Nice question as well as solution
{1+0.7k}=0.0 , 0.1, ..., 0.9 Then k=0,3,6,9,2,5,8,1,4,7 mod 10 So sums are 1+(1+7 1)+...+(1+7 142)+ 4+(4+7 1)+...+(4+7 142)+ 6+(6+7 1)+...+(6+7 142)+ 8+(8+7 1)+...+(8+7 141)+ 3+(3+7 1)+...+(3+7 142)+ 5+(5+7 1)+...+(5+7 142)+ 7+(7+7 1)+...+7 142+ 2+(2+7 1)+...+(2+7 142)+ 4+(4+7 1)+...+(4+7 142)+ 6+(6+7 1)+...+(6+7 142)= 143(498+501+503+505+500+ 502+497+499+501+503) -8-7 142= 143(500 10-2+1+3+5+2-3-1+1+3-7)-1=143(5000+2)-1=715286-1= 715285
In C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Output:
1 |
|
I wrote the ceiling values and compared it with the natural number series i.e 1 , 2 , 3 , 4 , 5 , 6 .
I found out the difference in the values and subtracted it from the sum of the natural number series.
My solution goes as -
CLARIFICATION
I found out the number of terms using AP Formula.
Good observation of a pattern. For completeness, you should further elaborate on the pattern of differences that you found, and justify why there has to be such a pattern.
The expression can be written like this: ⌈ 1 ⌉ + ⌈ 1 + 0 . 7 ⌉ + ⌈ 1 + 1 . 4 ⌉ + ⌈ 1 + 2 . 1 ⌉ + . . . + ⌈ 1 + 9 9 8 . 9 ⌉ . Given that 0 . 7 9 9 8 . 9 = 1 4 2 7 , then
⌈ 1 ⌉ + ⌈ 1 + 0 . 7 ⌉ + ⌈ 1 + 1 . 4 ⌉ + ⌈ 1 + 2 . 1 ⌉ + . . . + ⌈ 1 + 9 9 8 . 9 ⌉ = ∑ k = 0 1 4 2 7 ⌈ 1 + 0 . 7 k ⌉ = ∑ k = 0 1 4 2 7 ( 1 + ⌈ 0 . 7 k ⌉ )
= 1 4 2 8 + ∑ k = 1 1 4 2 7 ⌈ 0 . 7 k ⌉ .
Let´s solve the sum. With the first 10 terms of ⌈ 0 . 7 k ⌉ : 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, its sum (43) and 1 0 1 4 2 7 = 1 4 2 . 7 , ∑ k = 1 1 4 2 7 ⌈ 0 . 7 k ⌉ is modified to
1 4 2 s u m s k = 1 ∑ 1 0 ⌈ 0 . 7 k ⌉ + k = 1 ∑ 1 0 ⌈ 0 . 7 k + 7 ⌉ + k = 1 ∑ 1 0 ⌈ 0 . 7 k + 1 4 ⌉ + . . . + k = 1 ∑ 1 0 ⌈ 0 . 7 k + 7 ( n − 1 ) ⌉ + . . . + k = 1 ∑ 1 0 ⌈ 0 . 7 k + 9 8 7 ⌉ + ∑ k = 1 7 ⌈ 0 . 7 k + 9 9 4 ⌉ . In this case n is the number of the sum.
Simplifying the equation above
1 4 2 ∑ k = 1 1 0 ⌈ 0 . 7 k ⌉ + 1 0 ∑ k = 1 1 4 1 7 k + ∑ k = 1 7 9 9 4 + ∑ k = 1 7 ⌈ 0 . 7 k ⌉
We know that ∑ k = 1 1 0 ⌈ 0 . 7 k ⌉ = 4 3 , therefore the answer is
1 4 2 8 + 1 4 2 ∗ 4 3 + 1 0 ∗ 7 ( 2 1 4 1 ∗ 1 4 2 ) + 7 ∗ 9 9 4 + ( 4 3 − 7 − 7 − 6 ) = 1 4 2 8 + 6 1 0 6 + 7 0 0 7 7 0 + 6 9 5 8 + 2 3 = 7 1 5 2 8 5
Let's tackle it with modulus! Recall that for any rational number, ⌈ n m ⌉ = n m − n m o d ( m , n ) + 1 − { 1 0 m o d ( m , n ) = 0 otherwise , m ∈ Z , n ∈ N
For simplicity, let N : = 1 4 2 7 . Then we can rewrite the given series: \[\begin{align} S&:=\sum_{k=0}^N\left\lceil 1+\frac{7k}{10}\right\rceil=\sum_{k=0}^N\green{1+1}+\frac{7k}{10}-\frac{\mod(7k,\:10)}{10}-\begin{cases} \red{1}&\mod(7k,\:10)=0\\ 0&\text{otherwise} \end{cases}\\
&=\green{2(N+1)}+\frac{7N(N+1)}{10\cdot 2}-\red{ \left\lfloor\frac{N}{10}+1\right\rfloor }-\frac{1}{10}\sum_{k=0}^N\mod(7k,\:10)&(*) \end{align}\] The remaining part of the sum is tricky. Notice that m o d ( 7 k , 1 0 ) has a period of 10: k m o d ( 7 k , 1 0 ) 0 0 1 7 2 4 3 1 4 8 5 5 6 2 7 9 8 6 9 3 1 0 0 … … ⇒ k = 0 ∑ 9 m o d ( 7 k , 1 0 ) = k = 0 ∑ 9 k = 2 9 ( 9 + 1 ) = 4 5 As long as we sum over a whole period, we will always get 4 5 . Our sum consists of 1 4 2 periods plus a rest, or (to make things easier) it shall consist of 1 4 3 periods minus a rest: k = 0 ∑ N m o d ( 7 k , 1 0 ) = 1 4 3 ⋅ 4 5 − m o d ( 7 ⋅ 1 4 2 8 , 1 0 ) − m o d ( 7 ⋅ 1 4 2 9 , 1 0 ) = 1 4 3 ⋅ 4 5 − 6 − 3 = 6 4 2 6
Pluck that value and N = 1 4 2 7 into ( ∗ ) , to get S = 7 1 5 2 8 5
Now lets first calculate the arithmetic progression without the ceiling function ( f(x)), then sum what is added on from rounding. Step 1: let n = number of terms such that n = 0 . 7 9 9 9 . 9 − 1 +1 = 1428, a = 1st term = 1, d = common difference = 0.7. Now: s n = 2 n ( 2 a + ( n − 1 ) d ) = 7 1 4 6 4 2 . 6 < f ( x ) The amount added on each time repeats in a cycle mod (10) (as 0.7 × 10 = 7) as follows: (0 + 0.3 + 0.6 + 0.9 + 0.2 + 0.5 + 0.8 + 0.1 + 0.4 + 0.7) = 4.5. It is easy to see that 1 0 1 4 2 8 = 142 r8 ∴ f ( x ) = 7 1 4 6 4 2 . 6 + ( 4 . 5 × 1 4 2 ) + 3 . 4 = 7 1 5 2 8 5
Great problem! :D
The pattern 1 , 2 , 3 , 4 , 4 , 5 , 6 , 6 , 7 , 8 , 8 , … continues in the sequence. Notice that all terms congruent to 1 , 4 , 6 mod 7 are counted twice except for 1 . There are a total of 1 4 3 of the 4 , 6 mod 7 pairs and a total of 1 4 2 of the 1 mod 7 pairs, so therefore the answer is 2 1 0 0 1 ( 1 0 0 0 ) + 1 4 2 ( 2 8 + 9 9 5 ) + 1 4 3 ( 2 6 + 1 0 0 0 + 2 4 + 9 9 8 ) = 7 1 5 2 8 5 .
Problem Loading...
Note Loading...
Set Loading...
Nice problem! We have to see a series going on here. It is an AP going on in the ceiling function. So, it is not just a simple series. As d = 0.7, after 10 terms, the term which we started our counting will get added by 7(0.7 * 10). In other words, this will be the series
⌈ 1 ⌉ + ⌈ 1 . 7 ⌉ + ⌈ 2 . 4 ⌉ + ⌈ 3 . 1 ⌉ + ⌈ 3 . 8 ⌉ + ⌈ 4 . 5 ⌉ + ⌈ 5 . 2 ⌉ + ⌈ 5 . 9 ⌉ + ⌈ 6 . 6 ⌉ + ⌈ 7 . 3 ⌉ + ⌈ 8 ⌉ + . . . . . + ⌈ 9 9 9 . 9 ⌉
Therefore, 10 A.P.'s with d = 7 go on simultaneously in the series.
Now our last term of the series i.e. ⌈ 9 9 9 . 9 ⌉ corresponds to ⌈ 5 . 9 ⌉ and so, it is the last term of the AP with first term as 6.
So, we can find the number of terms in the AP using its general term-
6 + (n-1)7 = 1000
n-1 = 142, n = 143
Now, using the sum formula of AP,
S = 2 1 4 3 ( 6 + 1 0 0 0 )
Similarly, for all the AP's with a = 6, 5, 4, 3, 2, 1; n = 143.
For the AP's with a = 7, 8; n = 142.
Hence, finally adding all the sums
2 1 4 3 ( 6 + 1 0 0 0 ) + 2 1 4 3 ( 6 + 1 0 0 0 ) + 2 1 4 3 ( 5 + 9 9 9 ) + 2 1 4 3 ( 4 + 9 9 8 ) + 2 1 4 3 ( 4 + 9 9 8 ) + 2 1 4 3 ( 3 + 9 9 7 ) + 2 1 4 3 ( 2 + 9 9 6 ) + 2 1 4 3 ( 1 + 9 9 7 ) + 2 1 4 2 ( 7 + 9 9 4 ) + 2 1 4 2 ( 8 + 9 9 5 ) = 7 1 5 2 8 5