All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Summing up (Posted on 2016-08-17)
Evaluate the value of
SUMn=1 to 2016 ((-1)n*int (sqrt(n)))

 See The Solution Submitted by Ady TZIDON No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 solution Comment 2 of 2 |
let
int(sqrt(n))=k
then
k<=sqrt(n)<k+1
k^2<=n<(k+1)^2

the perfect squares from 1 to 2016 are:
1^2,2^2,...,44^2
thus we can subdivide the summation as so
sum(k=1 to 44,sum(n=k^2 to (k+1)^2-1,(-1)^n*k))
we can take the k out of the inner sum
sum(k=1 to 44,k*sum(n=k^2 to k(k+2),(-1)^n)
several of the terms in the inner sum will cancel
if k is even then we get 1
if k is odd then we get -1
so the inner sum is simply (-1)^k
so now we have
sum(k=1 to 44,k*(-1)^k)
which can be computed by hand to be
22

finally, for k=44 we included too many values of n
so we need to make a final adjustment
for k=44 we let n range from 1936 to 2024
however the original sum stops at 2016
so we need to subtract the following sum
sum(n=2017 to 2024,44*(-1)^n)
which turns out to be 0

thus the final answer is 22

 Posted by Daniel on 2016-08-18 07:01:22

 Search: Search body:
Forums (0)