Go to the floor

Evaluate 1 + 2 + 3 + . . . + 100 \left \lfloor{\sqrt{1}}\right \rfloor +\left \lfloor{\sqrt{2}}\right \rfloor+\left \lfloor{\sqrt{3}}\right \rfloor+...+\left \lfloor{\sqrt{100}}\right \rfloor


The answer is 625.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Paola Ramírez
Mar 7, 2015

1 = 1 \left \lfloor{\sqrt{1}}\right \rfloor=1

4 = 2 \left \lfloor{\sqrt{4}}\right \rfloor=2

9 = 3 \left \lfloor{\sqrt{9}}\right \rfloor=3

16 = 4 \left \lfloor{\sqrt{16}}\right \rfloor=4

25 = 5 \left \lfloor{\sqrt{25}}\right \rfloor=5

36 = 6 \left \lfloor{\sqrt{36}}\right \rfloor=6

49 = 7 \left \lfloor{\sqrt{49}}\right \rfloor=7

64 = 8 \left \lfloor{\sqrt{64}}\right \rfloor=8

81 = 9 \left \lfloor{\sqrt{81}}\right \rfloor=9

100 = 10 \left \lfloor{\sqrt{100}}\right \rfloor=10

Note that our floor function will change its value each square number so we have to sustract consecutive squares to find the intervals that contain each value.

4 1 = 3 4-1=3 numbers whose value is 1 1

9 4 = 5 9-4=5 numbers whose value is 2 2

16 9 = 7 16-9=7 numbers whose value is 3 3

25 16 = 9 25-16=9 numbers whose value is 4 4

36 25 = 11 36-25=11 numbers whose value is 5 5

49 36 = 13 49-36=13 numbers whose value is 6 6

64 49 = 15 64-49=15 numbers whose value is 7 7

81 64 = 17 81-64=17 numbers whose value is 8 8

100 81 = 19 100-81=19 numbers whose value is 9 9

and 10 = 10 \left \lfloor{\sqrt{10}}\right \rfloor=10

\therefore the value is 1 ( 3 ) + 2 ( 5 ) + 3 ( 7 ) + 4 ( 9 ) + . . . + 8 ( 17 ) + 9 ( 19 ) + 10 = 625 1(3)+2(5)+3(7)+4(9)+...+8(17)+9(19)+10=\boxed{625}

Can we generalize it for n^2 terms

Archit Boobna - 6 years, 3 months ago
Aryan Gaikwad
Mar 12, 2015

Java solution -

double n = 0;
for(int i = 1; i <= 100; i++)
    n += Math.floor(Math.sqrt(i));
System.out.println(n);
Brock Brown
Mar 8, 2015

Python:

1
2
from math import floor, sqrt
print sum([floor(sqrt(i)) for i in xrange(1,101)])

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...