Find $$\sum_{n=1}^{2016}\left\lfloor\frac{\sqrt n}{10}\right\rfloor$$ where $\lfloor x\rfloor$ is the greatest integer less than or equal to $x$.
Apparently it is to be solved within 2 minutes! But I am completely lost on how to solve this.
Find $$\sum_{n=1}^{2016}\left\lfloor\frac{\sqrt n}{10}\right\rfloor$$ where $\lfloor x\rfloor$ is the greatest integer less than or equal to $x$.
Apparently it is to be solved within 2 minutes! But I am completely lost on how to solve this.
On
Notice that $$ \frac{\sqrt{n}}{10} \le \frac{\sqrt{2016}}{10} < 5. $$ That means, that for $1 \le n \le 2016$, we have $$ \left\lfloor\frac{\sqrt{n}}{10} \right\rfloor \in \{0, 1, 2, 3, 4\}. $$ You just have to count for how many $n$ it is each of $0, 1, 2, 3$, and $4$.
On
Look at the places where $f(n)=\frac{\sqrt n}{10}$ "trips" across integers:
The answer is $$300+2×500+3×700+4×417=5068$$
Just write it as:
$$\sum \left\lfloor{\frac{\sqrt{n}}{10}}\right\rfloor=\sum \left\lfloor \sqrt{\frac{n}{100}}\right\rfloor$$
Then just search for when you change integer, for example you get $3$ as soon as you are above $\sqrt{9}$ and under $\sqrt{16}$ where you will change for $4$, so for $n\geq 900$, $n<1600$.