Quandaries
and Queries |
|||
Who is asking: Student Level: Middle Question: |
|||
Hi, I expect that you know how to sum an arithmetic progression. There is a description of this procedure in the answers we have given to two prrevious questions, one by David and another by Rosa. Firt you need to find the sum of all positive integers not greater than 10000, I want to call it S. That is
From this you need to subtract the integers in this list that are divisible by 3. I call this S3, that is
You need also to subtract the sum of the integers that are divisible by 7. This I call S7
Thus far you have S - S3 - S7. You are not finished because you have subtracted some integers twice. For example 21 is divisible by both 3 and 7 so it has been subtracted twice. In fact every integer that is divisible by both 3 and 7 has been subtracted twice so you need to add them back in once. These are the integers that are divisible by 21. Again I will cal the sum S21, that is
Hence the sum you want is
Penny
|
|||
| |
|||