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.


closed as off-topic by user21820, GNUSupporter 8964民主女神 地下教會, Did, Claude Leibovici, Xander Henderson Mar 12 '18 at 13:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – user21820, GNUSupporter 8964民主女神 地下教會, Did, Claude Leibovici, Xander Henderson
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 2
    $\begingroup$ Hint: $0+0+0+0+\cdots+0+1+1+1+1+\cdots+1+\cdots+2+2+2+2+\cdots$ $\endgroup$ – Yves Daoust Sep 7 '16 at 8:17

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$.

  • $\begingroup$ Pretty smart idea. +1 $\endgroup$ – DonAntonio Sep 7 '16 at 8:25
  • $\begingroup$ Very clever! (+1) $\endgroup$ – hypergeometric Sep 7 '16 at 14:58

Look at the places where $f(n)=\frac{\sqrt n}{10}$ "trips" across integers:

  • $f(n)=1$ when $n=100$, so $\lfloor f(n)\rfloor=0$ when $n<100$
  • $f(n)=2$ when $n=400$, so $\lfloor f(n)\rfloor=1$ when $100\le n<400$ (300 numbers)
  • Similarly, $\lfloor f(n)\rfloor=2$ when $400\le n<900$ (500 numbers)…
  • $\lfloor f(n)\rfloor=3$ when $900\le n<1600$ (700 numbers)…
  • $\lfloor f(n)\rfloor=4$ when $1600\le n<2017$ (417 numbers).

The answer is $$300+2×500+3×700+4×417=5068$$

  • 3
    $\begingroup$ I got the same answer by the same approach. It took me 1 minute 53 seconds. $\endgroup$ – Barry Cipra Sep 7 '16 at 11:36

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$.


Not the answer you're looking for? Browse other questions tagged or ask your own question.