Find the sum of all positive integers less than 1000 ending in 3 or 7.
I.
Sum of the Sequence: s = 3 + 7 + 13 + 17 + 23 + 27 + 33 + 37 + 43 + 47 + ... + 983 + 987 + 993 + 997
We can group in one series:
s= (3+7) + (13+17) + (23+27) + (33+37) + (43+47) + ... + (983+987) + (993+997)
s = 10 + 30 + 50 + 70 + 90 + ... + 1970 + 1990
s = 10 * ( 1 + 3 + 5 + 7 + 9 + ... + 197 + 199 )
The sum of the odd numbers ( 1 + 3 + 5 + 7 + 9 + ... + 197 + 199 ) = n^2
2n-1 = 199 -> n = 100
The sum of the odd numbers ( 1 + 3 + 5 + 7 + 9 + ... + 197 + 199 ) = n^2 = 100^2 = 10000
Sum of the Sequence: s = 10 * 10000 = 100000
You can use the sum of an arithmetic series to find the sum of: 3 + 13 + 23 + ... + 93 = 480
Now, to find the sum of the aritmetic series: 103 + 113 + 123 + ... + 193: there are 10 of these numbers and each number is 100 greater than the number in the previous series, so their sum is 10 x 100 + 480 = 1480.
Similarly, 203 + 213 + 223 + ... + 293 = 1000 + previous answer = 2480.
...
903 + 913 + 923 + ... + 993 = 9480.
You can use the sum of an arithmetic series to find the sum of these answers: 480 + 1480 + 2480 + ... + 9480.
Now, for those numbers ending in 7: each of them is 4 more than the corresponding number ending in 3. So, to the answer for those numbers ending in 3, we must add 4 x the number of numbers ending in 7.
Add these two answers together.
These are the numbers 3, 7, 13, 17, 23, 27, ..., 93, 97, 103, 107, ...
I'm going to divide these into two groups. First, the ones that end in 3.
Now, I'm just going to add the first few:
3 + 13 + 23 + 33 + ... + 93.
If you use the formula for the sum of an arithmetic series: Sum = N(F + L)/2
N = number of terms = 10 F = first term = 3 L = last term = 93
---> Sum = 10(3 + 93) / 2 = 480
Now, I'm going to add these: 103, 113, 123, ..., 193
---> Sum = 10(103 + 193)/2 = 1480
(Notice that this sum is 1000 greater than the previous sum because each of the ten numbers is 100 greater than the previous ones and 10 x 100 = 1000.)
Now, to add: 203, 213, 223, ..., 293: their sum is 2480. (Use either the formula or just add 1000 to the previous answer.
Adding 303, 313, 323, ..., 393: their sum is 3480
Etc.
Adding 903, 913, 923, ..., 993: their sum is 9480.
We end with these sums: 480 + 1480 + 2480 + ... + 9480.
Add these together -- by calculator, or again use the formula.
This gets you halfway home -- you still need to find the sum of 7, 17, 27, 37, ..., 997.
You can do this in the same manner that was used to find the sum of 3, 13, 23, 33, ..., 993
or you can realize that each of these numbers is 4 larger than the numbers of the first set --- if you can figure out how many number end with 7, you can take that number, multiply it by 4 and add that to the answer for the numbers ending with 3.
Finally, add the answer for the numbers ending with a three with the answer for the numbers ending with a seven.
Find the sum of all positive integers less than 1000 ending in 3 or 7.
I.
Sum of the Sequence: s = 3 + 7 + 13 + 17 + 23 + 27 + 33 + 37 + 43 + 47 + ... + 983 + 987 + 993 + 997
We can group in one series:
s= (3+7) + (13+17) + (23+27) + (33+37) + (43+47) + ... + (983+987) + (993+997)
s = 10 + 30 + 50 + 70 + 90 + ... + 1970 + 1990
s = 10 * ( 1 + 3 + 5 + 7 + 9 + ... + 197 + 199 )
The sum of the odd numbers ( 1 + 3 + 5 + 7 + 9 + ... + 197 + 199 ) = n^2
2n-1 = 199 -> n = 100
The sum of the odd numbers ( 1 + 3 + 5 + 7 + 9 + ... + 197 + 199 ) = n^2 = 100^2 = 10000
Sum of the Sequence: s = 10 * 10000 = 100000