What is the value of the expression: 1-2-3+4-5+6-7+8-…..-2011+2012?
Note that all prime numbers have negative signs
The simplest way to do this would be too add all the integers from 1 to 2012, and then subtract the twice sum of all the primes less than 2012. But unless you have something to find the sum of all the primes, this problem isn't made any easier.
why would you subtract twice sum of prime numbers
Because just subtracting once would just get you the sum of the non-prime integers up to 2012. If, for example, it was only up to 10, we want to find \[1-2-3+4-5+6-7+8+9+10\]So we add\[1+2+3+4+5+6+7+8+9+10=55\]Then, if we only subtract the primes once, we would get \[1+2+3+4+5+6+7+8+9+10 -(2+3+5+7) =1+4+6+8+9+10\]So we need to subtract the prime numbers one more time to get \[1-2-3+4-5+6-7+8+9+10=21\]
The last bit of the third line of equations should read \[1+4+6+8+9+10=38\]
but then how do I find the sum of prime numbers
Join our real-time social learning platform and learn together with your friends!