George writes out the first 2017 positive integers. He then underlines any of the integers that are a multiple of 2, 3, and 5. He proceeds to find the sum of all the integers that have not been underlined.
What is the sum?
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.
To find the sum of the integers that have not been underlined, we have to find the difference between the the sum of the first 2017 positive integers and the sum of the underlined integers.
Finding the sum of the underlined integers
In order to find the sum of the underlined integers, that is, the integers that are a multiple of either 2, 3, or 5, we must realize that some integers are both a multiple of 3 and 2, or 3 and 5, or 2 and 5, or 2, 3, and 5. For example 30, is a multiple of 2, 3 and 5 or 45 is a multiple of 5 and 3. Ergo, we must subtract these numbers when trying to find the sum as they are counted twice or even thrice.
Sum of multiples of 3
The total sum of numbers that are a multiple of 3 can be found by utilizing the equation: 2 n ( n + 1 ) ⋅ 3 , where n is the total numbers of integers. For instance, the sum of 3 + 6 + 9 + 1 2 + 1 5 + 1 8 is 2 6 ( 6 + 1 ) ⋅ 3 = 6 3 . So the total sum of all the multiples of 3 from 1 to 2017 is going to be 2 2 0 1 6 ÷ 3 ( 2 0 1 6 ÷ 3 + 1 ) ⋅ 3 = 6 7 8 3 8 4 .
However, some of the multiples of 3 are also multiples of 2 and/or 5. By observations and logic, we can conclude that all multiples of 3 that are also a multiple of 5 are multiples of 3 ⋅ 5 = 1 5 , that is 1 5 , 3 0 , 4 5 . . . . So we should subtract the sum of all multiples of 15 from all the sum of all multiples of 3 (from 1 to 2017). The sum of the multiples of 15 can be found by using the equation: 2 n ( n + 1 ) ⋅ 1 5 . To find the sum of all multiples of 15 from 1 to 2017, we input the following in the equation: 2 2 0 1 0 ÷ 1 5 ( 2 0 1 0 ÷ 1 5 + 1 ) ⋅ 1 5 = 1 3 5 6 7 5 . Subtracting the sum of all the multiples of 3 from all the multiples of 15, we get 6 7 8 3 8 4 − 1 3 5 6 7 5 = 5 4 2 7 0 9 .
But some of the integers that are a multiple of 3 are also multiples of 2. By observations and logic, we can conclude that all multiples of 3 that are also multiples of 2 are multiples of 3 ⋅ 2 = 6 , that is 6 , 1 2 , 1 8 , 2 4 . . . ; we have to subtract the sum of all the multiples of 6 that are between 1 and 2017 from the sum of all multiples of three (minus the multiples of 3 that are multiples of 15). To find the sum of the multiples of 6, we will use the equation: 2 n ( n + 1 ) ⋅ 6 . Finding the sum of all multiples of 6 from 1 to 2017, we have: 2 2 0 1 6 ÷ 6 ( 2 0 1 6 ÷ 6 + 1 ) ⋅ 6 = 3 3 9 6 9 6 . So we should subtract 339696 from 542709 to give us 5 4 2 7 0 9 − 3 3 9 6 9 6 = 2 0 3 0 1 3 .
However, before proceeding, we should note that we have subtracted some of the integers that are a multiple of 3 twice, as some of the multiples of 3 are both multiples of 2 and 5. By observations and logic, we can conclude that the multiples of 3 that are a multiples of 2 and 5 are multiples of 3 ⋅ 5 ⋅ 2 = 3 0 , that is 3 0 , 6 0 , 9 0 , 1 2 0 . . . ; we have to add the sum of the integers of 30 that are from 1 to 2017 back to the 203013 as they were subtracted twice. The sum of integers that are a multiple of 30 can be found by the equation: 2 n ( n + 1 ) ⋅ 3 0 ; Finding the sum of all multiples of 30 from 1 to 2017, we have: 2 2 0 1 0 ÷ 3 0 ( 2 0 1 0 ÷ 3 0 + 1 ) ⋅ 3 0 = 6 8 3 4 0 ; we have to add 68340 back to 203013: 6 8 3 4 0 + 2 0 3 0 1 3 = 2 7 1 3 5 3 .
Therefore, the sum of all multiples of 3, that are between 1 and 2017, and those that are not multiples of 2 nor 5, is 271353.
Sum of multiples of 5
The total sum of numbers that are a multiple of 5 can be found by utilizing the equation: 2 n ( n + 1 ) ⋅ 5 . For instance, the sum of 5 + 1 0 + 1 5 + 2 0 + 2 5 + 3 0 is 2 6 ( 6 + 1 ) ⋅ 5 = 1 0 5 . So the total sum of all the multiples of 5 from 1 to 2017 is going to be 2 2 0 1 5 ÷ 5 ( 2 0 1 5 ÷ 5 + 1 ) ⋅ 5 = 4 0 7 0 3 0 .
We should also note that some multiples of 5 are also going to be multiples of 2. By observations and logic, we can conclude that the multiples of 5 that are also a multiple of 2 are multiples of 2 ⋅ 5 = 1 0 ; we are subtracting the sum of all multiples of 10 (that are between 1 and 2017) from the sum of all multiples of 5 (that are between 1 and 2017). To find the sum of multiples of 10, we can use the equation: 2 n ( n + 1 ) ⋅ 1 0 . Finding the sum of all the multiples of 10 between 1 and 2017, we use: 2 2 0 1 0 ÷ 1 0 ( 2 0 1 0 ÷ 1 0 + 1 ) ⋅ 1 0 = 2 0 3 0 1 0 .
Subtracting the sum of all the multiples of 10, that are from 1 and 2017, from the sum of all multiples of 5, that are between 1 and 2017, we get: 4 0 7 0 3 0 − 2 0 3 0 1 0 = 2 0 4 0 2 0 .
Sum of multiples of 2
This is the easiest one, since we got 3 and 5 out of the way. The sum of all multiples of 2 that are between 1 and 2017 can be given by the expression 2 n ( n + 1 ) ⋅ 2 or n ( n + 1 ) . To get the sum of all the integers from 1 to 2017 that are a multiple of 2, we use: 2 0 1 6 ÷ 2 ( 2 0 1 6 ÷ 2 + 1 ) = 1 0 1 7 0 7 2 .
Conclusion
The sum of all positive integers from 1 to 2017 can be given by the formula 2 n ( n + 1 ) . 2 2 0 1 7 ( 2 0 1 7 + 1 ) = 2 0 3 5 1 5 3 . To find the sum of the integers that have not been underlined , we subtract the sum of all multiples of 2, 3, and 5 that are between 1 and 2017 from the sum of all integers that are between 1 and 2017. That is, 2 0 3 5 1 5 3 − 1 0 1 7 0 7 2 − 2 0 4 0 2 0 − 2 7 1 3 5 3 = 5 4 2 7 0 8 .
Thus, the sum of all the integers that have not been underlined is 5 4 2 7 0 8 .
Let S n be the sum of all numbers from 1 to 2017 divisible by n .
Then the sum of numbers from 1 to 2017 not divisible by 2, 3, or 5 will be given by
S = S 1 − S 2 − S 3 − S 5 + S 6 + S 1 0 + S 1 5 − S 3 0
The reason is that if we subtract for example both even numbers and numbers divisible by 3, then those which are both even and divisible by 3 have been subtracted twice. So to make it right, they have to be added back. Likewise with even numbers divisible by 5, and also numbers divisible by both 3 and 5. The last term comes from the fact that for numbers divisible by 2, 3, and 5, this correction over-corrects. So that these numbers end up not subtracted at all (they are subtracted 3 times and added back 3 times). So these numbers have to be then subtracted one more time.
S 1 = 2 0 1 7 × 2 0 1 8 / 2
S 2 = 1 0 0 8 × 1 0 0 9 / 2 × 2
S 3 = 6 7 2 × 6 7 3 / 2 × 3
S 5 = 4 0 3 × 4 0 4 / 2 × 5
S 6 = 3 3 6 × 3 3 7 / 2 × 6
S 1 0 = 2 0 1 × 2 0 2 / 2 × 1 0
S 1 5 = 1 3 4 × 1 3 5 / 2 × 1 5
S 3 0 = 6 7 × 6 8 / 2 × 3 0
For example, here is how to obtain the last line: take the highest number below or equal to 2017 divisible by 30, that is 2010. Divide it by 30 to get 67. Add all whole numbers from 1 to 67 using the formula n ( n + 1 ) / 2 , which in this case is 6 7 × 6 8 / 2 . Multiply the result by 30.
Overall S = 5 4 2 , 7 0 8 .
Good solution. It's a very simple yet elegant and quick method.
Problem Loading...
Note Loading...
Set Loading...
We will use that 1 + 2 + 3 + ⋯ + n = 2 n ( n + 1 ) .
2 2 0 1 7 ∗ 2 0 1 8 − ( multiples of 2 + multiples of 3 + multiples of 5 − ( multiples of 6 + multiples of 1 0 + multiples of 1 5 − ( multiples of 3 0 ) ) ) = ANSWER
This is true, because first we subtracted the numbers which are divisible by 2 , 3 or 5 , but we subtracted the numbers twice, which are divisible by minimum two numbers from 2 , 3 and 5 . So we need to add (back) the numbers which are divisible by 2 ∗ 3 , 2 ∗ 5 , or 3 ∗ 5 . But we added twice the numbers which are divisible by 2 ∗ 3 ∗ 5 , so we need to subtract these numbers.
So the answer is:
2 2 0 1 7 ∗ 2 0 1 8 − 2 ∗ 2 1 0 0 8 ∗ 1 0 0 9 − 3 ∗ 2 6 7 2 ∗ 6 7 3 − 5 ∗ 2 4 0 3 ∗ 4 0 4 + 6 ∗ 2 3 3 6 ∗ 3 3 7 + 1 0 ∗ 2 2 0 1 ∗ 2 0 2 + 1 5 ∗ 2 1 3 4 ∗ 1 3 5 − 3 0 ∗ 2 6 7 ∗ 6 8 = 5 4 2 7 0 8