okay here's the problem...
Find the sum of all odd positive integer which is less than 6n and not multiple of 3.
I don't get the "less than 6n" part...
the answer given is 6n^2, I believe it's totally an incorrect answer, since if n=1, the answer is 6, which is a multiple of 3, isn't it?
hope you can help me out, thanks in advance...
Find the sum of all odd positive integer which is less than 6n and not multiple of 3.
I don't get the "less than 6n" part...
the answer given is 6n^2, I believe it's totally an incorrect answer, since if n=1, the answer is 6, which is a multiple of 3, isn't it?
hope you can help me out, thanks in advance...
-
the sum of numbers from 1 to 6n is
6n(6n+1)/2 =
18n^2 + 3n
find the sum of odds less than 6n
6n is always even, so half of these numbers are odd. so you want to add the first 3n odd numbers.
the kth odd number is 2k-1. so if you want to add all the odds from 1 to 2k-1 you pair off by first and last: 1+ (2k-1) = 2k. Then you multiply by the number of pairs = k/2. (same idea as you would sum from 1 to n.) here our k=3n, so we have
2*k^2/2 =
18n^2/2 =
9n^2
find the sum of multiples of 3 *that are even* up to and including 6n
(because we already got rid of the odd multiples of 3)
for every 2 numbers you have an even number. so you have 6n/2 = 3n evens. every 3 even numbers you have an even multiple of 3, so you have 3n/3 = n number of even multiples of 3.
to find this sum, add up the first n even numbers, then multiply by 3.
3 * n(n+1) =
3n^3 + 3n
Now take the sum of numbers from 1 to 6n, subtract off the odds, then the even multiples of 3.
18n^2 + 3n - 9n^2 - n^3 - 3n =
6n^2
for example n=1,
2+4 = 6 = 6 *n^2.
(the answer can be a multiple of 3, its the numbers within the sum that can't.)
6n(6n+1)/2 =
18n^2 + 3n
find the sum of odds less than 6n
6n is always even, so half of these numbers are odd. so you want to add the first 3n odd numbers.
the kth odd number is 2k-1. so if you want to add all the odds from 1 to 2k-1 you pair off by first and last: 1+ (2k-1) = 2k. Then you multiply by the number of pairs = k/2. (same idea as you would sum from 1 to n.) here our k=3n, so we have
2*k^2/2 =
18n^2/2 =
9n^2
find the sum of multiples of 3 *that are even* up to and including 6n
(because we already got rid of the odd multiples of 3)
for every 2 numbers you have an even number. so you have 6n/2 = 3n evens. every 3 even numbers you have an even multiple of 3, so you have 3n/3 = n number of even multiples of 3.
to find this sum, add up the first n even numbers, then multiply by 3.
3 * n(n+1) =
3n^3 + 3n
Now take the sum of numbers from 1 to 6n, subtract off the odds, then the even multiples of 3.
18n^2 + 3n - 9n^2 - n^3 - 3n =
6n^2
for example n=1,
2+4 = 6 = 6 *n^2.
(the answer can be a multiple of 3, its the numbers within the sum that can't.)