Bernoulli Number

Author

Eric W. Weisstein
January 4, 2016

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Combinatorics/BernoulliNumber.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/BernoulliNumber.html.

©2016 Wolfram Research, Inc. except for portions noted otherwise

Initialization

VonStaudtFraction[n_]:=Total[1/VonStaudtPrimes[n]]
VonStaudtPrimes[n_]:=Module[{},
Select[Prime[Range[PrimePi[2n]+1]],IntegerQ[2n/(#-1)]&]
]

BernoulliBFractionalPart[n_Integer?Positive/;EvenQ[n]]:=Mod[-1/2-1/3-Total[1/Select[2*Rest[Divisors[Quotient[n,2]]]+1,PrimeQ]],1]-(1+(-1)^(n/2))/2

SetAttributes[FactorForm,Listable];
FactorForm[n_?NumberQ,opts___]:=Times@@(HoldForm[Power[##]]&@@@FactorInteger[n,opts])

Computation

System`BernoulliDump`DenominatorOfRationalBernoulliB[1*^7]

V8

N[Unevaluated[BernoulliB[10^2]],50]

Enumeration

Exact

Table[BernoulliB[n],{n,10}]

Numeric

Table[NBernoulliB[n],{n,10}]

Fractional Parts

2n

FractionalPart[BernoulliB[Range[0,100,2]]]

Through[{Numerator,Denominator}[%]]

4n+2

FractionalPart[BernoulliB[Range[2,100,4]]]

Through[{Numerator,Denominator}[%]]

Special Values

And@@Equal@@@Table[{BernoulliB[n,1],(-1)^n BernoulliB[n]},{n,0,10}]

FunctionExpand[BernoulliB[n,1]]

And@@Equal@@@Table[{BernoulliB[n,1/2],(2^(1-n)-1) BernoulliB[n]},{n,0,10}]

And@@Equal@@@Table[{BernoulliB[n,1/4],-2^(-n)(1-2^(1-n)) BernoulliB[n]-4^(-n)n EulerE[n-1]},{n,10}]

And@@Equal@@@Table[{BernoulliB[2n,1/3],-1/2(1-3^(1-2n)) BernoulliB[2n]},{n,0,10}]

And@@Equal@@@Table[{BernoulliB[2n,1/6],1/2(1-2^(1-2n))(1-3^(1-2n)) BernoulliB[2n]},{n,0,10}]

Timing

v5.1 Incremental

BernoulliB[Range[1000]];//Timing

BernoulliB[Range[2000]];//Timing

BernoulliB[Range[3000]];//Timing

v5.1 from Scratch

BernoulliB[Range[5000]];//Timing

BernoulliB[Range[10^4]];//Timing

BernoulliB[10^4];//Timing

v6.0 Incremental

BernoulliB[Range[1000]];//Timing

BernoulliB[Range[2000]];//Timing

BernoulliB[Range[3000]];//Timing

v6 from Scratch

BernoulliB[Range[5000]];//Timing

BernoulliB[Range[10000]];//Timing

BernoulliB[10^4];//Timing

BernoulliB[25 10^3];//Timing

Numerical

N[Unevaluated[BernoulliB[10^2]],50]

N[Unevaluated[BernoulliB[100]],50]

$Version

Large Values

NumeratorDigits[n_]:=Ceiling[(n (-1+Log[(n/(2π))])+(1/2) Log[8 n π]+Total[Log[Select[Divisors[n]+1,PrimeQ]]])/Log[10]]

200,000

b=BernoulliB[2*^5];//Timing

({Length/@IntegerDigits/@Through[{Numerator,Denominator}[#]],#}&[BernoulliB[2*^5]])//Timing

500,000

({Length/@IntegerDigits/@Through[{Numerator,Denominator}[#]],#}&[BernoulliB[5*^5]])//Timing

1,000,000

({Length/@IntegerDigits/@Through[{Numerator,Denominator}[#]],#}&[BernoulliB[1*^6]])//Timing

2,000,000

({Length/@IntegerDigits/@Through[{Numerator,Denominator}[#]],#}&[BernoulliB[2*^6]])//Timing

5,000,000

Computed by O. Pavlyk, Oct. 8, 2005

bn3=BernoulliB[5000000]; //AbsoluteTiming

{710866.8270827`13.303333241651519 Second,Null}

IntegerDigits[Numerator[bn3]]//Length

27332507

System`BernoulliDump`DenominatorOfRationalBernoulliB[5*^6]

NumeratorDigits[5*^6]

(10^7)

Computed by Sasha Pavlyk
Feb. 2008

$DataDirectory="/Volumes/Users/Data/Math/";

b=Import[$DataDirectory<>"BernoulliB10^7.m.bz2"];//Timing

IntegerLength[Numerator[b]]

NumeratorDigits[1*^7]

Denominator[b]

System`BernoulliDump`DenominatorOfRationalBernoulliB[1*^7]

N[b]

NBernoulliB[10^7]

(10^8)

Computed by David Harvey
Oct. 2008

$DataDirectory="/Volumes/Users/Data/Math/";

b=Import[$DataDirectory<>"BernoulliB10^8.m.bz2"];//Timing

...crash...

NumeratorDigits[1*^8]

Table Lookup

To File

outfile=OpenWrite["/Volumes/Data/Math/BernoulliB.txt",PageWidth->Infinity]

t=AbsoluteTime[];
Do[
Write[outfile,BernoulliB[n]];
If[Mod[n,100]==0,Print["BernoulliB(",n,") ",-t+(t=AbsoluteTime[])]],
{n,2,10000,2}
]

Close[outfile]

From File

Length[bernoulli=ReadList["/Volumes/Data/Math-Big/BernoulliB.txt"]]//Timing

Take[bernoulli,2]

BernoulliB/@Range[0,4]

ByteCount[bernoulli]/10^6. Megabyte

Numerator and Denominator

Denominator[BernoulliB[Range[2,10,2]]]

{n,d}=Through[{Numerator,Denominator}[BernoulliB/@Range[2,3000,2]]];//Timing

Prime numer((Subscript[B, n]))

2Flatten[Position[n,_?PrimeQ]]//Timing

l={10,12,14,16,18,36,42};

Do[Print[{i,l[[i]],PrimeQ[Numerator[BernoulliB[l[[i]]]]]//Timing}],{i,Length[l]}]

Prime numer((Subscript[B, n])/n)

2Flatten[Position[MapIndexed[Numerator[#1/(2#2[[1]])]&,Take[n,100]],_?PrimeQ]]//Timing

2Flatten[Position[MapIndexed[Numerator[#1/(2#2[[1]])]&,Take[n,1000]],_?PrimeQ]]//Timing

2Flatten[Position[MapIndexed[Numerator[#1/(2#2[[1]])]&,Take[n,All]],_?PrimeQ]]//Timing

Number of Digits

dig=Transpose[Length/@IntegerDigits/@{Numerator[#],Denominator[#]}&/@BernoulliB/@Range[2,100,2]]

<<Utilities`Plot`

MakeBoxes[label,TraditionalForm]:=RowBox[{StyleBox[RowBox[{"N","(",SubscriptBox[TagBox["B",BernoulliB],RowBox[{"2","n"}]],")"}],FontColor->RGBColor[1,0,0]],","," ",RowBox[{StyleBox["D",FontColor->RGBColor[0,0,1]],"(",StyleBox[SubscriptBox[TagBox["B",BernoulliB],RowBox[{"2"," ","n"}]],FontColor->RGBColor[0,0,1]],StyleBox[")",FontColor->RGBColor[0,0,1]]}]}]

Show[Block[{$DisplayFunction=Identity},Table[IntegerListPlot[dig[[i]],PlotStyle->{Red,Blue}[[i]]],{i,2}]
],PlotRange->All,AxesLabel->TraditionalForm/@{n,label}]

Running Maxima

BernoulliB[2]

hwm={First[#],2Last[#]}&@HighWaterMarks[Denominator[Prepend[bernoulli,BernoulliB[0]]]]

Powers of 10

Table[Denominator[BernoulliB[10^n]],{n,0,4}]

Table[Times@@Select[1+Divisors[10^n],PrimeQ],{n,0,10}]

Transpose[Table[IntegerLength/@Abs[Through[{Numerator,Denominator}[BernoulliB[10^n]]]],{n,0,6}]]//Timing

NumeratorDigits[n_]:=Ceiling[((1-n)Log[2]+Log[Gamma[n+1]]-n Log[Pi]+Total[Log[Select[Divisors[n]+1,PrimeQ]]])/Log[10]]

NumeratorDigits/@(10^Range[6])//Timing

Normal[Series[Log[Gamma[n+1]],{n,∞,0}]]//FullSimplify

FullSimplify[(1-n)Log[2]+n (-1+Log[n])+(1/2) (Log[n]+Log[2 π])-n Log[Pi],n>0&&n∈Integers]

NumeratorDigits[n_]:=Ceiling[(n (-1+Log[(n/(2π))])+(1/2) Log[8 n π]+Total[Log[Select[Divisors[n]+1,PrimeQ]]])/Log[10]]

NumeratorDigits/@(10^Range[20])//Timing

DenominatorDigits[n_]:=Ceiling[Total[Log[Select[Divisors[n]+1,PrimeQ]]]/Log[10]]

DenominatorDigits/@(10^Range[20])//Timing

Index = Denominator

v5.1

2Flatten[Position[Table[Denominator[BernoulliB[2n]]==2n,{n,3000}],True]]//Timing

2Flatten[Position[Table[Denominator[bernoulli[[n]]]==2n,{n,Length[bernoulli]}],True]]//Timing

v6

Do[Print[{n,2Flatten[Position[Table[Denominator[BernoulliB[2n]]==2n,{n,1000n}],True]]//Timing,{MemoryInUse[],MaxMemoryUsed[]}/10.^6 MB}],{n,30}]

Denominator

Formula

Table[Times@@Select[Divisors[2n]+1,PrimeQ],{n,10}]

Denominator[BernoulliB[Range[2,20,2]]]

Occurrence of 6

b=BernoulliB[Range[2,10^4,2]];//Timing

b=BernoulliB[Range[2,10^5,2]];//Timing

Take[Sort[{Length[#],First[#]}&/@Split[Sort[Denominator[Take[b,10^3/2]]]],#1<#2&],10]

Take[Sort[{Length[#],First[#]}&/@Split[Sort[Denominator[b]]],(#1[[1]]>=#2[[1]]&)],20]

data=Take[{{834,6},{358,30},{141,42},{113,66},{66,510},{60,138},{41,798},{39,2730},{29,870},{28,282},{28,330},{25,354},{18,1806},{16,498},{15,1590},{14,690},{14,1410},{13,642},{11,14322},{9,1074}},15];

bars={2#[[1]]/10^4,#[[2]]}&/@data;

<<BarCharts`

BarChart[{#1,ToString[#2]}&@@@bars,AxesLabel->{denom[BernoulliB[n]],f},ImageSize->400,BarStyle->Red]

bars2=Reverse[SortBy[bars,First]];
BarChart[First/@bars2,BarLabels->Last/@data,BarStyle->Red]

Table[Count[Take[Denominator[b],Floor[10^n/2]],6],{n,0,4}]

Periods of Fractional Parts

BernoulliB[Range[0,30,2]]

FractionalPart[%]

N[%,20]

DecimalPeriod/@FractionalPart[BernoulliB[Range[0,30,2]]]

Table[n/DecimalPeriod[FractionalPart[BernoulliB[n]]],{n,0,30,2}]

Derivative

Limit[Table[D[x/(Exp[x]-1),{x,n}],{n,10}] ,x->0]

Table[BernoulliB[n],{n,10}]

Inequalities

"Almost" an Inequality

l=FractionalPart[BernoulliB[4Range[5000]+2]];//Timing

Select[l,(1/6)<#<(2/3)&]

l=FractionalPart[BernoulliB[4Range[10^4]+2]];//Timing

Select[l,(1/6)<#<(2/3)&]

<<Utilities`Typesetting`

ListPlot[l,PlotStyle->{Red,PointSize[.01]},Epilog->{Blue,Line[{{0,1/6},{5000,1/6}}],Line[{{0,2/3},{5000,2/3}}]},AxesLabel->TraditionalForm/@{n,FractionalPart[BernoulliB[4n+2]]}]

Known counterexamples

Search

Select[Range[2,10^6,4],(1/6)<BernoulliBFractionalPart[#]<(2/3)&]//Timing

Select[Range[2,3 10^6,4],(1/6)<BernoulliBFractionalPart[#]<(2/3)&]//Timing

Select[Range[2,10^7,4],(1/6)<BernoulliBFractionalPart[#]<(2/3)&]//Timing

Select[Range[2,5 10^7,4],(1/6)<BernoulliBFractionalPart[#]<(2/3)&]//Timing

Select[Range[2,10^8,4],(1/6)<BernoulliBFractionalPart[#]<(2/3)&]//Timing

l={2072070,6216210,8128890,10360350,13548150,13783770,14504490,18648630,22792770,22972950,23111550,23513490,24386670,26936910,29099070,31081050,32162130,35225190,35862750,38288250,39189150,39369330,40644450,41351310,41600790,43513470,44414370,47657610,50207850,50540490,51482970,51801750,53603550,55945890,56902230,58814910,60090030,60810750,62792730,64234170,65315250,67740750,68378310,68918850,69334650,70540470,72522450,73160010,76666590,77026950,78579270,80810730,81171090,81767070,83998530,84234150,84954870,87297210,87823890,89099010,89417790,91441350,92245230,93243150,94837050,96486390,97068510,97387290,98024850,99549450,99729630};

HighWaterMarks[1-BernoulliBFractionalPart/@l][[2]]

l[[%]]

Grid[{#,FactorForm[#],N[BernoulliBFractionalPart[#],10]}&/@l,Dividers->All]//TraditionalForm

Others

(BernoulliBFractionalPart/@(4 {101013412,101238637,101463862,102049447,102208837,102229627,102926092,103085482,103643347}+2))//N

BernoulliB[2072070]

Plouffe  Jun.~21, 2004

Mod[2072070,4]

FactorInteger[2072070]

$Version

(b0=BernoulliB[2072070])//Timing

FractionalPart[b]

N[%,20]

FractionalPart[b]<2/3

b=BernoulliBFractionalPart[2072070]

N[b,20]

BernoulliB[41351310]

Plouffe (Jan.~28, 2007

Mod[41351310,4]

FactorInteger[41351310]

0.65697457368565569114816

$Version

(b=BernoulliB[41351310])//Timing

(b=BernoulliBFractionalPart[41351310])//Timing

N[b,20]

Generating Function

Series[x Cot[x],{x,0,10}]

Sum[BernoulliB[2n](-1)^n(2x)^(2n)/(2n)!,{n,0,5}]

Hurwitz

FullSimplify[-n!/(2Pi I)^n(Sum[k^(-n) Exp[2Pi I k x],{k,Infinity}]+Sum[k^(-n) Exp[2Pi I k x],{k,-1,-Infinity,-1}])]

FullSimplify[Table[{%51-BernoulliB[n,x]},{n,5}]]

Chop[Table[%67 /. x->Random[Complex],{10}]]

Sum of Powers

BernoulliB[0]

With[{p=2},Sum[k^p,{k,n}]]//Expand

(With[{p=2},((B+n+1)^(p+1)-B^(p+1))/(p+1)]//Expand)/.(B^k_.):>BernoulliB[k]

B[0]:=1
B[1]:=1/2
B[n_]:=BernoulliB[n]

btest[p_]:=Simplify[{Sum[k^p,{k,n}],Sum[B[k]p!/k!/(p-k+1)! n^(p-k+1),{k,0,p}]}]
btest2[p_]:=Simplify[{Sum[k^p,{k,n}],n^p+Sum[BernoulliB[k]p!/k!/(p-k+1)! n^(p-k+1),{k,0,p}]}]

Table[Simplify[Subtract@@btest[k]],{k,1,20}]

Table[Simplify[Subtract@@btest2[k]],{k,1,20}]

Together/@Table[n^p+Sum[((BernoulliB[k]p!)/(k!(p-k+1)!))(n^(p-k+1)),{k,0,p}],{p,5}]

((BernoulliB[k]p!)/(k!(p-k+1)!))(n^(p-k+1))/.k->p+1-k

Together/@Table[Sum[(((n^k) (-1)^(1-p+k)BernoulliB[1-k+p] p!)/(k! (1-k+p)!)),{k,p+1}],{p,5}]

Together/@Table[Sum[(n^k) (-1)^(1-p+k)BernoulliB[1-k+p]Binomial[p,k]/(p-k+1) ,{k,p}],{p,5}]

a[p_,k_]:=(((-1)^(1-p+k)BernoulliB[1-k+p] p!)/(k! (1-k+p)!))

Table[Sum[a[p,k],{k,p+1}],{p,10}]

aa[k_,i_]:=Coefficient[Sum[l^k,{l,n}],n,i]

Sums

(∑_(k=0)^n)(BernoulliB[6 k]) (Binomial[6 n+3, 6 k])==2 n+1

Sum[Binomial[6n+3,6k]BernoulliB[6k],{k,0,n}]

Subtract@@@Table[{Sum[Binomial[6n+3,6k]BernoulliB[6k],{k,0,n}],2n+1},{n,0,10}]

(∑_(k=0)^n)(BernoulliB[6 k+2]) (Binomial[6 n+5, 6 k+2])==(1/3) (6 n+5)

Sum[Binomial[6n+5,6k+2]BernoulliB[6k+2],{k,0,n}]

(∑_(k=0)^n)(BernoulliB[6 k+2]) (Binomial[6 n+5, 6 k+2])==(1/3) (6 n+5)

Subtract@@@Table[{Sum[Binomial[6n+5,6k+2]BernoulliB[6k+2],{k,0,n}],(6n+5)/3},{n,0,10}]

(∑_(k=1)^n)(BernoulliB[6 k-2]) (Binomial[6 n+1, 6 k-2])==-(1/6) (6 n+1)

Sum[Binomial[6n+1,6k-2]BernoulliB[6k-2],{k,1,n}]

Subtract@@@Table[{Sum[Binomial[6n+1,6k-2]BernoulliB[6k-2],{k,1,n}],-(6n+1)/6},{n,10}]

(Subscript[B, n])==(∑_(k=0)^n)(((∑_(r=0)^k)(((-1))^r) (({{k}, {r}})) (r^n))/(k+1))

Table[Sum[(-1)^r Binomial[k,r]r^n,{r,0,k}]/.n->nn,{nn,4}]//ColumnForm//TraditionalForm

Table[Sum[Sum[(-1)^r Binomial[k,r]r^n,{r,0,k}]/(k+1),{k,0,n}],{n,5}]

Table[BernoulliB[n],{n,5}]

Sum[Binomial[n,k]BernoulliB[k],{k,0,n-1}]

Table[Sum[Binomial[n,k]BernoulliB[k],{k,0,n-1}],{n,10}]

Table[Sum[Binomial[6n+3,6k]BernoulliB[6k],{k,0,n}],{n,5}]

Table[2n+1,{n,5}]

Table[Sum[Binomial[6n+5,6k+2]BernoulliB[6k+2],{k,0,n}],{n,5}]

Table[(6n+5)/3,{n,5}]

(Subscript[B, n])==⌈(1/e)(∑_(m=1)^(2 n))((m^n)/(m!))⌉

Table[(1/E)Sum[((m^n)/(m!)),{m,2n}],{n,0,10}]

Ceiling[%]

<<DiscreteMath`Combinatorica`

BellB/@Range[0,10]

(∑_(k=0)^(2 n))(Subscript[B, k]) (Subscript[F, 2 n-k]) (({{2 n}, {k}}))==0

Sum[BernoulliB[k]Fibonacci[2n-k]Binomial[2n,k],{k,0,2n}]

FullSimplify[FunctionExpand[BernoulliB[k]Fibonacci[2n-k]Binomial[2n,k]],(k|n)∈Integers&&0≤k≤2n]

Sum[%,{k,0,2n}]

Table[Sum[BernoulliB[k]Fibonacci[2n-k]Binomial[2n,k],{k,0,2n}],{n,0,10}]

Sum[BernoulliB[2k]Fibonacci[2n-2k]Binomial[2n,2k],{k,0,n}]

Table[Sum[BernoulliB[2k]Fibonacci[2n-2k]Binomial[2n,2k],{k,0,n}]-n Fibonacci[2n-1],{n,0,10}]

(LucasL[2 n-1]) (∑_(k=0)^(2 n-1))(Subscript[B, -k+2 n-1]) (Subscript[F, k]) (({{2 n-1}, {k}}))-2 (∑_(k=0)^(2 n-1))(Subscript[B, k]) (Subscript[F, k]) (({{2 n-1}, {k}}))==4 n-2

LucasL[2n-1]Sum[BernoulliB[2n-1-k]Fibonacci[k]Binomial[2n-1,k],{k,0,2n-1}]-2Sum[BernoulliB[k]Fibonacci[k]Binomial[2n-1,k],{k,0,2n-1}]-(4n-2)

Expand[Table[%,{n,10}]]

(n+1) (((-1))^n) (∑_(k=0)^n)(Subscript[S, n]^((k))) (Subscript[B, k])==n!

(n+1)(-1)^n Sum[StirlingS1[n,k]BernoulliB[k],{k,0,n}]

Table[%,{n,0,10}]

(n+1) (((-1))^(n+1)) (∑_(k=0)^n)(((-1))^k) (Subscript[S, n]^((k))) (Subscript[B, k])==(n-1)!

(n+1)(-1)^(n+1) Sum[(-1)^k StirlingS1[n,k]BernoulliB[k],{k,0,n}]

Table[(n+1)(-1)^(n+1) Sum[(-1)^k StirlingS1[n,k]BernoulliB[k],{k,0,n}]-(n-1)!,{n,10}]

(n+1) (((-1))^n) (∑_(k=0)^n)(2^k) (Subscript[S, n]^((k))) (Subscript[B, k])==(∑_(k=0)^n)k! (n-k)!

Table[Sum[k!(n-k)!,{k,0,n}],{n,0,10}]

RSolve[a[n]==n!+((n+1)/2)a[n-1]&&a[0]==1,a[n],n]

FullSimplify[-(((2^(-1-n)) Gamma[2+n] (2 I π+I n π+(2^(2+n)) Hypergeometric2F1[2+n,1,3+n,2]))/(2+n)),n∈Integers&&n>0]

Table[-I (2^(-1-n)) (π-I Beta[2,2+n,0]) Gamma[2+n],{n,0,6}]//FunctionExpand//Expand

(n+1)(-1)^n Sum[2^k StirlingS1[n,k]BernoulliB[k],{k,0,n}]

Table[(n+1)(-1)^n Sum[2^k StirlingS1[n,k]BernoulliB[k],{k,0,n}],{n,0,10}]

Sum[k!(n-k)!,{k,0,n}]

Table[(n+1)(-1)^n Sum[2^k StirlingS1[n,k]BernoulliB[k],{k,0,n}]-Sum[k!(n-k)!,{k,0,n}],{n,0,10}]

(∑_(i=0)^h)(((1-(2^(1-i))) (BernoulliB[i]) (1-(2^(-h+i+1))) (BernoulliB[h-i]))/(i! (h-i)!))==(((1-h) (BernoulliB[h]))/(h!))

Gosper

b[h_]:={Sum[BernoulliB[h-i](1-2^(1-i))(1-2^(i-h+1))BernoulliB[i]/(h-i)!/i!,{i,0,h}],(1-h)BernoulliB[h]/h!}

FullSimplify[b[h][[1]]-b[h][[2]]]

Table[b[h],{h,5}]

(∑_(j=0)^h)(((3^(2 j)) (1+(2^(2 j+1))) (2 (h-j)-1) (Subscript[B, 2 (h-j)]) (Subscript[B, 2 j+1])((1/3)))/((2 (h-j))! (2 j+1)!))==((2 (3^(2 (h-1))) (1+(2^(2 h-1))) h (Subscript[B, 2 h-1])((1/3))-(h-(1/2)) (Subscript[B, 2 h]))/((2 h)!))

Gosper

b[i_]:={Sum[BernoulliB[2j+1,1/3]BernoulliB[2(i-j)](2(i-j)-1)3^(2j)(2^(2j+1)+1)/(2(i-j))!/(2j+1)!,{j,0,i}],
(2BernoulliB[2i-1,1/3]3^(2(i-1))i(2^(2i-1)+1)-(i-1/2)BernoulliB[2i])/(2i)!}

Equal@@b[h]//TraditionalForm

FullSimplify[b[h][[1]]-b[h][[2]]]

Table[b[h],{h,5}]

Recurrences

Whee Ky Ma

b[k_]:=Sum[(-1)^i Binomial[k+1,i] BernoulliB[k+1-i]+(-1)^k /2(k-1),{i,3,k-1}]/(k+1)

Table[{b[k], BernoulliB[k]}, {k, 0, 10}]

Asymptotic

b[n_]:=FullSimplify[ 4Sqrt[Pi n](n/Pi/E)^(2n)]

N[{BernoulliB[#],b[#/2]}&/@{50,100,150,152,200}]

Integrals

Crepps

FullSimplify[((n(n-1))/(4((2^n)-1)))(∫_0^1)EulerE[n-2,x]\[DifferentialD]x]

Table[((n (-EulerE[-1+n,0]+EulerE[-1+n,1]))/(4 (-1+(2^n))))-BernoulliB[n],{n,10}]

Plouffe Identity

s1=Mod[Table[-1/2+Plus@@Table[-Floor[n/(Prime[k]-1)]/Prime[k],{k,PrimePi[n+1]}],{n,20}],1]

s1=Table[-1/2+Mod[Plus@@Table[-Floor[n/(Prime[k]-1)]/Prime[k],{k,PrimePi[n+1]}],1],{n,20}]

s2=Mod[Table[Plus@@Table[BernoulliB[k],{k,0,n}],{n,20}],1]

s21=#-Floor[#]&/@Table[Sum[BernoulliB[k],{k,0,n}],{n,20}]

s22=Mod[Table[Sum[BernoulliB[k],{k,0,n}],{n,20}],1]

InputForm[s1-s2]

Sequences

A093058

(A093058=Position[Mod[#,59^2]&/@Numerator/@b,0]//Flatten)//Timing

A093059

(A093059=Position[Mod[#,67^2]&/@Numerator/@b,0]//Flatten)//Timing

A093060 (Numbers n such that numerator of (Subscript[B, 2 n]) is divisible by the first n irregular primes.)

irr={37,59,67,101,103,131,149,157};

Table[Position[Plus@@Mod[#,Take[irr,n]]&/@Numerator/@b,0,{1},1]//Flatten,{n,4}]//Timing