Sum of square roots

This is the open problem number 33.

Given 2k integers a1, ... ak and b1, ... bk, all smaller than a given integer n, how close can sqrt(a1)+...+sqrt(ak)-sqrt(b1)-...-sqrt(bk) be to 0? An exemple showing that this can be small is given by the discrete derivative of the square root function, which for k=2 would be sqrt(m+3)-3sqrt(m+2)+3sqrt(m+1)-sqrt(m). A bound on how small a difference can be is obtained by repeatedly squaring until no square root remains. However, there is a huge gap between the two. If we call f(n,k) the minimum of the difference of square roots, and study g(n,k)=-log(f(n,k))/log(n) as a function of n for a fixed k, we have a linear lower bound and an exponential upper bound. For k=2, the lower bound is 2.5 and the upper bound is 3.5. In order to know which bound should be improved, I computed f(n,2) for all values of n up to 312563. The following table shows the values of n for which f(n)<f(n-1) and the corresponding values of f(n), -g(n-1) and -g(n). It seems clear from these results that the right answer is 3.5, and the discrete derivative of the square root function does not provide a good enough bound.

30.0963763-1.27155-2.1295
50.0318812-1.68759-2.14096
60.0146119-2.14096-2.35853
70.00453023-2.35853-2.7735
110.00121245-2.34388-2.80042
140.000470241-2.61803-2.90341
180.000193786-2.70444-2.95767
230.000165937-2.76565-2.77593
268.25305e-05-2.70402-2.88584
317.6258e-05-2.76442-2.76104
332.72498e-05-2.73575-3.00599
371.43202e-05-2.933-3.08892
519.99392e-06-2.85117-2.92829
538.48065e-06-2.9139-2.94128
604.57667e-06-2.86392-3.00281
683.19057e-06-2.924-2.99924
691.52986e-06-2.99924-3.16249
821.53314e-07-3.0471-3.56065
1141.27799e-07-3.31912-3.35138
1501.26976e-07-3.17206-3.16911
1643.13561e-08-3.1174-3.3879
2218.36963e-09-3.20338-3.44537
2896.62523e-09-3.28426-3.3235
3221.44467e-09-3.26303-3.52502
5617.05697e-10-3.21675-3.32903
5865.21539e-10-3.30714-3.35371
6234.56872e-10-3.32262-3.34237
7083.48342e-10-3.27793-3.31856
8189.44005e-11-3.24769-3.44177
9902.75849e-11-3.34703-3.5249
11521.54047e-11-3.44955-3.53177
21384.53525e-12-3.24714-3.40642
28502.24518e-12-3.28348-3.37171
39849.62804e-13-3.23557-3.33761
43139.4259e-13-3.30606-3.3085
43229.32169e-13-3.30777-3.30901
44536.63913e-13-3.29733-3.33764
48684.1781e-14-3.30269-3.62836
50203.83131e-14-3.61535-3.62543
78662.68348e-14-3.44397-3.48361
89704.74025e-15-3.43339-3.62382
108274.10775e-15-3.55046-3.56584
151681.15251e-15-3.44098-3.57298
243487.86629e-16-3.40557-3.44337
285947.57102e-16-3.38944-3.39316
288117.21408e-16-3.39067-3.39536
304732.1301e-16-3.37693-3.49507
367708.81501e-17-3.43263-3.51655
426262.19847e-17-3.46781-3.59807
553589.91329e-18-3.51197-3.58489
673249.47254e-18-3.52179-3.52588
773066.79908e-18-3.48257-3.51203
801362.65572e-18-3.50085-3.5841
904341.62393e-18-3.54614-3.58923
1235559.47734e-19-3.4937-3.53963
1309588.79554e-19-3.52215-3.52849
1557405.6392e-19-3.47734-3.51452
1598702.33573e-19-3.50684-3.5804
1904571.57751e-19-3.52885-3.56113
1974731.34172e-19-3.55056-3.56384
2205906.73264e-20-3.53178-3.58782
2611385.74312e-20-3.53928-3.55202