{'fraction_non_alphanumeric': 0.056615981882885795, 'fraction_numerical': 0.01973471368489162, 'mean_word_length': 3.939297124600639, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Elementary Proof of an Asymptotic Formula of Ramanujan

We derive the mean square of the divisor function using only elementary techniques.


Introduction
Let d(n) denote the number of divisors of a positive integer n. In 1915, Ramanujan [4] stated (without proof) the formula n≤x d 2 (n) = Ax log 3 x + Bx log 2 x + Cx log x + Dx + O(x 3/5+ǫ ) (1) where A = π −2 , and B, C and D are more complicated constants (expressible, nonetheless). In particular, the average value of the square of the divisor function is π −2 log 3 n. It is the point of this note to prove this average value using only elementary techniques.
The formula (1) has been studied by others (Wilson [6], Suryanarayana & Sita Rama Chandra Rao [5]) for the problem of reducing the order of the error term, akin somewhat to Dirichlet's divisor problem. In each case, the formula was derived again independently. Wilson used analytic techniques, namely Perron's formula and Cauchy's integral theorem for his result. Suryanarayana and Sita Rama Chandra Rao started with the convolution formula where µ(n) is the Moebius function and d k (n) denotes the number of ways one can write n as the product of k positive integers, and used, among other things, analytic bounds for the Mertens function given by Landau [3].

An Elementary Proof
We start with (2) (see Lemma 3.1 of [5] for an elementary proof) and use only the two elementary bounds which holds for all k ≥ 0, and the fact that ζ(2) = π 2 /6. A proof of (3) follows from comparing the sum to the corresponding integral, whereas a proof of (4) can be found in most number theory textbooks and usually forms a preface to Dirichlet's hyperbola method. In particular, one can see Lemma 3.3 in Apostol's book [1]. There also exists a good stash of elementary proofs which give the exact value of ζ(2) (see the recent proof by Daners [2], for example).
We sum each side of (2) to construct the relation Our plan of attack was born of the realisation that the inner sum can be connected to a sum of d 2 (n) = d(n) by the classic observation that where the sum on the right hand side is over both m and n. We can apply this observation twice to the inner sum in (5) to get We estimate (6), by working from the innermost sum outwards, before placing our result into (5). By (4) we have that As the innermost sum is now estimated, we move to the next. We have By writing Each of these sums can be estimates using (3) with either k = 0 (the first and third sum) or k = 1 (the second sum) to arrive at r≤x/(δ 2 q) m≤x/(δ 2 qr) We will complete our evaluation of (6) now with This works in much the same way as before, however this time we write Inserting this into (7) and estimating using (3) with k = 0, 1 and 2 yields Finally, by (5) we have It's also known that Substituting this in gives us our result: n≤x d 2 (n) = 1 π 2 x log 3 x + O(x log 2 x).
As an aside, it should be possible to replace (4) with the more accurate estimate n≤x d(n) = x log x + (2γ − 1) + O(x 1/2 ) to furnish the full asymptotic expansion. We leave such a venture to the more enthusiastic readers.