%I #15 Nov 07 2012 16:45:04
%S 0,1,2,3,4,5,2,3,4,5,6,7,4,5,6,7,8,5,6,7,8,9,6,7,8,9,10,7,8,9,10,11,
%T 12,9,10,11,12,13,10,11,12,13,14,11,12,13,14,15,12,13,14,15,16,17,14,
%U 15,16,17,18,15,16
%N Number of real roots of the n-th Bernoulli polynomial B(n,x).
%D R. Edwards and D. J. Leeming, The exact number of real roots of the Bernoulli polynomial, Journal of Approximation Theory 164:5 (2012), pp. 754-775.
%D A. P. Veselov and J. P. Ward, On the real zeros of the Hurwitz zeta-function and Bernoulli polynomials. J. Math. Anal. Appl. 305 (2005), no. 2, 712-721.
%H A. P. Veselov and J. P. Ward, <a href="http://www.lboro.ac.uk/departments/ma/research/preprints/papers99/99-35.pdf">On the real roots of the Bernoulli polynomials and the Hurwitz zeta-function</a>, 1999 preprint.
%F a(n) = 2n/(Pi*e) + O(log n).
%t a[n_] := CountRoots[ BernoulliB[n, x], x]; Table[a[n], {n, 0, 60}] (* _Jean-François Alcover_, Sep 13 2012 *)
%o (PARI) a(n)=polsturm(sum(i=0,n,binomial(n,i)*bernfrac(i)*x^(n-i)))
%o (PARI) a(n)=my(e=1e-29,v=polroots(bernpol(n)));sum(i=1,#v,abs(imag(v[i])) <= abs(v[i])*e) \\ _Charles R Greathouse IV_, Nov 07 2012
%K nonn
%O 0,3
%A _Benoit Cloitre_, Jun 19 2004
|