Approximation of Sum of square roots of n

168 Views Asked by At

I recently came across a puzzle which was asked in an interview.

The puzzle requires us to compute sum of square root of first 50 natural numbers without any aid of computer (in fact just in head!).

Is there any mathematical way to calculate this or is he trying to test the computational ability of the participant?

2

There are 2 best solutions below

3
On

Personally, I think the best way to get an approximation fast is to say $\sum_{i=1}^{50} \sqrt{i} $ is pretty much $\int_0^{50}\sqrt{x}dx = \frac{2}{3}\sqrt{50}\times 50 \approx 7^+ \times 50 \times \frac{2}{3} \approx 351 \times \frac{2}{3} = 234 $

A little off...

However, the first question coming to my mind is : what kind of job was it?

It happens that interviewers ask this kind of questions to catch people off-guard, but this seems just absurd.

0
On

Vincent gave a simple and elegant solution.

There is another possibility if you know generalized harmonic numbers since $$S_n=\sum_{i=1}^n \sqrt i=H_n^{\left(-\frac{1}{2}\right)}$$ Assuming that $n$ is large, the asymptotics is given by $$S_n=\frac{2 n^{3/2}}{3}+\frac{\sqrt{n}}{2}+\zeta \left(-\frac{1}{2}\right)+O\left(\frac{1}{n^{3/2}}\right)$$ but $\zeta \left(-\frac{1}{2}\right)\approx -0.207886$ which is quite small. Neglecting it, then $$S_n\approx \frac{4n+3}6 \sqrt n$$ If $n=50$, $\sqrt {50}\approx 7$ which makes $S_{50}\approx \frac {1421}6\approx 237$ while the exact value would be $\approx 239$.