Ashley writes out the first 2017 positive integers. She then underlines any of the 2017 integers that is a multiple of 2, and then underlines any of the 2017 integers that is a multiple of 3, and then underlines any of the 2017 integers that is a multiple of 5. Finally, Ashley finds the sum of all the integers which have not been underlined. What is this sum?
, 2017
Pick one
Solution
Solution 1
The sum of the positive integers from 1 to is given by the expression .
For example when , the sum can be determined by adding these integers to get 21, or by using the expression .
Using this expression, the sum of the positive integers from 1 to 2017, or is .
To determine the sum of the integers which Ashley has not underlined, we must subtract from 2 035 153 any of the 2017 integers which is a multiple of 2, or a multiple of 3, or a multiple of 5, while taking care not to subtract any number more than once.
First, we find the sum of all of the 2017 numbers which are a multiple of 2.
This sum contains 1008 integers and is equal to .
Since each number in this sum is a multiple of 2, then this sum is equal to twice the sum , since , , , and so on.
That is, .
Using the formula above, the sum of the first 1008 positive integers is equal to , and so
.
We may similarly determine the sum of all of the 2017 numbers which are a multiple of 3.
This sum is equal to and contains 672 integers (since ).
Since each of these numbers is a multiple of 3, is equal to .
The sum of all of the 2017 numbers which are a multiple of 5 is equal to
or which is equal to .
We summarize this work in the table below.
Description
Sum
Result
All integers from 1 to 2017
2 035 153
Integers that are a multiple of 2
1 017 072
Integers that are a multiple of 3
678 384
Integers that are a multiple of 5
407 030
If we now subtract the sum of any of the 2017 integers which is a multiple of 2, or a multiple of 3, or a multiple of 5 from the sum of all 2017 integers, is the result our required sum?
The answer is no. Why?
There is overlap between the list of numbers that are a multiple of 2 and those that are a multiple of 3, and those that are a multiple of 5.
For example, any number that is a multiple of both 2 and 3 (and thus a multiple of 6) has been included in both lists and therefore has been counted twice in our work above.
We must add back into our sum those numbers that are a multiple of 6 (multiple of both 2 and 3), those that are a multiple of 10 (multiple of both 2 and 5), and those that are a multiple of 15 (multiple of both 3 and 5).
The sum of all of the 2017 numbers which are a multiple of 6 is equal to
, which is equal to .
The sum of all of the 2017 numbers which are a multiple of 10 is equal to , which is equal to .
The sum of all of the 2017 numbers which are a multiple of 15 is equal to , which is equal to .
We again summarize this work in the table below.
Description
Sum
Result
All integers from 1 to 2017
2 035 153
Integers that are a multiple of 2
1 017 072
Integers that are a multiple of 3
678 384
Integers that are a multiple of 5
407 030
Integers that are a multiple of 6
339 696
Integers that are a multiple of 10
203 010
Integers that are a multiple of 15
135 675
If we take the sum of all 2017 integers, subtract those that are a multiple of 2, and those that are a multiple of 3, and those that are a multiple of 5, and then add those numbers that were subtracted twice (the multiples of 6, the multiples of 10, and the multiples of 15), then we get: Is this the required sum?
The answer is still no, but we are close!
Consider any of the 2017 integers that is a multiple of 2, 3 and 5 (that is, a multiple of ).
Each number that is a multiple of 30 would have been underlined by Ashley, and therefore should not be included in our sum.
Each multiple of 30 was subtracted from the sum three times (once for each of the multiples of 2, 3 and 5), but then added back into our sum three times (once for each of the mutiples of 6, 10 and 15).
Thus, any of the 2017 integers that is a multiple of 30 must still be subtracted from 611 048 to achieve our required sum.
The sum of all of the 2017 numbers which are a multiple of 30 is equal to , which is equal to .
Finally, the sum of the 2017 integers which Ashley has not underlined is .
Solution 2
We begin by considering the integers from 1 to 60.
When Ashley underlines the integers divisible by 2 and by 5, this will eliminate all of the integers ending in 0, 2, 4, 5, 6, and 8.
This leaves .
Of these, the integers are divisible by 3.
Therefore, of the first 60 integers, only the integers will not be underlined.
Among these 16 integers, we notice that the second set of 8 integers consists of the first 8 integers with 30 added to each.
This pattern continues, so that a corresponding set of 8 out of each block of 30 integers will not be underlined.
Noting that 2010 is the largest multiple of 30 less than 2017, this means that Ashley needs to add the integers Let equal the sum of these integers.
Before proceeding, we justify briefly why the pattern continues:
Every positive integer is a multiple of 30, or 1 more than a multiple of 30, or 2 more than a multiple of 30, and so on, up to 29 more than a multiple of 30. Algebraically, this is saying that every positive integer can be written in one of the forms depending on its remainder when divided by 30.
Every integer with an even remainder when divided by 30 is even, since 30 is also even.
Similarly, every integer with a remainder divisible by 3 or 5 when divided by 30 is divisible by 3 or 5, respectively.
This leaves us with the forms No integer having one of these forms will be underlined, since, for example, is one more than a multiple of 2 and 5 (namely, ) and is 2 more than a multiple of 3 (namely, ) so is not divisible by 2, 3 or 5.
The sum of the 8 integers in the first row of the table above is .
Since each of the integers in the second row of the table is 30 greater than the corresponding integer in the first row, then the sum of the numbers in the second row of the table is .
Similarly, the sum of the integers in the third row is , and so on.
We note that and , so there are 67 complete rows in the table.
Therefore,
Here, we have used the fact that the integers from 1 to 66 can be grouped into 33 pairs each of which adds to 67, as shown here: