WEIGHTED DIVISOR SUMS AND BESSEL , II

BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

Abstract. On page 335 in his lost notebook, Ramanujan recorded without proofs two identities involving finite trigonometric sums and doubly infinite series of Bessel functions. In each case, there are three possible interpreta- tions for the double series. In an earlier paper, two of the present authors proved the first identity under one possible interpretation. In the present paper, the second identity is proved under a similar interpretation, with one additional as- sumption. Moreover, under a second interpretation, entirely different proofs of both identities, depending on weighted (or twisted) divisor sums, are offered. The two identities are intimately connected with the classical circle and divisor problems, respectively.

1. INTRODUCTION On a page published with his lost notebook [12, p. 335], Ramanujan states two identities involv- ing doubly infinite series of Bessel functions. The first involves the ordinary Bessel function J1(z), while the second involves the Bessel function of the second kind Y1(z) [15, p. 64, eq. (1)] and the modified Bessel function K1(z) [15, p. 78, eq. (6)]. As we shall see, these identities are connected with the celebrated circle and divisor problems, respectively. To state Ramanujan’s claims, we need to define ( [x], if x is not an integer, (1.1) F (x) = 1 x − 2 , if x is an integer, where, as customary, [x] is the greatest integer less than or equal to x. Entry 1. If 0 < θ < 1, x > 0, and F (x) is defined by (1.1), then

∞ X x 1  1 (1.2) F sin(2πnθ) = πx − θ − cot(πθ) n 2 4 n=1     ∞ ∞  p p  1√ X X J1 4π m(n + θ)x J1 4π m(n + 1 − θ)x  + x − . 2 p p m=1 n=0  m(n + θ) m(n + 1 − θ)  Entry 2. Let F (x) be defined by (1.1). Then, for x > 0 and 0 < θ < 1,

∞ X x 1 (1.3) F cos(2πnθ) = − x log(2 sin(πθ)) n 4 n=1 The first author’s research was partially supported by NSA grant MDA904-00-1-0015. The third author’s research was partially supported by NSF grant DMS-0901621. 1 2 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU     ∞ ∞  p p  1√ X X I1 4π m(n + θ)x I1 4π m(n + 1 − θ)x  + x + , 2 p p m=1 n=0  m(n + θ) m(n + 1 − θ)  where 2 (1.4) I (z) := −Y (z) − K (z). ν ν π ν In [4], the first and third authors gave a proof of Entry 1, but with the order of summation of the double series reversed. A proof of Entry 1 with the order of summation as that prescribed by Ramanujan has yet to be given. Entry 2 was examined by the first and third authors along with O.–Y. Chan and S.–G. Lim in [3]. In particular, it was pointed out that the approach used by the authors in [4] fails. Moreover, numerical calculations described in [3] showed that if the double series in (1.3) does indeed converge, it converges very slowly; the calculations of partial sums, as far as the authors were able to proceed, did not appear to stabilize as the upper indices increased. In this paper, we prove (1.3) with the order of summation reversed, as in [4], but with one additional assumption, which we detail later. Because of the singularities of the Bessel functions Y1(z) and K1(z) at the origin; the lack of “cancellation” in the pairs of Bessel functions on the right-hand side of (1.3) that is evinced in (1.2); a much less convenient intermediary theorem, Theorem 16, which replaces the proposed double Bessel series identity by a double trigonometric series identity; and other reasons, the proof of Entry 2 turned out to be considerably more difficult than our proof of Entry 1 in [4]. A second major goal of this paper is to prove (1.2) and (1.3) with different interpretations of the double series on the right sides in each case. Observe that the Bessel functions appearing in (1.2) and (1.3) are remindful of those appearing in the classical circle and divisor problems, respectively, and these possible connections motivate our second approach. First, let us recall these two classical outstanding problems. Let r2(n) denote the number of representations of the positive integer n as a sum of two squares, where representations with different signs and different orders in the summands are regarded as distinct representations. Write X 0 (1.5) r2(n) = πx + P (x), 0≤n≤x where the prime 0 on the summation sign on the left side indicates that if x is an integer, only 1 2 r2(x) is counted. The famous circle problem is to determine the order of magnitude of the “error term” P (x) as x → ∞. W. Sierpinski [13] and G.H. Hardy [9], [11, pp. 243–263] independently proved that, for x > 0, ∞ X 0 X x1/2 √ (1.6) r (n) = πx + r (n) J (2π nx). 2 2 n 1 0≤n≤x n=1 It is interesting to note that when Hardy wrote [9], he was unaware that Sierpinski had proven (1.6). In a footnote, Hardy [11, p. 245] remarks, “The form of this equation was suggested to me by Mr. S. Ramanujan, to whom I had communicated the analogous formula for d(1)+d(2)+···+d(n), WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 3 where d(n) is the number of divisors of n.” However, when Hardy wrote [10], [11, pp. 268–292] shortly thereafter, he did know that (1.6) was originally due to Sierpinski [11, p. 282]. The forms of the Bessel functions appearing in (1.6) and (1.2) strongly suggest that these two identities must be related. The authors of [4] employed Entry 1 to derive an identity for twisted divisor sums, which yields the following corollary. Corollary 3. For any x > 0,   q   q  ∞ ∞ J 4π m(n + 1 )x J 4π m(n + 3 )x  X 0 √ X X  1 4 1 4  (1.7) r2(n) = πx + 2 x q − q .  1 3  0≤n≤x n=0 m=1  m(n + 4 ) m(n + 4 )  The identities (1.6) and (1.7) are so similar that one wonders if they are equivalent. We had not observed in [4] that, in fact, they are formally equivalent, and so we give this argument here. The key to this equivalence is Jacobi’s famous formula [2, p. 56, Thm. 3.2.1] X (d−1)/2 (1.8) r2(n) = 4 (−1) . d|n d odd Therefore, by (1.8), ∞ X x1/2 √ r (k) J (2π kx) 2 k 1 k=1 ∞ X X x1/2 √ = 4 (−1)(d−1)/2 J (2π kx) k 1 k=1 d|k d odd ∞ ∞ p p ! √ X X J1(2π m(4n + 1)x) J1(2π m(4n + 3)x) = 4 x p − p m=1 n=0 m(4n + 1) m(4n + 3)  q q  ∞ ∞ J (4π m(n + 1 )x) J (4π m(n + 3 )x) √ X X 1 4 1 4 (1.9) = 2 x  −  . q 1 q 3 m=1 n=0 m(n + 4 ) m(n + 4 ) Hence, we have shown that (1.6) and (1.7) are versions of the same identity, provided that the rearrangement of series in (1.9) is justified. (J. L. Hafner (personal communication) independently has also shown the equivalence of (1.6) and (1.7).) As noted above, let d(n) denote the number of positive divisors of the positive integer n. Define the “error term” ∆(x), for x > 0, by X0 1 (1.10) d(n) = x (log x + (2γ − 1)) + + ∆(x), 4 n≤x where γ denotes Euler’s constant, and where the prime 0 on the summation sign on the left side 1 indicates that if x is an integer, then only 2 d(x) is counted. The famous Dirichlet divisor problem 4 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

asks for the correct order of magnitude of ∆(x) as x → ∞. M.G. Vorono¨ı’s [14] established a representation for ∆(x) in terms of Bessel functions with his famous formula

∞ X0 1 X x1/2 √ (1.11) d(n) = x (log x + (2γ − 1)) + + d(n) I (4π nx), 4 n 1 n≤x n=1

where x > 0 and I1(z) is defined by (1.4). Readers will note a remarkable similarity of the Bessel functions in (1.3) with those in (1.11), indicating that there must be a connection between these two formulas. Hardy [9] related that Ramanujan had actually established a beautiful identity that included as a special case a key identity needed by Hardy for his proof that

1/4 P (x) = Ω±(x ).

From the remarks we have made about Ramanujan’s conversations with Hardy, it is clear that Ramanujan had established Entries 1 and 2 in order to attack the circle and divisor problems, respectively. However, we do not have any further work by Ramanujan in this direction. From the argument that we made in (1.9), it is reasonable to guess that Ramanujan might have regarded the double series in (1.2) symmetrically, i.e., that Ramanujan really was thinking of the PN double sum in the form limN→∞ m,n=1. Thus, our second of two primary goals of this paper is to prove both (1.2) and (1.3) with the double series being interpreted symmetrically. The means by which we prove these entries is through twisted, or weighted, divisor sums. Because our focus in this paper is mainly on Entry 2, we first prove Entry 2 in Section 2, and thereafter prove Entry 1 in Section 3, with both double sums being interpreted symmetrically. After we prove Entries 2 and 1 under the aforementioned symmetric interpretations, we proceed to prove Entry 2 with the order of summation reversed, as we did in [4], and with one additional assumption. As we have indicated, the methods in the two approaches are entirely different, and numerous difficulties in the second approach arose that did not arise in [4]. The identities in Entries 1 and 2, with the double series interpreted as iterated double series, might give researchers new tools in approaching the circle and divisor problems, respectively. Although the sums on m and n are not symmetric, it would seem that, for the purposes of attacking the circle or divisor problems, which of the two iterated orders of summation is used would not be an important factor. Thus, perhaps for two reasons, Entries 1 and 2 might be useful in attacking the circle and divisor problems. First, these theorems yield new identities for the summatory functions of r2(n) and d(n), respectively, as iterated double series, instead of double series summed symmetrically. Second, the additional parameter θ in the Bessel function identities might be useful in a yet unforseen way. In summary, there are three ways to interpret the double series in Entries 1 and 2. With this paper and [4], our results cover both entries in two of the three possible interpretations, with the third remaining interpretation in each case being that as Ramanujan recorded it. WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 5

2. PROOFOF RAMANUJAN’S SECOND BESSEL FUNCTION IDENTITY In this section, we prove Ramanujan’s second assertion on page 335 of [12], i.e., Entry 2, un- der the assumption that the double series is summed symmetrically. A slight modification of the analysis from [1, 354–356], in particular, Lemma 14, shows that the series on the right-hand side of (1.3) converges uniformly with respect to θ on any interval 0 < θ1 ≤ θ ≤ θ2 < 1. (There σ−1/2m σ−1/2m is a misprint in (3.5) of Theorem 4 in [1]; read b(n)/µn for b(n)µn .) By continuity, it therefore suffices to prove Entry 2 for rational θ = a/q, where q is prime and 0 < a < q. We define √ ∞ ∞ ( p  p ) x X X I1 4π m(n + a/q)x I1 4π m(n + 1 − a/q)x G(a, q, x) : = + 2 p p m=1 n=0 m(n + a/q) m(n + 1 − a/q) √ ∞ ∞ p  qx X X I1 4π mrx/q (2.1) = √ . 2 mr m=1 r=0 r≡±a mod q Thus, Entry 2 is equivalent to the following theorem. Theorem 4. If q is prime and 0 < a < q, then ∞ X x 2πna 1 (2.2) G(a, q, x) = F cos − + x log(2 sin (πa/q)) := K(a, q, x). n q 4 n=1 We also demonstrate that Entry 2 and Theorem 4 are equivalent to the next theorem. First, we make some observations and offer a definition. If we set θ = 0 on the left side of (1.3), then it would coincide with the number of integer points (n, l) with n, l ≥ 1 and nl ≤ x, where the pairs (n, l) satisfying nl = x are counted with weight 1/2. It follows that ∞ X x X 0 (2.3) F = d(n), n n=1 1≤n≤x 1 where, as before, the prime 0 on the summation sign indicates that if x is an integer, only 2 d(x) is counted. Now define, for any Dirichlet character χ, X dχ(n) = χ(d). d|n Using the same argument that gave (2.3), we find that ∞ X x X 0 (2.4) F χ(n) = d (n). n χ n=1 1≤n≤x Theorem 5. If χ is a non-principal even primitive character modulo q, then √ ∞ r q−1 X0 q X x p x X (2.5) d (n) = d (n) I 4π nx/q − χ(h) log 2 sin(πh/q). χ τ(χ) χ n 1 τ(χ) n≤x n=1 h=1 6 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

We first show that Entry 2 implies Theorem 5. Proof : Entry 2 ⇒ Theorem 5. Let θ = h/q and let χ be a non-principal even primitive character modulo q. We multiply K(h, q, x) and G(h, q, x) by χ(h)/τ(χ), and sum on h, 1 ≤ h < q, where τ(χ) denotes the Gauss sum q−1 X τ(χ) := χ(h)e2πih/q. h=1 First, observe that, for the first expression in the definition of K(a, q, x),

q−1 ∞ ∞ q−1 1 X X x 2πnh 1 X x X 2πnh χ(h) F cos = F χ(h) cos τ(χ) n q τ(χ) n q h=1 n=1 n=1 h=1 ∞ q−1 1 X x X = F χ(h)e2πinh/q + e−2πinh/q 2τ(χ) n n=1 h=1 ∞ X xχ(n) + χ(−n) = F n 2 n=1 ∞ X x X0 = F χ(n) = d (n), n χ n=1 n≤x where we first used the formula [5, p. 65] q X (2.6) χ(n)τ(χ) = χ(h)e2πinh/q, h=1 for any character χ modulo q, and secondly employed (2.4). Also, since χ is non-principal, we find that the contribution of the second expression in the definition of K(a, q, x) is q 1 X χ(h) = 0. 4τ(χ) h=1 The contribution of the third expression in K(a, q, x) is obvious, in view of the last expression on the right-hand side of (2.5). There remains the examination of G(a, q, x), as defined by (2.1). Observe that, since χ is even, q−1 √ q−1 ∞ ∞ p  1 X qx X X X I1 4π mrx/q χ(h)G(h, q, x) = χ(h) √ τ(χ) 2τ(χ) mr h=1 h=1 m=1 r=1 r≡±h mod q √ ∞ ∞ p  q−1 qx X X I1 4π mrx/q X = √ χ(h) 2τ(χ) mr m=1 r=1 h=1 h≡±r mod q WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 7

√ ∞ ∞ p  qx X X I1 4π mrx/q = χ(r) √ τ(χ) mr m=1 r=1 √ ∞ p  qx X I1 4π nx/q = d (n) √ . τ(χ) χ n n=1 Hence, we complete the proof of Theorem 5.  Now, we prove that Theorem 5 implies Theorem 4. Lemma 6. If 0 < a < q and (a, q) = 1, then ∞ X x 2πna X 0 X 1 X X 0 F cos = d(n) + χ(a)τ(χ) d (n). n q φ(d) χ n=1 1≤n≤x/q d|q χ mod d 1≤n≤dx/q d>1 χ even Proof. We have ∞ X x 2πna X X x 2πna F cos = F cos n q n q n=1 d|q (n,q)=q/d ∞ X X  dx  2πma = F cos qm d d|q m=1 (m,d)=1 ∞ ∞ X  x  X X  dx  2πma = F + F cos qm qm d m=1 d|q m=1 d>1 (m,d)=1 ∞ ∞ X  x  1 X X  dx  (2.7) = F + F e2πima/d + e−2πima/d. qm 2 qm m=1 d|q m=1 d>1 (m,d)=1

We know that for any positive integers a1, a2 and q, ( X φ(q), if a1 ≡ a2 (mod q) and (a1, q) = 1, (2.8) χ(a )χ(a ) = 1 2 0, otherwise. χ mod q Using (2.8) and (2.6), we find that, for m, d such that (m, d) = 1 and d > 1,

d 1 X X e2πima/d = e2πimh/d χ(a)χ(h) φ(d) h=1 χ mod d d 1 X X = χ(a) χ(h)e2πimh/d φ(d) χ mod d h=1 8 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU 1 X = χ(a)τ(χ)χ(m). φ(d) χ mod d Thus, ∞ 1 X X  dx  F e2πima/d + e−2πima/d 2 qm d|q m=1 d>1 (m,d)=1 ∞ X 1 X  dx  X = F χ(a)τ(χ)(χ(m) + χ(−m)) 2φ(d) qm d|q m=1 χ mod d d>1 (m,d)=1 ∞ X 1 X  dx  X = F χ(a)τ(χ)χ(m) φ(d) qm d|q m=1 χ mod d d>1 (m,d)=1 χ even ∞ X 1 X X  dx  = χ(a)τ(χ) F χ(m) φ(d) qm d|q χ mod d m=1 d>1 χ even (m,d)=1 ∞ X 1 X X  dx  = χ(a)τ(χ) F χ(m), φ(d) qm d|q χ mod d m=1 d>1 χ even since χ(m) = 0 if (m, d) > 1. Hence, using the calculation above in (2.7), we obtain ∞ ∞ ∞ X x 2πna X  x  X 1 X X  dx  F cos = F + χ(a)τ(χ) F χ(m) n q qm φ(d) qm n=1 m=1 d|q χ mod d m=1 d>1 χ even X 0 X 1 X X 0 = d(n) + χ(a)τ(χ) d (n), φ(d) χ 1≤n≤x/q d|q χ mod d 1≤n≤dx/q d>1 χ even where we used (2.3). Thus, our proof of Lemma 6 is complete.  Proof : Theorem 5 ⇒ Theorem 4. First, using (2.8) and the fact that χ is even, we see that ∞ ∞ q X X r x G(a, q, x) = I 4πpmrx/q 2 qmr 1 m=1 r=1 r≡±a mod q ∞ ∞ q X X r x X = I 4πpmrx/q χ(r)χ(a) + χ(−a) 2φ(q) qmr 1 m=1 r=1 χ mod q ∞ ∞ q X X r x X = I 4πpmrx/q χ(a)χ(r) φ(q) qmr 1 m=1 r=1 χ mod q χ even WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 9

∞ ∞ q X X X r x = χ(a) χ(r) I 4πpmrx/q φ(q) qmr 1 χ mod q m=1 r=1 χ even ∞ q X X r x = χ(a) d (n) I 4πpnx/q. φ(q) χ qn 1 χ mod q n=1 χ even

So, if q is prime and χ0 denotes the principal character modulo q, then

∞ ∞ q X X r x G(a, q, x) = I 4πpmrx/q φ(q) qmr 1 m=1 r=1 q-r ∞ q X X r x + χ(a) d (n) I 4πpnx/q φ(q) χ qn 1 χ6=χ0 n=1 χ even ∞ q 1 q X X r x = ∆(x/q) − ∆(x) + χ(a) d (n) I 4πpnx/q φ(q) φ(q) φ(q) χ qn 1 χ6=χ0 n=1 χ even 1 X0 q X 0 1 x = − d(n) + d(n) − + log q φ(q) φ(q) 4 φ(q) n≤x n≤x/q ∞ q X X r x p (2.9) + χ(a) d (n) I 4π nx/q. φ(q) χ qn 1 χ6=χ0 n=1 χ even On the other hand, by Lemma 6 with q prime,

1 X0 1 + φ(q) X 0 1 K(a, q, x) = − d(n) + d(n) − φ(q) φ(q) 4 n≤x n≤x/q 1 X X 0 (2.10) + χ(a)τ(χ) d (n) + x log(2 sin πa/q). φ(q) χ χ6=χ0 1≤n≤x χ even Thus, in view of (2.9), (2.10), and (2.2), it suffices to show that X X 0 χ(a)τ(χ) dχ(n) + (q − 1)x log(2 sin πa/q)

χ6=χ0 1≤n≤x χ even ∞ X X r x = q χ(a) d (n) I 4πpnx/q + x log q. χ qn 1 χ6=χ0 n=1 χ even 10 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

By Theorem 5, we now only have to show that q−1 X X (2.11) χ(a) χ(h) log 2 sin(πh/q) = (q − 1) log(2 sin πa/q) − log q.

χ6=χ0 h=1 χ even Since q−1 q−1 X X X X χ(a) χ(h) log 2 sin(πh/q) = log 2 sin(πh/q) χ(a)χ(h)

χ6=χ0 h=1 h=1 χ6=χ0 χ even χ even q−1 q−1 X X X = log 2 sin(πh/q) χ(a)χ(h) − log 2 sin(πh/q) h=1 χ even h=1 q−1 ! Y = (q − 1) log(2 sin πa/q) − log 2q−1 sin(πh/q) h=1 = (q − 1) log(2 sin πa/q) − log q, where we have used the familiar formula [7, p. 41, formula 1.392, no. 1] q−1 Y q sin(πh/q) = . 2q−1 h=1 Thus, (2.11) has been shown, and we have completed the proof.  We prove Theorem 5 instead of Theorem 4. Proof of Theorem 5. Recall the functional equation of ζ(2s) [5, p. 59], 1 −( −s) −s 2 1 π Γ(s)ζ(2s) = π Γ( 2 − s)ζ(1 − 2s). Recall also that if χ is an even, non-principal, primitive character of modulus q, then the Dirichlet L-function L(x, χ) satisfies the functional equation [5, p. 69] 1 τ(χ) −( −s) (π/q)−sΓ(s)L(2s, χ) = √ (π/q) 2 Γ( 1 − s)L(1 − 2s, χ). q 2 Then, if ∞ X −2s F (s, χ) := ζ(2s)L(2s, χ) = dχ(n)n n=1 and √ ξ(s, χ) := (π/ q)−2sΓ2(s)F (s, χ), the functional equations of ζ(s) and L(s, χ) yield the functional equation τ(χ) ξ(s, χ) = √ ξ( 1 − s, χ). q 2 WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 11

We next state a special case of [1, p. 351, Theorem 2; p. 356, Theorem 4]. In the notation of those theorems from [1], q = 0, r = 1 , m = 2, λ = µ = π2n2/q, a(n) = d (n), and √ 2 n n χ b(n) = τ(χ)dχ(n)/ q. Also, as above, Jα(x) denotes the ordinary Bessel function of order α. Theorem 7. Let x > 0. Then

∞ 1/4 0   X τ(χ) X x √ 1 (2.12) dχ(n) = √ dχ(n) K1/2(4 µnx; − 2 ; 2) + Q0(x), q µn λn≤x n=1 where [1, p. 348, Definition 4] Z ∞ ν−µ−1 Kν(x; µ; 2) = u Jµ(u)Jν(x/u)du 0 and √ 1 Z (π/ q)−2sF (s, χ)xs Q0(x) = ds, 2πi C s where C is a positively oriented, closed curve encircling the poles of the integrand. Moreover, the series on the right-hand side of (2.12) is uniformly convergent on compact intervals not containing values of λn.

We calculate Q0(x). Since L(s, χ) is an entire function, and since L(0, χ) = 0, when the 1 character χ is even, the only pole of the integrand is at s = 2 , arising from the simple pole of ζ(2s). Thus,

√ q−1 qx τ(χ)rx X (2.13) Q (x) = L(1, χ) = − χ(n) log |1 − ζn|, 0 π π q q n=1

2πi/q where ζq = e , and where we have used an evaluation for L(1, χ) found in [6]. Next, recall that [15, p. 54]

r 2 r 2 J (z) = cos z and J (z) = sin z. −1/2 πz 1/2 πz Thus, anticipating a later change of variable and using a result that can readily be derived from [15, p. 184, formula (3)], we find that

r Z ∞  2  2 1 1 q 4π nx K1/2(4π nx/q; − 2 ; 2) = 2 cos u sin du π nx 0 qu 1 r q rnx π  = − 2π Y (4πpnx/q) + K (4πpnx/q) π2 nx q 2 1 1 p (2.14) = I1(4π nx/q). 12 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

2 2 2 2 We now replace x by π x /q and substitute the values λn = µn = π n /q in (2.12). Using (2.13) and (2.14) in (2.12), we conclude that ∞ r q−1 X0 τ(χ) X x p τ(χ)x X (2.15) d (n) = √ d (n) I (4π nx/q) − χ(n) log |1 − ζn|. χ q χ n 1 q q n≤x n=1 n=1 Using the fact that τ(χ)τ(χ) = q and the simple identity n −n/2 n/2 log |1 − ζq | = log |ζq − ζq | = log(2 sin(πn/q)), we obtain √ ∞ r q−1 X0 q X x x X d (n) = d (n) I 4πpnx/q − χ(n) log 2 sin(πn/q), χ τ(χ) χ n 1 τ(χ) n≤x n=1 n=1 which completes the proof. 

3. PROOFOF RAMANUJAN’S FIRST BESSEL FUNCTION IDENTITY Next, we prove Ramanujan’s first Bessel function identity (1.2) in a similar fashion. We empha- size that the double sum on the right-hand side of (1.2) is being interpreted symmetrically, as we did in the last section. Using a similar argument, we can see that Entry 1 and the following two theorems are equivalent. We first define √ ∞ ∞ ( p  p ) x X X J1 4π m(n + a/q)x J1 4π m(n + 1 − a/q)x H(a, q, x) : = − 2 p p m=1 n=0 m(n + a/q) m(n + 1 − a/q)   √  ∞ ∞ p  ∞ ∞ p  qx X X J1 4π mrx/q X X J1 4π mrx/q  = √ − √ . 2 mr mr m=1 r=1 m=1 r=1   r≡a mod q r≡−a mod q  Theorem 8. If q is prime and 0 < a < q, then ∞ X x 2πna 1 a 1 aπ  H(a, q, x) = F sin − πx − + cot := P (a, q, x). n q 2 q 4 q n=1 Theorem 9. Let q be a positive integer, and let χ be an odd primitive character modulo q. Then, for any x > 0, √ ∞ r X0 iτ(χ) i q X x p (3.1) d (n) = L(1, χ)x + L(1, χ) + d (n) J 4π nx/q. χ 2π τ(χ) χ n 1 n≤x n=1 We remark that Theorem 9 is the same as Theorem 1.2 from [4], which was derived from Entry 1, except that in this paper the double sum in Theorem 1.2 (Theorem 10 below) is to be interpreted symmetrically, and so the infinite series on the right-hand side of (3.1), arising from this double series, must also be similarly interpreted. (In (1.8) of Theorem 1.2 of [4], the sign of the second expression on the right-hand side should be + instead of −.) WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 13

Theorem 10 (Theorem 1.2 from [4]). Let q be a positive integer, and let χ be an odd primitive character modulo q. Then, for any x > 0, X0 iτ(χ) d (n) = L(1, χ)x + L(1, χ) χ 2π n≤x  q q  √ ∞ ∞ J 4π m(n + h )x J 4π m(n + 1 − h )x i x X X X  1 q 1 q  (3.2) + χ(h) − . τ(χ) q h q h 1≤h1 χ odd Proof. We employ the same argument as in the proof of Lemma 6, using 2πma 1 sin = (e2πima/d − e−2πima/d). d 2i  14 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

Proof: Theorem 9 ⇒ Theorem 8. We easily see that H(a, q, x) = −H(q−a, q, x) and P (a, q, x) = −P (q − a, q, x), and so we can assume that 0 < a < q/2. Consider √ ∞ ∞ ( p  p ) x X X J1 4π m(n + a/q)x J1 4π m(n + 1 − a/q)x H(a, q, x) = − 2 p p m=1 n=0 m(n + a/q) m(n + 1 − a/q)   √ ∞  ∞ p  ∞ p  qx X  X J1 4π mrx/q X J1 4π mrx/q  = √ − √ 2 mr mr m=1  r=1 r=1  r≡a mod q r≡−a mod q  √ ∞ ∞ p  qx X X J1 4π mrx/q X = √ χ(r)χ(a) − χ(−a) 2φ(q) mr m=1 r=1 χ mod q √ ∞ ∞ p  qx X X J1 4π mrx/q X = √ χ(r)χ(a) φ(q) mr m=1 r=1 χ mod q χ odd ∞ ∞ q X X X r x = χ(a) χ(r) J 4πpmrx/q φ(q) qmr 1 χ mod q m=1 r=1 χ odd ∞ q X X r x p (3.3) = χ(a) d (n) J 4π nx/q. φ(q) χ qn 1 χ mod q n=1 χ odd On the other hand, by Lemma 11, ∞ X x 2πna 1 a 1 aπ  P (a, q, x) = F sin − πx − + cot n q 2 q 4 q n=1 −i X X 0 1 a 1 aπ  = χ(a)τ(χ) d (n) − πx − + cot . φ(q) χ 2 q 4 q χ mod q 1≤n≤x χ odd Applying Theorem 9 and using (3.3), we only need to show that i X  iτ(χ)  1 a 1 aπ  (3.4) χ(a)τ(χ) L(1, χ)x + L(1, χ) = −πx − + cot . φ(q) 2π 2 q 4 q χ mod q χ odd We use the following formulas, which are (2.5) and (2.8) in [4]: X 1 h (3.5) τ(χ)L(1, χ) = 2πi χ(h) − , 2 q 1≤h

We also can easily deduce from (2.8) that ( X X φ(q)/2, if h ≡ a (mod q), (3.7) χ(a)χ(h) = χ(a)χ(h) = 0, otherwise, χ even χ odd since (a, q) = 1. Then, using (3.5)–(3.7), we deduce that i X  iτ(χ)  χ(a)τ(χ) L(1, χ)x + L(1, χ) φ(q) 2π χ mod q χ odd    2πx X 1 h 1 X πh X = − − + cot χ(a)χ(h) φ(q) 2 q 2φ(q) q  1≤h

−s −( 1 −s) 1  (3.9) π Γ(s)ζ(2s) = π 2 Γ − s ζ(1 − 2s). 2 Multiply (3.8) and (3.9) to deduce that π−2s−1/2  1 Γ(s)Γ s + ζ(2s)L(2s, χ) q−s−1/2 2 iτ(χ) π−3/2+2s 1  (3.10) = − √ Γ(1 − s)Γ − s L(1 − 2s, χ)ζ(1 − 2s). q q−1+s 2 If we invoke the duplication formula for the gamma function, √  1 Γ(2s) π = 22s−1Γ(s)Γ s + , 2 then (3.10) can be written as √ π−2s−1/2 πΓ(2s) ζ(2s)L(2s, χ) q−s−1/2 22s−1 16 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU  √ iτ(χ) π−3/2+2s Γ 2(1/2 − s) π = − √ L(1 − 2s, χ)ζ(1 − 2s) q q−1+s 22(1/2−s)−1 iτ(χ) π−1+2s Γ(1 − 2s) = − √ L(1 − 2s, χ)ζ(1 − 2s). q q−1+s 2−2s Thus,  2π −2s iτ(χ) 2π 2s−1 √ Γ(2s)L(2s, χ)ζ(2s) = − √ √ Γ(1 − 2s)L(1 − 2s, χ)ζ(1 − 2s). q q q Replacing s by s/2, we have  2π −s iτ(χ) 2π s−1 √ Γ(s)L(s, χ)ζ(s) = − √ √ Γ(1 − s)L(1 − s, χ)ζ(1 − s). q q q √ In the notation of Theorem 2 of [1], q = 0, r = m = 1, λ = µ = 2πn/ q, a(n) = d (n), √ √ √ n n χ b(n) = −iτ(χ)dχ(n)/ q, and K1(2 µnx; 0; 1) = J1(2 µnx). We therefore record the following special case of [1, Theorem 2]. Theorem 12. Let x > 0. Then ∞ 1/2 X 0 −iτ(χ) X  x  √ dχ(n) = √ dχ(n) J1(2 µnx) + Q0(x), q µn λn≤x n=1

where √ 1 Z (2π/ q)−sL(s, χ)ζ(s)xs Q0(x) = ds, 2πi C s where C is a positively oriented closed contour with the singularities of the integrand on the interior. √ We now replace x by 2πx/ q in Theorem 12 to obtain ∞ X0 −iτ(χ) X x1/2 p √ (3.11) d (n) = √ d (n) J (4π nx/q) + Q (2πx/ q). χ q χ n 1 0 n≤x n=1 1 Now, since ζ(0) = − 2 , √ 1 Z L(s, χ)ζ(s)xs Q0(2πx/ q) = ds 2πi C s 1 (3.12) = − L(0, χ) + L(1, χ)x. 2 From the function equation (3.8), π −1/2 τ(χ) q Γ(1/2)L(0, χ) = −i √ L(1, χ). q q π WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 17

So, iτ(χ) L(0, χ) = − L(1, χ). π Thus, from (3.12), √ iτ(χ) (3.13) Q (2πx/ q) = L(1, χ)x + L(1, χ). 0 2π Lastly, putting (3.13) in (3.11) and using the identity τ(χ)τ(χ) = −q, since χ is odd, we complete the proof. 

4. SECOND APPROACH:PRELIMINARY RESULTS We now prove Entry 2, where now we consider the double series on the right side of (1.3) to be an iterated double sum. As emphasized in the Introduction, we will approach Entry 2 with the order of summation on the double series reversed. Our proof depends upon the following formulation of the Poisson summation formula due to A.P. Guinand [8, p. 595]. Theorem 13. If f(x) is an integral, f(x) tends to 0 as x → ∞, and xf 0(x) ∈ Lp(0, ∞) for some p, 1 < p ≤ 2, then ( N ) ( N ) X Z N X Z N (4.1) lim f(n) − f(t) dt = lim g(n) − g(t) dt , N→∞ N→∞ n=1 0 n=1 0 where Z ∞ g(x) := 2 f(t) cos(2πxt) dt. 0 We need the following two lemmas from [3, Lemmas 3.5, 3.4]. Lemma 14. We have Z ∞ I1(x)dx = 0. 0

Lemma 15. With Iν defined by (1.4) and b, c > 0, Z ∞  2  2 1 c (4.2) cos(bx )I1(cx)dx = sin . 0 c 4b

5. REFORMULATION OF ENTRY 2

Theorem 16. Let F (x) be defined by (1.1) and let I1(x) be defined by (1.4). Then, for x > 0 and 0 < θ < 1, (5.1)     ∞ ∞  p p  1√ X X I1 4π m(n + θ)x I1 4π m(n + 1 − θ)x  x + 2 p p n=0 m=1  m(n + θ) m(n + 1 − θ)  18 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

∞ ( M ) 1 X 1 X 2π(n + θ)x Z M 2π(n + θ)x = lim sin − sin dt 2π n + θ M→∞ m t n=0 m=1 0 ∞ ( M )! X 1 X 2π(n + 1 − θ)x Z M 2π(n + 1 − θ)x + lim sin − sin dt . n + 1 − θ M→∞ m t n=0 m=1 0 Proof. Let I (4πpt(n + θ)x) f(t) = 1 pt(n + θ) in Theorem 13. First, setting u = 4πpt(n + θ)x and using Lemma 14, we find that

( M p Z M p ) X I1(4π m(n + θ)x) I1(4π t(n + θ)x) lim − dt M→∞ p p m=1 m(n + θ) 0 t(n + θ) ( M p ) Z ∞ X I1(4π m(n + θ)x) 1 = lim − √ I1(u)du M→∞ p 2π(n + θ) x m=1 m(n + θ) 0 ∞ p X I1(4π m(n + θ)x) (5.2) = p . m=1 m(n + θ) Second, putting u = 4πpt(n + θ)x and using Lemma 15, we find that Z ∞ p I1(4π t(n + θ)x) g(m) = 2 p cos(2πmt)dt 0 t(n + θ) 1 Z ∞  mu2  = √ I1(u) cos du π(n + θ) x 0 8π(n + θ)x 1 2π(n + θ)x (5.3) = √ sin . π(n + θ) x m Hence, ( M ) X Z M lim g(m) − g(t) dt M→∞ m=1 0 ( M ) 1 X 2π(n + θ)x Z M 2π(n + θ)x (5.4) = √ lim sin − sin dt . π(n + θ) x M→∞ m t m=1 0 We make a diversion here to demonstrate conclusively that the limit in (5.4) actually does exist. Write, for a > 0, ( M ) X  a  Z M a lim sin − sin dt M→∞ m t m=1 0 WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 19

( M ) X   a  a a  Z M  a a a Z 1 a = lim sin − + − sin − + dt − sin dtn M→∞ m m m t t t t m=1 1 0 ( M ) X 1 Z M dt Z 1 a = L1 − L2 + lim a − a − sin dt M→∞ m t t m=1 1 0 Z 1 a = L1 − L2 − sin dt + a {log M + γ + o(1) − log M} 0 t Z 1 a = L1 − L2 − sin dt + aγ, 0 t where γ denotes Euler’s constant and where

M X   a  a  L1 = lim sin − , M→∞ m m m=1 Z M  a a L2 = lim sin − dt. M→∞ 1 t t Returning to our proof and putting together (5.2) and (5.4) in (4.1), we find that

∞ p X I1(4π m(n + θ)x) (5.5) p m=1 m(n + θ) ( M ) 1 X 2π(n + θ)x Z M 2π(n + θ)x = √ lim sin − sin dt . π(n + θ) x M→∞ m t m=1 0 Now in (5.5) replace θ by 1−θ and add the result to (5.5). Sum both sides on n, 0 ≤ n < ∞. Then 1 √ multiply the resulting equality by 2 x to deduce (5.1) and thus complete the proof of Theorem 16. 

If we compare (1.3) with (5.1), we see that in order to prove Theorem Entry 2, but with the order of summation reversed in the double series, we need to prove that

∞ X x 1 F cos(2πnθ) − + x log(2 sin(πθ)) n 4 n=1 ∞ ( M ) 1 X 1 X 2π(n + θ)x Z M 2π(n + θ)x = lim sin − sin dt 2π n + θ M→∞ m t n=0 m=1 0 ∞ ( M )! X 1 X 2π(n + 1 − θ)x Z M 2π(n + 1 − θ)x + lim sin − sin dt . n + 1 − θ M→∞ m t n=0 m=1 0 20 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

6. THE CONVERGENCEOF (5.1) Fix x > 0, and denote a = 2πx. We are interested in the question of convergence (pointwise, or uniformly with respect to θ on compact subintervals of the interval (0, 1)) of the series

∞ ( M ) X 1 X a(n + θ) Z M a(n + θ) S(a, θ) := lim sin − sin dt n + θ M→∞ m t n=0 m=1 0 ∞ ( M ) X 1 X a(n + 1 − θ) Z M a(n + 1 − θ) + lim sin − sin dt . n + 1 − θ M→∞ m t n=0 m=1 0 For m > 2, a(n + θ) Z m a(n + θ) Z m  a(n + θ) a(n + θ) sin − sin dt = sin − sin dt m m−1 t m−1 m t Z m 1 a(n + θ) a(n + θ) 1 a(n + θ) a(n + θ) = 2 sin − cos − dt. m−1 2 m t 2 m t Thus,   Z m   Z m   a(n + θ) a(n + θ) a(n + θ)(t − m) sin − sin dt ≤ 2 sin dt m m−1 t m−1 2mt Z m a(n + θ)(m − t) a(n + θ) (6.1) ≤ dt < . m−1 mt m(m − 1)

1+δ1 Fix δ1 > 0 and denote M1 = [n ], where [x] denotes the greatest integer ≤ x. We write ( M ) X a(n + θ) Z M a(n + θ) lim sin − sin dt M→∞ m t m=1 0 M X1 a(n + θ) Z M1 a(n + θ) = sin − sin dt m t m=1 0 ( M ) X a(n + θ) Z M a(n + θ) + lim sin − sin dt . M→∞ m M1 t m=M1+1 Here the last limit exists, and, by (6.1), is a real number bounded by

∞ a(n + θ) a(n + θ) 1 X = a δ , m(m − 1) M1 n 1 m=M1+1 uniformly with respect to θ in [0, 1]. Therefore the series

∞ ( M ) X 1 X a(n + θ) Z M a(n + θ) lim sin − sin dt M→∞ n + θ m M1 t n=0 m=M1+1 WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 21 converges uniformly with respect to θ, and the same holds for the other, similar series involving n + 1 − θ. We deduce that the series ∞ ( M ) X 1 X1 a(n + θ) Z M1 a(n + θ) S (a, θ, δ ) := sin − sin dt 1 1 n + θ m t n=0 m=1 0 ∞ ( M ) X 1 X1 a(n + 1 − θ) Z M1 a(n + 1 − θ) + sin − sin dt n + 1 − θ m t n=0 m=1 0

converges pointwise if and only if the initial sum S(a, θ) converges pointwise, and S1(a, θ, δ1) converges uniformly with respect to θ on compact subintervals of (0, 1) if and only if this holds for S(a, θ). Next, we need a bound for M X1 a(n + θ) Z M1 a(n + θ) sin − sin dt. m t m=1 0 We write this expression in the form √ [ n] √ X a(n + θ) Z [ n] a(n + θ) sin − sin dt m t m=1 0 M X1  a(n + θ) Z m a(n + θ)  + sin − sin dt . √ m m−1 t m=[ n]+1 √ Here the first sum is bounded in absolute value by n. The same bound holds for the integral, i.e., √ Z [ n] a(n + θ) √

sin dt < n. 0 t As for the last sum above, we use (6.1) to bound each term, in order to conclude that M M X1  a(n + θ) Z m a(n + θ)  X1 a(n + θ) a(n + θ) sin − sin dt  < √ . √ m m−1 t √ m(m − 1) [ n] m=[ n]+1 m=[ n]+1 We thus have shown that M X1 a(n + θ) Z M1 a(n + θ) √ sin − sin dt  n, m t a m=1 0 uniformly with respect to θ on compact subsets of (0, 1). With this bound at hand, we now proceed to remove the dependence on θ from the coefficients 1/(n + θ) and 1/(n + 1 − θ) in S1(a, θ, δ1). More specifically, we consider the sum ∞ ( M X 1 X1 a(n + θ) Z M1 a(n + θ) S (a, θ, δ ) := sin − sin dt 2 1 n + 1 m t n=0 2 m=1 0 22 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

M ) X1 a(n + 1 − θ) Z M1 a(n + 1 − θ) + sin − sin dt . m t m=1 0 Note that the sum

∞ ( ( M ) X  1 1  X1 a(n + θ) Z M1 a(n + θ) − sin − sin dt n + 1 n + θ m t n=0 2 m=1 0 (6.2) ( M ))  1 1  X1 a(n + 1 − θ) Z M1 a(n + 1 − θ) + − sin − sin dt n + 1 n + 1 − θ m t 2 m=1 0 is uniformly and absolutely convergent, since for each n,

M 1   Z M1   1 1 X a(n + θ) a(n + θ) − sin − sin dt n + 1 n + θ m t 2 m=1 0 1 |θ − 2 | √ 1 a 1 n a 3/2 , (n + 2 )(n + θ) n uniformly in θ. We obtain the same bound for the other sum in (6.2) by the same argument. It follows that the sum S2(a, θ, δ1) is convergent for a given value of θ if and only if S1(a, θ, δ1) is convergent for that value of θ. Also, S2(a, θ, δ1) is uniformly convergent with respect to θ on closed subintervals of (0, 1) if and only if S1(a, θ, δ1) has this property. Next, using the oscillatory behavior of the function y 7→ sin y, we perform another truncation of the inner sum in S2(a, θ, δ1), by replacing M1 by a smaller value M2, to be determined later. Consider the sum

∞ ( M X 1 X2  a(n + θ) a(n + 1 − θ) S (a, θ) := sin + sin 3 n + 1 m m n=0 2 m=1 1  M + Z 2 2  a(n + θ) a(n + 1 − θ)  − sin + sin dt . 0 t t 

In order to relate the convergence of S3(a, θ) to that of S2(a, θ, δ1), we estimate, for each m ∈ {M2 + 1,M2 + 2,...,M1}, the quantity

1 m+ a(n + θ) a(n + 1 − θ) Z 2  a(n + θ) a(n + 1 − θ) sin + sin − sin + sin dt 1 m m m− t t 2 1 Z 2  a(n + θ) a(n + θ) a(n + 1 − θ) a(n + 1 − θ) = sin − sin + sin − sin du. 1 − m m + u m m + u 2 WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 23

Here, a(n + θ) a(n + θ) a(n + θ)  u  1  = = 1 − + O m + u m(1 + u/m) m m m2 a(n + θ) a(n + θ)u  n  = − + O , m m2 a m3 uniformly in θ. So, a(n + θ) a(n + θ) a(n + θ)u  n  sin = sin − + O . m + u m m2 a m3

√ 2 We will choose M2 much larger than n. Then the ratio a(n + θ)u/m will be small, a is fixed, 1 1 θ ∈ [0, 1], and u ∈ [− 2 , 2 ]. Then, using the relation sin(α − ) = sin α −  cos α + O(2) with α = a(n + θ)/m and  = a(n + θ)u/m2, we see that a(n + θ) a(n + θ) a(n + θ)u a(n + θ)  n2   n  sin = sin − cos + O + O . m + u m m2 m m4 m3 Since 1 Z 2 a(n + θ)u a(n + θ) cos du = 0, 1 2 − m m 2 it follows that 1 m+ a(n + θ) Z 2 a(n + θ)  n2   n  sin − sin dt = O + O . 1 4 3 m m− t m m 2 Similarly, 1 m+ a(n + 1 − θ) Z 2 a(n + 1 − θ)  n2   n  sin − sin dt = O + O . 1 4 3 m m− t m m 2

We add up these relations for m = M2 + 1,...,M1 to find that

M X1  a(n + θ) a(n + 1 − θ) sin + sin m m m=M2+1 1 M + Z 1 2  a(n + θ) a(n + 1 − θ) − sin + sin dt 1 M + t t 2 2  n2   n  = O 3 + O 2 , M2 M2 24 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

uniformly for θ in compact subsets of (0, 1). Therefore, if we choose, for instance, M2 = [n2/3 log n], then the series ∞ M X 1 X1  a(n + θ) a(n + 1 − θ) sin + sin n + 1 m m n=0 2 m=M2+1 1  M + Z 1 2  a(n + θ) a(n + 1 − θ) − sin + sin dt 1  M + t t 2 2 is uniformly and absolutely convergent. 1 Let us also remark that for t ∈ [M1,M1 + 2 ], a(n + θ)  1  a(n + θ)  1  = O , and so sin = O , t nδ1 t nδ1 and also 1 M + Z 1 2  a(n + θ) a(n + 1 − θ)  1  (6.3) sin + sin dt = O . δ1 M1 t t n Hence, the series 1 ∞ M + X 1 Z 1 2  a(n + θ) a(n + 1 − θ) sin + sin dt n + 1 t t n=0 2 M1 is uniformly and absolutely convergent. Combining all of the above, we deduce that the initial series S(a, θ) is convergent for a given value of θ if and only if the series S3(a, θ) is convergent for that value of θ. Moreover, S(a, θ) converges uniformly on compact subintervals of (0, 1) if and only if the same holds for S3(a, θ). Let us remark that the contribution of the integrals in (6.3) is small, while on the other hand we do not have any cancellation inside the integrals 1 M + Z 2 2  a(n + θ) a(n + 1 − θ) sin + sin dt. M2 t t Indeed, one can show that the integrand here is almost constant, in fact equal to  an   1   an1/3   1  2 sin + O = sin + O . 1/3 2 2 1/3 2 M2 n log n log n n log n Moreover, one can show that the series ∞ X 1  an1/3  sin n + 1 log2 n n=2 2 1 is not absolutely convergent. This forces us to keep at this stage M2 + 2 instead of M2 as the upper limit of integration in the definition of S3(a, θ). As a side remark, one can show that the above WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 25 series, although not absolutely convergent, is convergent, via proving that the fractional parts  an1/3  π log2 n are “very” uniformly distributed in the interval [0, 1], where “very” means that the discrepancy of the first N terms is  N −c for some absolute constant c > 0. Next, we choose a new (integral) parameter M3, whose precise value as a function of n will be given later, and consider the sum

∞ ( M X 1 X3  a(n + θ) a(n + 1 − θ) S (a, θ) := sin + sin 4 n + 1 m m n=0 2 m=1 1 M + Z 3 2  a(n + θ) a(n + 1 − θ) − sin + sin dt 0 t t 1  M2 1 M + 1 X a(n + ) Z 2 2 a(n + )  +2 sin 2 − 2 sin 2 dt . 1 m M3+ t m=M3+1 2 

1 Note that the sum S4(a, θ) differs from S3(a, θ) by having θ replaced by 2 on the range M3 + 1 ≤ m ≤ M2. In order to relate the convergence of these two sums, we write, for m = M3 +1,...,M2, a(n + θ) a(n + 1 − θ) a(n + 1 ) sin + sin − 2 sin 2 m m m a(n + 1 ) a(θ − 1 ) a(n + 1 ) = 2 sin 2 cos 2 − 2 sin 2 m m m a(n + 1 ) a(θ − 1 ) = −4 sin 2 sin2 2 . m 2m Therefore,

M2      1  X a(n + θ) a(n + 1 − θ) a(n + 2 ) sin + sin − 2 sin m m m m=M3+1 M2  1  M2 X 2 a(θ − 2 ) X 1 1 ≤ 4 sin a 2  , 2m m M3 m=M3+1 m=M3+1 uniformly with respect to θ. Similarly,

1 M + 1 Z 2 2  a(n + θ) a(n + 1 − θ) a(n + ) sin + sin − 2 sin 2 dt 1 M + t t t 3 2 26 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

1 1 M + 1 1 M + Z 2 2     Z 2 2 a(n + 2 ) 2 a(n + 2 ) dt 1 = 4 sin sin dt a  . 1 1 2 M + t 2t M + t M3 3 2 3 2 2 If we now take M3 = [log n], the sum

∞ ( M2      1  X 1 X a(n + θ) a(n + 1 − θ) a(n + 2 ) sin + sin − 2 sin n + 1 m m m n=0 2 m=M3+1 1  M + 1 Z 2 2  a(n + θ) a(n + 1 − θ) a(n + )  − sin + sin − 2 sin 2 dt 1 M + t t t 3 2  will be uniformly convergent with respect to θ. Consequently, the sum S3(a, θ) will be convergent for a given θ if and only if the sum S4(a, θ) converges for the same value of θ, and S3(a, θ) converges uniformly on compact subintervals of (0, 1) if and only if S4(a, θ) does. In what follows we denote ∞ ( M X 1 X3  a(n + θ) a(n + 1 − θ) S (a, θ) := sin + sin 5 n + 1 m m n=0 2 m=1 1  M + Z 3 2  a(n + θ) a(n + 1 − θ)  − sin + sin dt 0 t t  and  1  ∞ M2 1 M + 1   Z 2 2   X 1  X a(n + 2 ) a(n + 2 )  S6(a) := sin − sin dt , 1 1 n + m M3+ t n=0 2 m=M3+1 2  so that

S4(a, θ) = S5(a, θ) + 2S6(a). 2 Here the inner sum in S5(a, θ) has a very short range, of the size of log n, while the inner sum in S6(a) has a larger range, but is independent of θ. We now turn our attention to S5(a, θ) and see whether this sum is pointwise convergent, respectively, uniformly convergent on compact subin- tervals of (0, 1). Denote

N M X 1 X3  a(n + θ) a(n + 1 − θ) A(a, θ, N) := sin + sin n + 1 m m n=0 2 m=1 and 1 N M + X 1 Z 3 2  a(n + θ) a(n + 1 − θ) B(a, θ, N) := sin + sin dt. n + 1 t t n=0 2 0 WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 27

Then S5(a, θ) converges (respectively, converges uniformly on compact subintervals of (0, 1)) pro- vided that for any  > 0, there exists an N() such that for any N1,N2 > N(),

|A(a, θ, N1) + B(a, θ, N1) − A(a, θ, N2) − B(a, θ, N2)| < , (respectively, uniformly for all θ in a given compact subinterval of (0, 1)). Fix  > 0. For any positive integer N, we put A(a, θ, N) in the form

N X 1 X a(n + 1 ) a(2θ − 1) A(a, θ, N) = 2 sin 2 cos . n + 1 m 2m n=0 2 1≤m≤log2 n √ Here the condition m ≤ log2 n is equivalent to e m ≤ n. Thus, interchanging the order of summa- tion above, we find that    1  X a(2θ − 1) X 1 a(n + 2 ) A(a, θ, N) = 2 cos 1 sin 2m √ n + m 1≤m≤log2 N e m≤n≤N 2 X a(2θ − 1) X 1 a(2n + 1) = 4 cos sin . 2m √ 2n + 1 2m 1≤m≤log2 N e m≤n≤N

For two large positive integers N1 < N2, we put A(a, θ, N2) − A(a, θ, N1) in the form

A(a, θ, N2) − A(a, θ, N1) X a(2θ − 1) X 1 a(2n + 1) = 4 cos sin 2m 2n + 1 2m 2 1≤m≤log N1 N1+1≤n≤N2 X a(2θ − 1) X 1 a(2n + 1) + 4 cos sin . 2m √ 2n + 1 2m 2 2 m log N1

We are interested in the behavior of the function hU,V (y). This function is odd and periodic modulo 2π, and so it is sufficient to study the function on the interval [0, π]. Also, we note that hU,V (y) = 28 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

1 hU,V (π − y), and so furthermore it is sufficient to consider this function on the interval [0, 2 π]. Observe that hU,V (0) = 0. Next, since the series is alternating with decreasing terms,

n 1 X (−1) 1 hU,V ( π) = ≤ . 2 2n + 1 2U + 1 U≤n≤V

1 For 0 < y < 2 π, we write hU,V (y) in the form 1 1 hU,V (y) = hU,V ( 2 π) + hU,V (y) − hU,V ( 2 π) 1 π Z 2 1 0 (6.5) = hU,V ( 2 π) − hU,V (t)dt. y Here we write [7, p. 36, formula 1.342, no. 4] X 1 (6.6) h0 (t) = cos{(2n + 1)t} = (sin{2(bV c + 1)t} − sin(2dUet)) , U,V 2 sin t U≤n≤V where bV c is the floor of V , that is the largest integer ≤ V , and dUe is the ceiling of U, that is, the smallest integer ≥ U. From (6.5) and (6.6) and an integration by parts, 1 π Z 2 1 1 hU,V (y) = hU,V ( 2 π) − (sin{2(bV c + 1)t} − sin(2dUet)) dt y 2 sin t 1 π   2 1 1 cos{2(bV c + 1)t} cos(2dUet) = hU,V ( 2 π) + − 2 sin t 2(bV c + 1) 2dUe y 1 π Z 2 cos t cos{2(bV c + 1)t} cos(2dUet) + 2 − dt y 2 sin t 2(bV c + 1) 2dUe  1   1   1  = O + O + O U Uy Uy2  1  1  = O 1 + , U y2

1 uniformly for 0 < y ≤ 2 π. If we need a bound that holds for all y > 0, we may write  1 1  |h (y)| = O · , U,V U ||y/π||2 where ||y/π|| denotes the distance from y/π to the nearest integer, which is proportional (via a factor of π) to the distance from y to the set πZ = {..., −π, 0, π, 2π, . . . }. Recall that at these points πZ the function hU,V (y) vanishes. We are now ready to apply these considerations to our expression for A(a, θ, N2) − A(a, θ, N1) 2 2 from (6.4). For log N1 < m ≤ log N2, and a fixed, a/(2m) is a small positive number, which WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 29

1 belongs to (0, 2 π). Hence,  a   1  4m2   m2  √ h m = O √ 1 + = O √ . e ,N2 2m e m a2 e m

It follows that

a(2θ − 1)  a   a  X √ X √ 4 cos h m ≤ 4 h m 2m e ,N2 2m e ,N2 2m 2 2 2 2 log N1

X a(2θ − 1)  a  4 cos h , 2m N1+1,N2 2m 2 1≤m≤log N1

1 at least as far as the terms with large m, so that a/(2m) ∈ (0, 2 π], are concerned. These are terms for which m ≥ a/π. To that end,

a(2θ − 1)  a   a  X X 4 cos hN1+1,N2 ≤ 4 hN1+1,N2 2m 2m 2m 2 2 a/π≤m≤log N1 a/π≤m≤log N1   X 1  4m2  = O 1 +  N a2  2 1 a/π≤m≤log N1   1 X = O m2 N  1 2 a/π≤m≤log N1 log6 N  = O 1 . N1 30 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

Lastly, the sum

X a(2θ − 1)  a  (6.7) 4 cos h 2m N1+1,N2 2m 1≤m

has a bounded number of terms. For each m, with 1 ≤ m < a/π, we distinguish two cases. Either a/(2m) is an integral multiple of π, or it is not. In the former case, we know that  a  h = 0, N1+1,N2 2m and hence these terms do not have any contribution to the sum (6.7). For all the other values of m, with 1 ≤ m < a/π, we examine the distances between the numbers a/(2mπ) and the set Z. These distances, no matter how small, are some fixed strictly positive numbers, which are independent of N1 and N2. If we let δ > 0 denote the smallest such distance, in other words, n a a a o δ = min : 1 ≤ m < , ∈/ , 2πm π 2m Z then

a(2θ − 1)  a   a  X X 4 cos hN1+1,N2 ≤ 4 hN1+1,N2 2m 2m 2m 1≤m

Thus this sum too tends to 0 as N1 < N2 tend to infinity, since δ > 0 is fixed. In conclusion, for any  > 0, there exists N() such that, for any N1,N2 > N(),

|A(a, θ, N1) − A(a, θ, N2)| < , uniformly for all θ in any given compact subinterval of (0, 1), as desired. Similarly, working with integrals instead of sums, we find that

|B(a, θ, N1) − B(a, θ, N2)| < ,

for N1,N2 sufficiently large. That implies that S5(a, θ) is uniformly convergent on compact sub- sets of (0, 1). The conclusion is that the initial sum S(a, θ) is uniformly convergent on compact subintervals of (0, 1) if and only if S6(a) is. But S6(a) does not depend on θ. So the convergence at one single value of θ implies in compact subintervals of (0, 1). WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 31

7. REFORMULATION AND PROOFOF ENTRY 2 In view of Entry 2, Theorem 16, and the proof of convergence in Section 6, we now reformulate and prove the following theorem.

1 1 1 Theorem 17. Fix x > 0 and set θ = u + 2 , where − 2 < u < 2 . Recall that F (x) is defined in (1.1). If the identity below is valid for at least one value of θ, then it exists for all values of θ, and

X x 1 (−1)nF cos(2πnu) − + x log(2 cos(πu)) n 4 1≤n≤x ∞ ( ∞ ) 1 X 1 X 2π(n + 1 + u)x Z M 2π(n + 1 + u)x = lim sin 2 − sin 2 dt 2π n + 1 + u M→∞ m t n=0 2 m=1 0 (7.1) ∞ ( ∞ ) 1 X 1 X 2π(n + 1 − u)x Z M 2π(n + 1 − u)x + lim sin 2 − sin 2 dt . 2π n + 1 − u M→∞ m t n=0 2 m=1 0

Moreover, the series on the right-hand side of (7.1) converges uniformly on compact subintervals 1 1 of (− 2 , 2 ). Proof. For each nonnegative integer n, set

( M  1  Z M  1  ) 1 X 2π(n + 2 + u)x 2π(n + 2 + u)x fn(u) := lim sin − sin dt n + 1 + u M→∞ m t 2 m=1 0 ( M ) 1 X 2π(n + 1 − u)x Z M 2π(n + 1 − u)x (7.2) + lim sin 2 − sin 2 dt . n + 1 − u M→∞ m t 2 m=1 0

P∞ From our work in Section 6, we know that the series n=0 fn(u) either diverges for each value of u, or it converges for each value of u with the convergence being uniform in any compact 1 1 subinterval of (− 2 , 2 ). Assuming that the latter holds, we define

∞ X f(u) := fn(u), n=0

and we endeavor to prove that the two sides of (7.1) have the same Fourier coefficients. If fe(u) denotes the left-hand side of (7.1), then we want to show that

∞ 1 1 Z 2 Z 2 1 X 2πiku 2πiku (7.3) fn(u)e du = f(u)e du, 1 1 e 2π − − n=0 2 2 32 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

for each integer k. Since fe(u) as well as each of the functions fn(u), n ≥ 0, are even functions of u, it is sufficient to show that, for every integer k ≥ 0,

∞ 1 1 X Z 2 Z 2 (7.4) fn(u) cos(2πku)du = 2π f(u) cos(2πku)du. 1 1 e − − n=0 2 2 In what follows, k is fixed, and we proceed under the aforementioned assumption of uniform P∞ convergence of the series n=0 fn(u), so that the convergence at the left side of (7.4) is assured. Let us denote, for each positive integer N,

N−1 1 X Z 2 IN := fn(u) cos(2πku)du, 1 − n=0 2 so that (7.4) is equivalent to 1 Z 2 (7.5) lim IN = 2π f(u) cos(2πku)du. 1 e N→∞ − 2

Next, for N large, write IN in the form 1 N−1 ( M 1 M 1 ) Z 2   Z   X cos(2πku) X 2π(n + 2 + u)x 2π(n + 2 + u)x IN = lim sin − sin dt 1 1 − n + + u M→∞ m 0 t n=0 2 2 m=1 (7.6) ( M )! cos(2πku) X 2π(n + 1 − u)x Z M 2π(n + 1 − u)x + lim sin 2 − sin 2 dt du. n + 1 − u M→∞ m t 2 m=1 0 From Section 6, we know that for each fixed n, we have uniform convergence with respect to u 1 1 on compact subintervals of (− 2 , 2 ) as M → ∞. Thus, in (7.6), we may interchange the order of summation, integration, and taking the limit as M → ∞ to deduce that

 1 M N−1 1 Z 2   X X  cos(2πku) 2π(n + 2 + u)x IN = lim sin du 1 1 M→∞ − n + + u m m=1 n=0  2 2 1 1 Z 2 cos(2πku) 2π(n + − u)x + sin 2 du 1 1 − n + − u m 2 2 1 M 1 Z Z 2 cos(2πku) 2π(n + + u)x − sin 2 dudt 1 1 0 − n + + u t 2 2 1  M 1 Z Z 2 cos(2πku) 2π(n + − u)x  (7.7) − sin 2 dudt . 1 1 0 − n + − u t 2 2  WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 33

For each n, 0 ≤ n ≤ N − 1, we rewrite the integrals with respect to u on the right side of (7.7) in the forms 1 1 Z 2 cos(2πku) 2π(n + + u)x sin 2 du 1 1 − n + + u m 2 2 Z n+1 cos(2πk(w − n − 1 )) 2πwx = 2 sin dw n w m Z n+1 cos(2πkw) 2πwx = (−1)k sin dw n w m and 1 1 Z 2 cos(2πku) 2π(n + − u)x sin 2 du 1 1 − n + − u m 2 2 Z n+1 cos(2πk(n + 1 − w)) 2πwx = 2 sin dw n w m Z −n cos(2πkw) 2πwx = (−1)k sin dw. −n−1 w m Similar calculations hold for the the remaining two integrals in (7.7) with m replaced by t. Hence, (7.7) can be rewritten in the form ( M Z N   k X cos(2πkw) 2πwx IN = (−1) lim sin dw M→∞ w m m=1 −N Z M Z N cos(2πkw) 2πwx  (7.8) − sin dwdt . 0 −N w t The first integral on the right side of (7.8) can be rewritten as Z N cos(2πkw) 2πwx sin dw −N w m 1 Z N sin ((2πk + 2πx/m)w) 1 Z N sin ((2πk − 2πx/m)w) = dw − dw 2 −N w 2 −N w 1 Z (2πk+2πx/m)N sin y 1 Z (2πk−2πx/m)N sin y = dy − dy. 2 −(2πk+2πx/m)N y 2 −(2πk−2πx/m)N y A similar representation holds for the last integral on the right-hand side of (7.8) with m replaced by t. Therefore, (7.8) can be recast in the form

( M (−1)k X Z (2πk+2πx/m)N sin y Z (2πk−2πx/m)N sin y IN = lim dy − dy 2 M→∞ y y m=1 −(2πk+2πx/m)N −(2πk−2πx/m)N 34 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU ) Z M Z (2πk+2πx/t)N sin y Z M Z (2πk−2πx/t)N sin y (7.9) − dydt + dydt . 0 −(2πk+2πx/t)N y 0 −(2πk−2πx/t)N y In the following we now need to assume that k > 0. For large m, Z (2πk+2πx/m)N sin y Z m Z (2πk+2πx/t)N sin y JN (m) := dy − dydt −(2πk+2πx/m)N y m−1 −(2πk+2πx/t)N y ! Z m Z (2πk+2πx/m)N sin y Z (2πk+2πx/t)N sin y = dy − dy dt m−1 −(2πk+2πx/m)N y −(2πk+2πx/t)N y Z m Z (2πk+2πx/t)N sin y Z m Z −(2πk+2πx/m)N sin y (7.10) = − dydt − dydt. m−1 (2πk+2πx/m)N y m−1 −(2πk+2πx/t)N y Note that (2πk + 2πx/t)N ≥ (2πk + 2πx/m)N ≥ 2πkN, and so the integrand in each of the double integrals on the far right side of (7.10) is O(1/N). Also, the two double integrals are over domains of area bounded by 2πxN 2πxN  N   N  − = O = O . t m mt m2 Hence, we see that the first double integral on the extreme right side of (7.10) is  1  O . m2 We now consider the second double integral on the far right side of (7.10). Note that (2πk − 2πx/m)N ≥ (2πk − 2πx/t)N  N. Thus, it is easy to see that we will obtain the same estimates for the second double integral on the right-hand side of (7.10). We now sum both sides of (7.10), [log N] + 1 ≤ m ≤ M, to find that

M X  1  J (m) = O . N log N m=[log N]+1 We now use the bound above in (7.9), so that (7.9) now reduces to [log N] ! (−1)k X Z (2πk+2πx/m)N sin y Z (2πk−2πx/m)N sin y I = dy − dy N 2 y y m=1 −(2πk+2πx/m)N −(2πk−2πx/m)N ! (−1)k Z [log N] Z (2πk+2πx/t)N sin y Z (2πk−2πx/t)N sin y − dy − dy dt 2 0 −(2πk+2πx/t)N y −(2πk−2πx/t)N y  1  (7.11) + O . log N WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 35

Next, we divide the sum on m into two parts, m ≤ d2xe and d2xe < m ≤ [log N], and we similarly divide the interval of integration with respect to t. Note that, for each m ≥ d2xe + 1 and any t ∈ [m − 1, m], 2πx 2πx 2πx 2πk − ≥ 2πk − ≥ 2πk − ≥ 2πk − π ≥ π, m t d2xe for any k ≥ 1. Therefore, for such m, all the integrals in (7.11) are of the type, for B ≥ πN, Z B sin y  1  dy = π + O . −B y N This estimate is uniform in m, for m ≥ d2xe + 1, and uniform in t, for t ∈ [m − 1, m]. It follows that Z (2πk±2πx/m)N sin y Z m Z (2πk±2πx/t)N sin y dy − dydt −(2πk±2πx/m)N y m−1 −(2πk±2πx/t)N y   1    1   1  = π + O − π + O = O , N N N uniformly for m ≥ d2xe + 1, where the ± signs above are the same in all four places, i.e., either all of the signs are plus, or all of the signs are minus. It follows that the range of summation and integration in (7.11) can be further reduced to a bounded range. Thus,

d2xe ! (−1)k X Z (2πk+2πx/m)N sin y Z (2πk−2πx/m)N sin y I = dy − dy N 2 y y m=1 −(2πk+2πx/m)N −(2πk−2πx/m)N ! (−1)k Z d2xe Z (2πk+2πx/t)N sin y Z (2πk−2πx/t)N sin y − dy − dy dt 2 0 −(2πk+2πx/t)N y −(2πk−2πx/t)N y  1  (7.12) + O . log N Inside the sum on m, each integral has a limit as N → ∞, and these limits are: Z (2πk+2πx/m)N sin y lim dy = π, 1 ≤ m ≤ d2xe, N→∞ −(2πk+2πx/m)N y  π, if 2πk > 2πx/m, Z (2πk−2πx/m)N sin y  lim dy = 0, if 2πk = 2πx/m, N→∞ y −(2πk−2πx/m)N −π, if 2πk < 2πx/m. In summary,

d2xe ! (−1)k X Z (2πk+2πx/m)N sin y Z (2πk−2πx/m)N sin y lim dy − dy N→∞ 2 y y m=1 −(2πk+2πx/m)N −(2πk−2πx/m)N 36 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

(−1)k = (d2xeπ − # {1 ≤ m ≤ d2xe : m > x/k} π + # {1 ≤ m ≤ d2xe : m < x/k} π) 2 (−1)kπ = (d2xe − d2xe − # {1 ≤ m ≤ d2xe : m = x/k} + 2# {1 ≤ m ≤ d2xe : m ≤ x/k}) 2 (7.13) hxi (−1)kπ = (−1)kπ − δ, k 2 where ( 1, if x/k is an integer, δ = 0, otherwise.

Hence, by (7.12) and (7.13),

k k hxi (−1) π (7.14) lim IN = (−1) π − δ N→∞ k 2 ! (−1)k Z d2xe Z (2πk+2πx/t)N sin y Z (2πk−2πx/t)N sin y − lim dy − dy dt, N→∞ 2 0 −(2πk+2πx/t)N y −(2πk−2πx/t)N y

provided that the limit on the right-hand side of (7.14) indeed does exists. As we have seen above, the first integral on the right-hand side of (7.14) equals π + O(1/N), uniformly in t, t ∈ (0, d2xe). Therefore, (7.15) (−1)k Z d2xe Z (2πk+2πx/t)N sin y (−1)k   1  (−1)k lim dy = lim d2xeπ + O = d2xeπ. N→∞ 2 0 −(2πk+2πx/t)N y N→∞ 2 N 2

For the remaining double integral in (7.14), we subdivide the outer range of integration [0, d2xe] into the three ranges

 x 1  x 1 x 1  x 1  0, − , − , + , + , d2xe . k log N k log N k log N k log N

Using the fact that Z B sin y sup dy < ∞, B∈R −B y we find that

x 1 + (2πk−2πx/t)N Z k log N Z sin y  1  (7.16) dydt = O . x 1 − −(2πk−2πx/t)N y log N k log N WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 37

h x 1 i Next, uniformly for t ∈ k + log N , d2xe , we see that

 −1

Z (2πk−2πx/t)N sin y  2πx   dy = π + O  2πk − N  y  x 1   −(2πk−2πx/t)N + k log N log N  = π + O , N and hence Z d2xe Z (2πk−2πx/t)N sin y  x 1   log N  dydt = d2xe − + π + O x 1 + −(2πk−2πx/t)N y k log N N k log N πx  1  (7.17) = d2xeπ − + O . k log N

 x 1  Lastly, uniformly for t ∈ 0, k − log N ,

 −1

Z (2πk−2πx/t)N sin y  2πx   dy = −π + O  2πk − N  y  x 1   −(2πk−2πx/t)N − k log N log N  = −π + O , N and hence x 1 − (2πk−2πx/t)N Z k log N Z sin y x 1   log N  dydt = − −π + O 0 −(2πk−2πx/t)N y k log N N πx  1  (7.18) = − + O . k log N Combining (7.15)–(7.18), we conclude that ! (−1)k Z d2xe Z (2πk+2πx/t)N sin y Z (2πk−2πx/t)N sin y lim dy − dy dt N→∞ 2 0 −(2πk+2πx/t)N y −(2πk−2πx/t)N y (−1)k  πx πx = d2xeπ − d2xeπ + + 2 k k (−1)kπx (7.19) = . k 38 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

Combining (7.19) and (7.14), we finally deduce that k k k hxi (−1) π (−1) πx (7.20) lim IN = (−1) π − δ + . N→∞ k 2 k So, assuming that the right-hand side of (7.1) converges for at least one value of θ, we see that either (7.1) or (7.5) are equivalent to the proposition that 1 hxi (−1)k (−1)kx Z 2 (7.21) (−1)k − δ − = 2 f(u) cos(2πku)du, 1 e k 2 k − 2 for each k ≥ 1, where ( 1, if x/k is an integer δ = 0, otherwise. There remains the calculation of the integral on the right-hand side of (7.21). First, for each k ≥ 1, 1 Z 2 X x x 2 (−1)nF cos(2πnu) cos(2πku)du = (−1)kF 1 − n k 2 1≤n≤x hxi 1  (7.22) = (−1)k − δ . k 2 Trivially, for each k ≥ 1, 1 Z 2 1 (7.23) 2 − cos(2πku)du = 0. 1 − 4 2 Next, recall the [7, p. 46, formula 1.441, no. 2] ∞ X cos(2πnu) 1 1 log(2 cos(πu)) = (−1)n−1 , − < u < . n 2 2 n=1 1 1 Because the series on the right-hand side above is boundedly convergent on [− 2 , 2 ], we may invert the order of summation and integration to deduce that 1 ∞ 1 Z 2 X (−1)n−1 Z 2 2x log(2 cos(πu)) cos(2πku)du = 2x cos(2πnu) cos(2πku)du 1 1 − n − 2 n=1 2 (−1)k−1 (7.24) = x . k Bringing together (7.22)–(7.24), we find that 1 Z 2 hxi 1  (−1)k−1 (7.25) 2 f(u) cos(2πku)du = (−1)k − δ + x . 1 e − k 2 k 2 Comparing (7.25) with (7.21), we see that indeed (7.21) has been proven for k ≥ 1. WEIGHTED DIVISOR SUMS AND BESSEL FUNCTION SERIES, II 39

Let us summarize what we have accomplished. We have assumed that (7.1) holds for one partic- ular value of θ. We have shown that the right side of (7.1) converges uniformly on compact subsets 1 1 1 1 of (− 2 , 2 ). Thus, the right side is a well defined, continuous function of θ on (− 2 , 2 ), and we need to check that it is equal to the function on the left side of (7.1). Consider the difference of these 1 1 two functions, which is a continuous function of θ on (− 2 , 2 ). We have proved that all its Fourier coefficients for k 6= 0 vanish. Then, as a function of θ, this function will be constant. Moreover, since the two sides of (7.1) are equal for one particular value of θ, the above constant must be zero. And so (7.1) holds true for all θ. This then completes the proof of Theorem 17. This then completes the proof of Theorem 17. 

REFERENCES [1] B.C. Berndt, Identities involving the coefficients of a class of Dirichlet series. I, Trans. Amer. Math. Soc. 137 (1969), 345–359. [2] B.C. Berndt, Number Theory in the Spirit of Ramanujan, American Mathematical Society, Providence, RI, 2006. [3] B.C. Berndt, O.–Y. Chan, S.–G. Lim, and A. Zaharescu, Questionable claims found in Ramanujan’s lost note- book, in Tapas in Experimental Mathematics, T. Amdeberhan and V.H. Moll, eds., Contemp. Math., vol. 457, American Mathematical Society, Providence, RI, 2008, pp. 69–98. [4] B.C. Berndt and A. Zaharescu, Weighted divisor sums and Bessel function series, Math. Ann. 335 (2006), 249– 283. [5] H. Davenport, Multiplicative Number Theory, 3rd ed., Springer-Verlag, New York, 2000. [6] C. Deninger, On the analogue of the formula of Chowla and Selberg for real quadratic fields, J. Reine Angew. Math. 351 (1984), 171–191. [7] I.S. Gradshteyn and I.M. Ryzhik, eds., Table of Integrals, Series, and Products, 5th ed., Academic Press, San Diego, 1994. [8] A.P. Guinand, On Poisson’s summation formula, Ann. Math. 42 (1941), 591–603. [9] G.H. Hardy, On the expression of a number as the sum of two squares, Quart. J. Math. (Oxford) 46 (1915), 263–283. [10] G.H. Hardy, On Dirichlet’s divisor problem, Proc. London Math. Soc. (2) 15 (1916), 1–25. [11] G.H. Hardy, Collected Papers, Vol. II, Oxford University Press, Oxford, 1967. [12] S. Ramanujan, The Lost Notebook and Other Unpublished Papers, Narosa, New Delhi, 1988. [13] W. Sierpinski, O pewnem zagadnieniu z rachunku funkeyj asymptotycznych, Prace Mat. Fiz. 17 (1906), 77–118. [14] M.G. Vorono¨ı, Sur une fonction transcendante et ses applications a` la sommation de quelques series´ , Ann. Ecole´ Norm. Sup. (3) 21 (1904), 207–267, 459–533. [15] G.N. Watson, Theory of Bessel Functions, 2nd ed., University Press, Cambridge, 1966.

DEPARTMENT OF MATHEMATICS,UNIVERSITYOF ILLINOIS, 1409 WEST GREEN STREET,URBANA,IL 61801, USA E-mail address: [email protected]

DEPARTMENT OF MATHEMATICS,UNIVERSITYOF ILLINOIS, 1409 WEST GREEN STREET,URBANA,IL 61801, USA E-mail address: [email protected]

DEPARTMENT OF MATHEMATICS,UNIVERSITYOF ILLINOIS, 1409 WEST GREEN STREET,URBANA,IL 61801, USA 40 BRUCE C. BERNDT, SUN KIM, AND ALEXANDRU ZAHARESCU

INSTITUTEOF MATHEMATICS OF THE ROMANIAN ACADEMY, P.O. BOX 1-764, BUCHAREST RO-70700, ROMANIA E-mail address: [email protected]