Bernoulli Polynomials Talks given at LSBU, October and November 2015 Tony Forbes Bernoulli Polynomials The Bernoulli polynomials B (x) are defined by n B (x) = 1, 0 (cid:90) 1 B(cid:48)(x) = nB (x) and B (x)dx = 0, n ≥ 1. (1) n n−1 n 0 Thus 1 1 B (x) = x− , B (x) = x2 −x+ , 1 2 2 6 3x2 x 1 B (x) = x3 − + , B (x) = x4 −2x3 +x2 − , 3 4 2 2 30 5x4 5x3 x 5x4 x2 1 B (x) = x5 − + − , B (x) = x6 −3x5 + − + , 5 6 2 3 6 2 2 42 7x6 7x5 7x3 x 14x6 7x4 2x2 1 B (x) = x7 − + − + , B (x) = x8 −4x7 + − + − , 7 8 2 2 6 6 3 3 3 30 9x8 21x5 3x 15x8 3x2 5 B (x) = x9− +6x7− +2x3− , B (x) = x10−5x9+ −7x6+5x4− + , 9 10 2 5 10 2 2 66 11x10 55x9 11x3 5x B (x) = x11 − + −11x7 +11x5 − + , 11 2 6 2 6 33x8 33x4 691 B (x) = x12 −6x11 +11x10 − +22x6 − +5x2 − , .... 12 2 2 2730 The constant term gives the nth Bernoulli number, B = B (0), n n 1 1 1 1 1 B = 1, B = − , B = , B = 0, B = − , B = 0, B = , B = 0, B = − , 0 1 2 3 4 5 6 7 8 2 6 30 42 30 5 691 7 3617 B = 0, B = , B = 0, B = − , B = 0, B = , B = 0, B = − , 9 10 11 12 13 14 15 16 66 2730 6 510 43867 174611 B = 0, B = , B = 0, B = − , .... 17 18 19 20 798 330 There is some merit in defining what one might call the alternative Bernoulli polynomials: B(cid:98) (x) = 1, 0 (cid:90) 1 B(cid:98)(cid:48)(x) = nB(cid:98) (x) and B(cid:98) (x)dx = 1, n ≥ 1. n n−1 n 0 Then B(cid:98) (x) = B (x)+nxn−1 = (−1)nB (−x). The corresponding alternative Bernoulli n n n numbers are B(cid:98) = B(cid:98) (0) = B (1). The only difference occurs when n = 1: n n n 1 B(cid:98) = = −B , B(cid:98) = B , n = 0, 2, 3, 4, .... 1 1 n n 2 We won’t investigate the alternative polynomials, but watch out for B(cid:98) in what follows. n 1 The graphs show that B (1−x) = (−1)nB (x). From the definition, the coefficient of x n n is B(cid:48)(0) = nB . More generally, the coefficient of xm in B (x) is (cid:0)n(cid:1)B ; hence n n−1 n m n−m n (cid:18) (cid:19) (cid:88) n B (x) = B xm. n n−m m m=0 Moreover, for x ∈ [0,1] we have these approximations for large n: B (x) ≈ B cos2πx, n even, B (x) ≈ B (1/4)sin2πx, n odd, n n n n and (cid:90) 1 B (x)B (x)dx = 0 when n+m is odd. n m 0 (cid:82)1 Exercise for reader: compute B (x)B (x)dx when n+m is even. 0 n m 0.15 0.10 0.05 0.2 0.4 0.6 0.8 1.0 (cid:45)0.05 Bernoulli polynomials B (x) for n = 2, 3, ..., 8 n The generating functions for the Bernoulli polynomials and the Bernoulli numbers are respectively text (cid:88)∞ tn t (cid:88)∞ tn = B (x) and = B . (2) et −1 n n! et −1 n n! n=0 n=0 These could be used as definitions; then the left-hand equality in (1) is recovered by differentiating the left-hand equality in (2) with respect to x: t2ext (cid:88)∞ tn text (cid:88)∞ tn−1 (cid:88)∞ B(cid:48) (x) tn = B(cid:48)(x) ⇒ = B(cid:48)(x) = n+1 · . ex −1 n n! ex −1 n n! n+1 n! n=1 n=1 n=0 From the right-hand equality in (2) we obtain two facts: (i) B = 0 for n ≥ 1 since the 2n+1 function t/(et −1)+t/2 is even, and (ii) multiplying the series by the Taylor expansion of (et −1)/t gives n (cid:18) (cid:19) (cid:88) n+1 B = 0n. k k k=0 ThislastequalitycanbeusedtocomputetheB recursively; seeLovelace[3], forexample. n 2 Stirling numbers of the second kind The Stirling number of the second kind S(n,k) is the number of ways to partition a set of n objects into k non-empty subsets: 1 (cid:88)k (cid:18)k(cid:19) (−1)k (cid:88)k (cid:18)k(cid:19) S(n,k) = (−1)k−j jn = (−1)j jn, k! j k! j j=0 j=0 or they can be defined recursively S(0,0) = 1, S(n,0) = 0 for n > 0, S(0,k) = 0 for k > 0, S(n+1,k) = kS(n,k)+S(n,k −1) for k > 0. k n 0 1 2 3 4 5 6 7 8 9 10 0 1 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 2 0 1 1 0 0 0 0 0 0 0 0 3 0 1 3 1 0 0 0 0 0 0 0 4 0 1 7 6 1 0 0 0 0 0 0 5 0 1 15 25 10 1 0 0 0 0 0 6 0 1 31 90 65 15 1 0 0 0 0 7 0 1 63 301 350 140 21 1 0 0 0 8 0 1 127 966 1701 1050 266 28 1 0 0 9 0 1 255 3025 7770 6951 2646 462 36 1 0 10 0 1 511 9330 34105 42525 22827 5880 750 45 1 It is clear from the recursive definition that the S(n,k) are integers, that S(n,n) = 1 and that S(n,k) = 0 if k > n. Interesting problem: prove directly that (cid:80)k (−1)j(cid:0)k(cid:1)jn = 0 j=0 j whenever k > n > 0. 1000 800 600 400 200 k 50 100 150 200 250 300 Plot of logS(n,k)+1 for k = 5,10,... and n = 1,2,...,300 3 Euler–Maclaurin summation Let f(x) be a sufficiently well-behaved function. Suppose we want to sum f(x) over integer values of x and that we know how to integrate f(x). Let m < n be integers. Then (cid:88)n f(r) = (cid:90) nf(x)dx+(cid:88)r (cid:0)f(k−1)(n)−f(k−1)(m)(cid:1) B(cid:98)k −(cid:90) nf(r)(x)B(cid:98)r((cid:98)x(cid:99)−x) dx, k! r! m m k=m+1 k=1 or, making use of the fact that B = 0 for odd n ≥ 3, n (cid:88)n f(k) = (cid:90) nf(x)dx+ f(n)−f(m) +(cid:88)s (cid:0)f(2k−1)(n)−f(2k−1)(m)(cid:1) B2k 2 (2k)! m k=m+1 k=1 (cid:90) n B (x−(cid:98)x(cid:99)) − f(2r)(x) 2r dx, (r ≥ 1). (2r)! m If f(x) is a polynomial, the last term will vanish for sufficiently large r. For example, to get the formula for the sum of the first n squares put m = 0 and f(x) = x2: (cid:88)n (cid:90) n n2 B n3 n2 n n(2n+1)(n+1) k2 = x2dx+ +2n 2 = + + = . 2 2! 3 2 6 6 0 k=1 Poly-Bernoulli numbers If we define the more general poly-Bernoulli numbers B(k) by n (cid:88)∞ tm Li (1−e−t) (cid:88)∞ tn Li (t) = , k = B(k) , k mk 1−e−t n n! m=1 n=0 thenk = 1givesLi1(x) = −log(1−x)andthegeneratingfunctiont/(1−e−t)ofBn(1) = B(cid:98)n. Properties of the Bernoulli numbers Theorem 1 (Explicit formula for the Bernoulli numbers) We have (cid:88)n 1 (cid:88)k (cid:18)k(cid:19) (cid:88)n (−1)k B = (−1)j jn = k!S(n,k). (3) n k +1 j k +1 k=0 j=0 k=0 Proof We refer to the generating function: x log(1+(ex −1)) 1 (cid:88)∞ (ex −1)k (cid:88)∞ (ex −1)k = = (−1)k+1 = (−1)k . ex −1 ex −1 ex −1 k k +1 k=1 k=0 Now expand the binomial (ex −1)k and then expand ex: x (cid:88)∞ (−1)k (cid:88)k (cid:18)k(cid:19) (cid:88)∞ (−1)k (cid:88)k (cid:18)k(cid:19)(cid:88)∞ jnxn = (−1)k−j ejx = (−1)k−j ex −1 k +1 j k +1 j n! k=0 j=0 k=0 j=0 n=0 (cid:88)∞ xn (cid:88)∞ (−1)k (cid:88)k (cid:18)k(cid:19) = (−1)k−j jn n! k +1 j n=0 k=0 j=0 (cid:88)∞ xn (cid:88)∞ (−1)k = k!S(n,k). n! k +1 n=0 k=0 4 But S(n,k) = 0 when k > n. Hence x (cid:88)∞ xn (cid:88)n (−1)k = k!S(n,k), ex −1 n! k +1 n=0 k=0 as required to get the right-hand expression in (3). The other expression follows by substituting for S(n,k). (cid:3) Theorem 2 (von Staudt – Clausen) If n is a positive even integer, then (cid:88) 1 B + ≡ 0 (mod 1). (4) n p p−1|n, p prime Proof Suppose n ≥ 2 is even. We consider each of the terms in the sum over k in either of the two expressions of (3). If k + 1 is not prime and k > 3, then k!/(k + 1) is an integer, as also is S(n,k); so the term corresponding to this k is an integer. Also one can verify directly that the terms corresponding to k = 0 and k = 3 are integers. Now suppose k +1 is prime and k does not divide n. Write n = qk +r with 0 < r < k. Then for 0 < j ≤ k, jqk ≡ 1 (mod k +1). Hence modulo k +1 the sum over j becomes (cid:80)k (−1)j(cid:0)k(cid:1)jr = ±k!S(r,k) = 0 since k > r. j=0 j Finally, suppose k+1 is prime and k divides n. Then for 0 < j ≤ k, jn ≡ 1 (mod k+1), and 0n = 0. Therefore (cid:80)k (−1)j(cid:0)k(cid:1)jn ≡ −1 (mod k+1) and hence modulo 1 there is a j=0 j contribution of −1/(k +1) to the sum. (cid:3) When n is odd the sum is zero modulo 1; the k = 1 term contributes 1/2, as before, but now the k = 3 term also contributes 1/2. All other k terms are integers. The Von Staudt–Clausen theorem allows you to compute the fractional part of B for n some quite large n. For example, if n = 28000000000, the divisors of n are powers of two and the denominators of the fractions in (4) are just 2 and the Fermat primes, 3, 5, 17, 257 and 65537. On the other hand, the calculation is currently impossible for, say, n = 29000000000. It is convenient to have an expression for the absolute value of B . So we rearrange (4) n to get, writing {x} for x−(cid:98)x(cid:99), (cid:110) (cid:111) (cid:80) 1/p , n > 0, n ≡ 0 (mod 4), p−1|n, pprime (cid:110) (cid:111) 1− (cid:80) 1/p , n ≡ 2 (mod 4), p−1|n, pprime |B | = (cid:98)|B |(cid:99)+ (5) n n 0, n = 0, 1/2, n = 1, 0, n > 1, n odd. Thus for n = 2,4,..., we get 1 1 1 1 5 691 1 47 775 41 17 691 1 59 12899 , , , , , , , , , , , , , , , 6 30 42 30 66 2730 6 510 798 330 138 2730 6 870 14322 47 1 638653 1 2011 1 53 41 14477 5 83 775 59 53 22298681 , , , , , , , , , , , , , , , 510 6 1919190 6 13530 1806 690 282 46410 66 1590 798 870 354 56786730 1 47 62483 1 289 48540859 1 1 37 47717 , , , , , , , , , , 6 510 64722 30 4686 140100870 6 30 3318 230010 77 1058237 1 5407 230759 77 1 1450679 1 4471 , , , , , , , , , 498 3404310 6 61410 272118 1410 6 4501770 6 33330 5 Theorem 3 The Bernoulli numbers are related to the Riemann zeta-function by 2n! B(cid:98) = −nζ(1−n), n ≥ 0; B = − ζ(n), even n ≥ 0. (6) n n (2πi)n Proof (Titchmarsh [6, section 2.4]) Let s be a complex veriable with Res > 1. Using (cid:90) ∞ Γ(s) xs−1e−kxdx = ks 0 we get (cid:88)∞ (cid:90) ∞ (cid:90) ∞ (cid:88)∞ (cid:90) ∞ xs−1 Γ(s)ζ(s) = xs−1e−ksdx = xs−1 e−kxdx = dx. ex −1 0 0 0 k=1 k=1 Let C , ρ > 0, denote the contour that goes from +∞ to ρ on the real axis, circles the ρ origin once anticlockwise and then returns to +∞. Let ρ → 0. Since the integral along the circle tends to zero as ρ tends to zero, we have (cid:90) zs−1 (cid:90) 0 zs−1 (cid:90) ∞ (e2πiz)s−1 dz = dz + dz = (e2πis −1)Γ(s)ζ(s). ez −1 ez −1 ez −1 C0 ∞ 0 Using the well-known formula Γ(1−z)Γ(z) = π/(sinπz), we obtain 1 (cid:90) zs−1 e−πisΓ(1−s) (cid:90) zs−1 ζ(s) = dz = dz, (e2πis −1)Γ(s) ez −1 2πi ez −1 C0 C0 which extends the domain of ζ(s) to the whole complex plane except for s = 1. Now let n ≥ 1 be an integer and put s = 1−n. Then (−1)n−1(n−1)! (cid:90) z−n (−1)n−1(n−1)! (cid:90) (cid:88)∞ B ζ(1−n) = dz = k zk−n−1dz. 2πi ez −1 2πi k! C0 C0 k=0 But the value of integral on the right is 2πi times the residue of the pole at z = 0, and this is just the coefficient of 1/z in the sum. Hence, recalling that B = −B(cid:98) and B = 0 1 1 n for odd n ≥ 3, (−1)n−1(n−1)! B (−1)n−1B B(cid:98) n n n ζ(1−n) = ·2πi = = − . 2πi n! n n This is the left-hand equality in (6) for n ≥ 1. For the remaining case, recall that 1 ζ(s) = −γ +O(s−1) as s → 1. s−1 The right-hand equality follows from the functional equation of ζ(s), (cid:18) (cid:19) (cid:16)s(cid:17) 1−s Γ π−s/2ζ(s) = Γ π−(1−s)/2ζ(1−s). 2 2 (See Edwards [1], for example.) (cid:3) Of course we can discard the sign if we are interested only in the absolute value: (cid:18) (cid:19) 2n! 2n! 1 1 |B | = ζ(n) = 1+ + +... , even n ≥ 2. (7) n (2π)n (2π)n 2n 3n 6 We can use (5) and (7) to determine |B | exactly. Write b(n) = (2n!)1/n/(2π). Then split n the sum into three parts, |B | = I +E +R , n n n n (cid:100)(cid:88)b(n)(cid:101)(cid:18)b(n)(cid:19)n (cid:100)(cid:88)b(n)(cid:101)(cid:18)b(n)(cid:19)n (cid:88)∞ (cid:18)b(n)(cid:19)n In = , En = −In, Rn = . k k k k=1 k=1 k=(cid:100)b(n)+1(cid:101) We compute I exactly and E approximately, we assume that R is small enough to be n n n ignored, and we get the exact value of F , the fractional part of |B |, using the von Staudt n n – Clausen formula, (5). Then for positive even n, we have |B | = I +(cid:15)+F , where (cid:15) = 0 n n n if E < F , (cid:15) = 1 otherwise. Example: n n (cid:100)b(1000)(cid:101) = 59, I = 5318704469...6955251716 ≈ 5.318704469415522×101769, 1000 55743421 E ≈ 0.1625177182 and F = ≈ 0.1625177220 > E . 1000 1000 1000 342999030 There is an interesting application concerning prime generating functions, [4], and also an interesting problem. Is there an n that requires (cid:15) = 1? By simple-minded direct calculation there are no instances for even n up to 3200. But could it possibly happen thatE isverynearlyequaltobutlessthan1,F isverysmall,andR ,whichisverysmall n n n anyway, is just large enough so that E +R > 1? Then we would have F = E +R −1 n n n n n and hence (cid:98)|B |(cid:99) = I +1. A similar problem is presented in M500 [2, 5]. n n References [1] H. M. Edwards, Riemann’s Zeta-Function. [2] TF, Problem 267.4 – Bernoulli numbers, M500 267 (December 2015). [3] A.A.Lovelace, NoteGin: L.F.Menabrea, SketchofTheAnalyticalEngineInvented by Charles Babbage With notes upon the Memoir by the Translator, Ada Augusta, Countess of Lovelace, Biblioth`eque Universelle de Gen`eve 82 (October 1842). [4] R. Thompson, Bernoulli numbers and prime generating functions, M500 267 (De- cember 2015). [5] R. Thompson, Solution 267.4 – Bernoulli numbers, M500, to appear. [6] E. C. Titchmarsh, The Theory of the Riemann Zeta-Function. 7