Rounding the arithmetic mean value of the square roots of the first n integers
aa r X i v : . [ m a t h . N T ] M a r ROUNDING THE ARITHMETIC MEAN VALUEOF THE SQUARE ROOTS OF THE FIRST n INTEGERS
THOMAS P. WIHLER
Abstract.
In this article we study the arithmetic mean value Σ( n ) of thesquare roots of the first n integers. For this quantity, we develop an asymptoticexpression, and derive a formula for its integer part which has been conjecturedrecently in the work of M. Merca. Furthermore, we address the numericalevaluation of Σ( n ) for large n ≫ The aim of this article is to derive an explicit formula for the integer part of thearithmetic mean value of the square roots of the first n integers. More precisely,we consider the sequence Σ( n ) = 1 n n X k =1 √ k, n ∈ N , and show the following identity. Theorem 1.
For any n ∈ N , there holds that (1) ⌊ Σ( n ) ⌋ = ⌊ A ( n ) ⌋ , where we define the function (2) A ( x ) = 23 √ x + 1 (cid:18) x (cid:19) , for x ≥ . Here, ⌊·⌋ signifies the integer part of a positive real number. This result is motivated by the recent work [Mer17, see Conjecture 2], whereTheorem 1 has been conjectured.1.
An asymptotic result
In order to prove Theorem 1, we begin by deriving an asymptotic result for thesum of the square roots of the first n integers. Here, we employ an idea presentedin [Mer17], which is based on using the trapezium rule for the numerical approx-imation of integrals. In this context, we also point to the related work [She13],where upper and lower Riemann sums have been applied. In comparison to theanalysis pursued in [Mer17], in the current paper, we use a different approach tocontrol the error in the trapezium rule. Thereby, we arrive at a slightly sharperasymptotic representation for large n . Incidentally, an asymptotic representationhas been derived already in the early work [Ram00]. Theorem 2.
For any ν, n ∈ N , with ν < n , there holds n X k = ν √ k = nA ( n ) − √ ν (cid:18) ν − (cid:19) − δ ν,n , with (3) σ ( ν + 2 , n + 2) < δ ν,n < σ ( ν, n ) , Mathematics Institute, University of Bern, CH-3012 Bern, Switzerland
E-mail address : [email protected] . where σ ( ν, n ) = ( / − n − / if ν = 1 , ( ν − − / − n − / if ν ≥ . Proof.
Let us consider the function f ( x ) = √ x , for x ≥
1. We interpolate it bya piecewise linear function ℓ in the points x = 1 , , . . . , i.e., for any k ∈ N thereholds ℓ ( k ) = √ k , and ℓ is a linear polynomial on the interval [ k, k + 1]. We definethe remainder term b δ ν,n := Z n +1 ν (cid:0) √ x − ℓ ( x ) (cid:1) d x = 23 (cid:16) ( n + 1) / − ν / (cid:17) − Z n +1 ν ℓ ( x ) d x. Then, we note that Z n +1 ν ℓ ( x ) d x = 12 √ ν + n X k = ν +1 √ k + 12 √ n + 1;this is the trapezium rule for the numerical integration of f . Therefore, n X k = ν +1 √ k = 23 (cid:16) ( n + 1) / − ν / (cid:17) − √ ν − √ n + 1 − b δ ν,n = 23 √ n + 1 (cid:18) n + 14 (cid:19) − √ ν (cid:18) ν + 34 (cid:19) − b δ ν,n . Hence, n X k = ν √ k = 23 √ n + 1 (cid:18) n + 14 (cid:19) − √ ν (cid:18) ν − (cid:19) − b δ ν,n = nA ( n ) − √ ν (cid:18) ν − (cid:19) − b δ ν,n . It remains to study the error term b δ ν,n . For this purpose, applying twofold integra-tion by parts, for k ∈ N , we note that Z k +1 k (cid:0) √ x − ℓ ( x ) (cid:1) d x = − Z k +1 k (cid:0) √ x − ℓ ( x ) (cid:1) d d x (cid:0) − x − k − / ) (cid:1) d x = 132 Z k +1 k x − / (cid:0) − x − k − / ) (cid:1) d x< k − / Z k +1 k (cid:0) − x − k − / ) (cid:1) d x = 148 k − / . Thus, if ν ≥
2, we obtain b δ ν,n = n X k = ν Z k +1 k (cid:0) √ x − ℓ ( x ) (cid:1) d x< n X k = ν k − / < Z nν − x − / d x = 124 (cid:16) ( ν − − / − n − / (cid:17) . Otherwise, if ν = 1, the above bound implies b δ ,n <
148 + b δ ,n < (cid:18) − n − / (cid:19) . Similarly, we have b δ ν,n > n X k = ν ( k + 1) − / > Z n +2 ν +1 x − / d x = 124 (cid:16) ( ν + 1) − / − ( n + 2) − / (cid:17) . This completes the proof. (cid:3)
For ν = 1 the above result implies the identity(4) Σ( n ) = A ( n ) − n − δ ,n n , which will be crucial in the analysis below. Remark 1.
Proceeding in the same way as in the proof of Theorem 2, a formulafor the more general case of the arithmetic mean value of the r -th roots of the first n integers, with r ≥
1, can be derived: More precisely, for any ν, n ∈ N , with ν < n ,there holds n X k = ν k / r = rr + 1 ( n + 1) / r (cid:18) n + 1 − / r (cid:19) − rr + 1 ν / r (cid:18) ν − / r (cid:19) − δ ν,n,r r , with δ ν,n, = 0 (i.e., for r = 1), and σ r ( ν + 2 , n + 2) < δ ν,n,r < σ r ( ν, n ) for r > σ r ( ν, n ) = ( − / r − n − / r if ν = 1 , ( ν − − / r − n − / r if ν ≥ . Proof of Theorem 1
The proof of Theorem 1 is based on the ensuing two auxiliary results. The firstlemma provides tight upper and lower bounds on A from (2). The purpose of thesecond lemma is to identify any points where the integer part of A changes. Lemma 1.
The function A from (2) is strictly monotone increasing for x ≥ .Furthermore, there hold the bounds A ( x ) < √ x + 2 for x ≥ , (5) and A ( x ) > r x + 54 + 14 x for x ≥ . (6) Proof.
The strict monotonicity of A follows directly from the fact that A ′ ( x ) = 4 x − x − x √ x + 1 > , for any x ≥
1. Furthermore, we notice that the graph of A and of the function h ( x ) = 23 √ x + 2 , which is the upper bound in (5), have exactly one positive intersection point at x ⋆ = (9+ √ / <
2. Moreover, choosing x = 2 > x ⋆ , for instance, we have A (2) = 3 √ <
43 = h (2) . Thus, we conclude that A ( x ) < h ( x ) for any x > x ⋆ ; this yields (5). The lowerbound (6) follows from an analogous argument. (cid:3) Lemma 2.
For any m ∈ N , let α ( m ) = / ( m + 1) − . Then, for n, m ∈ N ,with n ≤ α ( m ) , there holds that A ( n ) < m + 1 . Conversely, we have A ( n ) − / n >m + 1 , for any integer n > α ( m ) .Proof. Consider m, n ∈ N such that 1 ≤ n ≤ α ( m ). Applying the monotonicityof A , cf. Lemma 1, together with (5), we infer A ( n ) ≤ A ( α ( m )) < p α ( m ) + 2 = m + 1 . Furthermore, if m = 2 s , with s ∈ N , is even, then we have α (2 s ) = 9 s + 9 s + / ;moreover, if m = 2 s −
1, with s ∈ N , is odd, then there holds α (2 s −
1) = 9 s −
2. Inparticular, we conclude that n ≥ α ( m ) + / for any n ∈ N with n > α ( m ). Then,involving (6), it follows that A ( n ) − n > r n + 54 ≥ p α ( m ) + 2 ≥ m + 1 , which yields the lemma. (cid:3) Proof of Theorem 1.
We are now ready to prove the identity (1). To this end,given n ∈ N , we define m := min { k ∈ N : α ( k ) ≥ n } ∈ N . Evidently, there holds n ≤ α ( m ) as well as n > α ( m − ≤ Σ( n ) < A ( n ) < m + 1 . If m = 1, the proof of the theorem is complete. Otherwise, if m ≥
2, then by meansof Theorem 2, we notice that δ ,n < / . Then, recalling (4), this leads toΣ( n ) > A ( n ) − n − n = A ( n ) − n . Hence, upon employing Lemma 2 (with n > α ( m − n ) > A ( n ) − n > m. Combining the above estimates, we deduce the bounds m < Σ( n ) < A ( n ) < m + 1 . This shows (1). 3.
Numerical evaluation of Σ( n )For large values of n the straightforward computation of Σ( n ), i.e., simply addingthe numbers √ √ √ √ n , and dividing by n , is computationally slow andprone to roundoff errors. For this reason, we propose an alternative approach:if n ≫
1, we choose ν ∈ N , with ν + 1 < n , of moderate size (so that the numericalevaluation of Σ( ν ) is well-conditioned and accurate). Then, we writeΣ( n ) = 1 n ν Σ( ν ) + n X k = ν +1 √ k ! . Here, employing Theorem 2, we notice that n X k = ν +1 √ k = nA ( n ) − νA ( ν ) − δ ν +1 ,n . Hence, upon defining the approximation e Σ( ν, n ) := 1 n ( nA ( n ) + ν Σ( ν ) − νA ( ν )) , it follows that (cid:12)(cid:12)(cid:12) Σ( n ) − e Σ( ν, n ) (cid:12)(cid:12)(cid:12) ≤ δ ν +1 ,n n , with δ ν +1 ,n < σ ( ν + 1 , n ) = ν − / − n − / = n − / (cid:18)(cid:16) νn (cid:17) − / − (cid:19) ;cf. (3). In this way, we infer the error estimate(7) (cid:12)(cid:12)(cid:12) Σ( n ) − e Σ( ν, n ) (cid:12)(cid:12)(cid:12) < n − / (cid:18)(cid:16) νn (cid:17) − / − (cid:19) . In particular, given a prescribed tolerance ǫ >
0, we require ν = (cid:24) n (cid:16) ǫn / + 1 (cid:17) − (cid:25) , with ν ≤ n −
2, in order to deduce the guaranteed bound (cid:12)(cid:12)(cid:12) Σ( n ) − e Σ( ν, n ) (cid:12)(cid:12)(cid:12) < ǫ. To give an example, we consider n = 10 . Then, choosing ν = 100 leads to thenumerical value e Σ( n ) = 2108 . . . . In this particular case, the error bound (7) gives (cid:12)(cid:12)(cid:12) Σ( n ) − e Σ( ν, n ) (cid:12)(cid:12)(cid:12) ≤ . × − . This estimate is fairly sharp; indeed, the true error is approximately 4 . × − . References [Mer17] M. Merca,
On the arithmetic mean of the square roots of the first n positive integers ,College Math. J. (2017), no. 2, 129–133.[Ram00] S. Ramanujan, On the sum of the square roots of the first n natural numbers [J. IndianMath. Soc. (1915), 173–175] , Collected papers of Srinivasa Ramanujan, AMS ChelseaPubl., Providence, RI, 2000, pp. 47–49.[She13] S. Shekatkar, The sum of the r th root of first n natural numbers and new formula forfactorialnatural numbers and new formula forfactorial