A companion to arXiv:2009.06743v2 [math.HO]
Numbering of formulas as in version 2.
Browsable at BernoulliFunctionNotebook.
Source at BernoulliFunctionSource.
Needs Wolfram Language kernel for Jupyter. See instructions at GitHub.
(* This is used only for some fancy plot legends. *)
(* You will have to do this only once: *)
(* ResourceFunction["MaTeXInstall"][] *)
(* Thereafter you have to execute only: *)
<<MaTeX`
(* MaTeX["x^2"] *)
(* But you not really need these fancy plot legends. *)
(* Comment them out to use this notebbok without MaTex. *)
MaTeX@HoldForm[Integrate[Sin[x], {x, 0, Infinity}]]
(* http://szhorvat.net/pelican/latex-typesetting-in-mathematica.html *)
(* Always execute first. *)
(* 0^0 = 1 *)
Unprotect[Power]; Power[0, 0] = 1;
(* tau = 2*Pi*I *)
tau := 2*Pi*I;
\[Tau][s_] := tau^(-s) + (-tau)^(-s);
(* Macro to get a better format *)
Poly[a_] := PolynomialForm[Collect[Expand[Simplify[FunctionExpand[a]]], x],
TraditionalOrder -> True];
(* Macro to display a sequence table *)
SeqGrid[T_] := With[{y = Length[T]},
Grid[{Table[i, {i, 0, y-1}], T}, Frame -> All]];
SeqGrid1[T_] := With[{y = Length[T]},
Grid[{Table[i, {i, y}], T}, Frame -> All]];
SeqGrid2[T_] := With[{y = Length[T] - 1},
Grid[{Table[2 i, {i, 0, y}], T}, Frame -> All]];
Laurent series of the Riemann zeta function
Series[Zeta[s] - 1/(s - 1), {s, 1, 5}] // TeXForm
Stieltjes constants, defined via integral
gamma[s0_, prec_] := (* parameter 'prec' for setting the precision *)
Module[{s, z}, {s} = SetPrecision[{s0}, prec $MachinePrecision];
(-4 Pi /(s + 1)) NIntegrate[Log[1/2 + I z]^(s + 1)/(Exp[-Pi z] + Exp[Pi z])^2,
{z, 0, Infinity}, WorkingPrecision -> prec $MachinePrecision ]];
Table[gamma[n, 2], {n, 0, 5}]
Table[Re[gamma[n, 2]], {n, 0, 5}] // MatrixForm
Table[StieltjesGamma[k], {k, 0, 5}] // N // SeqGrid
Bernoulli constants, defined via integral
HoldForm[2 Pi Integrate[Log[1/2 + I z]^s / (Exp[-Pi z] + Exp[Pi z])^2,
{z, -Infinity, Infinity}]] // TeXForm
beta[s0_, prec_] := (* parameter 'prec' for setting the precision *)
Module[{s, z}, {s} = SetPrecision[{s0}, prec $MachinePrecision];
4 Pi NIntegrate[Log[1/2 + I z]^s / (Exp[-Pi z] + Exp[Pi z])^2,
{z, 0, Infinity}, WorkingPrecision -> prec $MachinePrecision ]];
Table[beta[n, 2], {n, 0, 5}] // MatrixForm
Table[Re[beta[n, 2]], {n, 0, 5}] // MatrixForm // TeXForm
Memoization of the real part of the Bernoulli constants with single precision. (For quick checking and plotting, for higher precision use the two parameter form.)
beta[n_] := beta[n] = Re[beta[n, 1]];
Plot[beta[s], {s, -0.6, 4}, WorkingPrecision -> 30,
Epilog -> {PointSize[0.01], Red, Point[Table[{k, beta[k]}, {k, 0, 4}]]},
PlotLegends -> Placed["Bernoulli constants", {Scaled[{0.9, 0.9}], {0.9, 0.9}}]]
(* Export["Fig2BernoulliConstants.eps", %] *)
Bernoulli function, definition.
Bbeta[s_] := Sum[beta[j] s^j / j!, {j, 0, 50}];
Table[Bbeta[n], {n, 0, 10, 2}] // N // SeqGrid2
Table[BernoulliB[n, 1], {n, 0, 10, 2}] // N // SeqGrid2
Bernoulli function using the Riemann zeta representation.
Limit[-n Zeta[1 - n], n -> 0]
B[s_] := -s Zeta[1 - s];
B[0] := 1;
Clear[s]; B[s] // FullSimplify // TeXForm
1
From now onwards we use Mathematica's efficient implementation of the Zeta function for the Bernoulli function.
Plot[B[s], {s, 0, 12}, PlotRange -> {-1/3, 1},
Epilog -> {PointSize[0.01], Red, Point[Table[{k,BernoulliB[k,1]}, {k, 0, 12}]]}]
Bernoulli function on the critical line and the zeta zeros which are the same as the Bernoulli zeros.
ReImPlot[B[1/2 + I t], {t, 20, 52},
Epilog -> {PointSize[0.01], Red, Point[Table[{Im[ZetaZero[k]], 0}, {k, 11}]]}]
(* Export["Fig10BernoullisZetaZeros.eps", %] *)
Table[Im[ZetaZero[n]], {n, 1, 11}] // N // SeqGrid1
Bernoulli function rises up at Riemann's critical line.
ComplexPlot3D[B[s], {s, -60 - 40 I, 1/2 + 40 I},
WorkingPrecision -> 40,
AxesLabel -> {"Re(s)", "Im(s)"},
ImageSize -> Large,
ViewPoint -> {2.6, -0.9, 0.6} ]
(* Export["Fig27BernoulliTsunami.pdf", %] *)
ComplexStreamPlot[B[s], {s, 0 - 8 I, 16 + 8 I}]
(* Export["Fig11BernoulliPhasePortrait.eps", %] *)
ComplexPlot3D [B[s], {s, 0 - 8 I, 16 + 8 I},
ColorFunction -> "CyclicArg", ViewProjection -> "Perspective"]
ComplexPlot[B[s], {s, 0 - 8 I, 16 + 8 I}, ColorFunction -> "CyclicLogAbs"]
Table[B[n], {n, 0, 12}] // SeqGrid
Series[-s Zeta[1 - s], {s, 0, 4}] // TeXForm
% // Normal // N // Simplify // TeXForm
Bernoulli function Taylor expansion based on the Bernoulli constants.
Series[N[Bbeta[z]], {z, 0, 4}] // TeXForm
Alternative formula for the Bernoulli constants.
beta2[s0_, prec_] := (* parameter 'prec' for setting the precision *)
Module[{s, z}, {s} = SetPrecision[{s0}, prec $MachinePrecision];
Pi NIntegrate[Re[Log[1/2 + I z]^s Sech[Pi z]^2],
{z, 0, Infinity}, WorkingPrecision -> prec $MachinePrecision ]];
Table[beta2[n, 2], {n, 0, 5}] // MatrixForm // TeXForm
sigma[n_, z_] := Re[Log[1/2 + I z]^n];
ComplexExpand[sigma[n, z]] // FullSimplify // TeXForm
a[z_] := Log[z^2 + 1/4] / 2;
b[z_] := ArcTan[2 z];
sigmasum[n_, z_] := Sum[(-1)^k Binomial[n, 2 k] a[z]^(n - 2 k) b[z]^(2 k),
{k, 0, Floor[n / 2]}]
Table[sigmasum[n, z], {n, 0, 4}] // TableForm // TeXForm
beta2[n_] := Pi NIntegrate[sigma[n, z] / Cosh[Pi z]^2, {z, 0, 10}];
beta3[n_] := Pi NIntegrate[sigmasum[n, z] / Cosh[Pi z]^2, {z, 0, 10}];
Table[beta[n], {n, 0, 5}] // N // Chop
Table[beta2[n], {n, 0, 5}] // N // Chop
Table[beta3[n], {n, 0, 5}] // N // Chop
{1., -0.577216, 0.145632, 0.0290711, -0.00821534, -0.0116269}
{1., -0.577216, 0.145632, 0.0290711, -0.00821534, -0.0116269}
{1., -0.577216, 0.145632, 0.0290711, -0.00821534, -0.0116269}
gamma2[n_] := -(Pi / (n + 1)) NIntegrate[Re[sigma[n + 1, z] / Cosh[Pi z]^2],
{z, 0, 10}];
Table[gamma2[n], {n, 0, 5}] // N
Table[StieltjesGamma[n], {n, 0, 5}] // N
{0.577216, -0.0728158, -0.00969036, 0.00205383, 0.00232537, 0.000793324}
{0.577216, -0.0728158, -0.00969036, 0.00205383, 0.00232537, 0.000793324}
Euler's gamma.
eulergamma = -(Pi/2) NIntegrate[Log[z^2 + 1/4] / Cosh[Pi z]^2, {z, 0, Infinity}]
0.577216
Some Bernoulli constants.
With[{a = Log[z^2 + 1/4] / 2, b = ArcTan[2 z], c = Cosh[Pi z]}, {
Pi * NIntegrate[a / c^2, {z, 0, Infinity}],
Pi * NIntegrate[(a^2 - b^2) / c^2, {z, 0, Infinity}],
Pi * NIntegrate[(a^3 - 3 a b^2) / c^2, {z, 0, Infinity}],
Pi * NIntegrate[(a^4 - 6 a^2 b^2 + b^4) / c^2, {z, 0, Infinity}],
Pi * NIntegrate[(a^5 - 10 a^3 b^2 + 5 a b^4) / c^2, {z, 0, Infinity}]}]
{-0.577216, 0.145632, 0.0290711, -0.00821534, -0.0116269}
Laurent expansion of the Hurwitz zeta function.
Series[HurwitzZeta[s, v] - 1/(s - 1), {s, 1, 4}] // TeXForm
Generalized Stieltjes constants, integral representation.
IntGamma[n_, v_] := -(Pi / (2 (n + 1))) *
NIntegrate[Log[v - 1/2 + I z]^(n + 1) / Cosh[Pi z]^2,
{z, -Infinity, Infinity}, WorkingPrecision -> 30];
Table[{Chop[IntGamma[s, 1]], N[StieltjesGamma[s], 30]}, {s, 0, 4}] // TableForm
Generalized Bernoulli constants, definition via integral.
IntBeta[s_, v_] := 2 Pi *
NIntegrate[Log[v - 1/2 + I z]^s / (Exp[Pi z] + Exp[-Pi z])^2,
{z, -Infinity, Infinity}, WorkingPrecision -> 30];
Table[{Chop[IntBeta[s+1, 1]], N[-(s + 1) StieltjesGamma[s], 30]}, {s, 0, 4}] // TableForm
Generalized Bernoulli constants, definition via Stieltjes constants.
BernBeta[s_, v_] := -s StieltjesGamma[s - 1, v];
BernBeta[0, _] := 1;
Table[BernBeta[s, 1], {s, 0, 4}] // N
{1., -0.577216, 0.145632, 0.0290711, -0.00821534}
IntBeta[Pi, 1]
-0.0288694485250208576507944887079
Mathematica can't do this!
(* BernBeta[Pi, 1] *)
Generalized Bernoulli function. (Closing definition gap with limiting value.)
Limit[-s HurwitzZeta[1 - s, v], s -> 0]
Bg[s_, v_] := If[s == 0, 1, -s*HurwitzZeta[1 - s, v]];
Clear[s, v]; Bg[s, v] // FullSimplify // TeXForm
1
atext := MaTeX["B(s, 1/4)"];
btext := MaTeX["B(s, 1/2)"];
ctext := MaTeX["B(s, 3/4)"];
Plot[{Bg[s, 1/4], Bg[s, 1/2], Bg[s, 3/4]}, {s, 1, 9}, Filling -> {1 -> {2}},
PlotTheme -> {"Thin"}, WorkingPrecision -> 40, ImageSize -> Large,
PlotLegends -> Placed[{atext, btext, ctext}, Above],
PlotLabel -> "Generalized Bernoulli function" ]
(* Export["FigXXGeneralizedBernoulliFunction.eps", %] *)
Bernoulli polynomials, explicit formula
Bpoly[n_, x_] := Sum[(-1)^j Binomial[n, j] B[j] x^(n-j), {j, 0, n}];
Clear[n, x]; Bpoly[n, x] // FullSimplify // TeXForm
{Table[Expand[Bpoly[n, x]], {n, 0, 5}] // MatrixForm ,
Table[BernoulliB[n, x], {n, 0, 5}] // MatrixForm }
V := Table[FunctionExpand[Bg[n, x]], {n, 1, 6}];
W := Table[BernoulliB[n, x], {n, 1, 6}];
Grid[{V, W}, Frame -> All]
Plot[V, {x, -1/2, 3/2}, PlotRange -> {-0.2, 0.2}]
The Jensen integral of the Bernoulli function.
HoldForm[2 Pi Integrate[(1/2 + I z)^s / (Exp[-Pi z] + Exp[Pi z])^2,
{z, -Infinity, Infinity}]] // TeXForm
Making the integrand real.
f[v_, s_, z_] := (v - 1/2 + I z)^s / (Exp[-Pi z] + Exp[Pi z])^2;
Clear[v, s, z]; f[v, s, z] // FullSimplify // TeXForm
ComplexExpand[f[v, s, z]] // FullSimplify // TeXForm
ComplexExpand[Re[f[v, s, z]]] // FullSimplify // TeXForm
The real Bernoulli function, via Jensen integral.
JFR[s0_, z0_, prec_] := Module[{s, z},
{s, z} = SetPrecision[{s0, z0}, prec $MachinePrecision];
Block[{$MinPrecision = prec $MachinePrecision,
$MaxPrecision = prec $MachinePrecision},
(z^2 + 1/4)^(s/2) Cos[s Arg[I z + 1/2]] Sech[Pi z]^2 ]];
JRIntegral[s0_, prec_] := Module[{s},
{s} = SetPrecision[{s0}, prec $MachinePrecision];
Pi NIntegrate[JFR[s, z, prec], {z, 0, Infinity},
WorkingPrecision -> prec $MachinePrecision ]];
JRIntegral[2.5, 4]
Precision[%]
0.06371300472458258987385746727676186367256246150243249208661374587
63.8184
An arbitrary precision version of the Bernoulli function via zeta function.
BN[s0_, prec_] := Module[{s},{s} = SetPrecision[{s0}, prec $MachinePrecision];
Block[{$MinPrecision = prec $MachinePrecision,
$MaxPrecision = prec $MachinePrecision},
-s Zeta[1 - s] ]];
BN[2.5, 4]
Precision[%]
0.06371300472458258987385746727676186367256246150243249208661374587
63.8184
Test cases, even indexed Bernoulli numbers, Jensen integral versus zeta version
Table[{JRIntegral[n, 2], N[BernoulliB[n], 32]}, {n, 0, 8, 2}]
{{1.0000000000000000000000000000000, 1.0000000000000000000000000000000}, > {0.16666666666666666666666666666667, 0.16666666666666666666666666666667}, > {-0.033333333333333333333333333333333, -0.033333333333333333333333333333333}, > {0.023809523809523809523809523809524, 0.023809523809523809523809523809524}, > {-0.033333333333333333333333333333333, -0.033333333333333333333333333333333}}
Table[{JRIntegral[n + 1/2, 2], BN[n + 1/2, 2]}, {n, 1, 8, 2}]
{{0.31182933746603184902596008809557, 0.31182933746603184902596008809557}, > {-0.029809250722476156898254984599206, -0.029809250722476156898254984599206}, > {0.017004180859687086146533412098215, 0.017004180859687086146533412098215}, > {-0.020600759546526515688172706141941, -0.020600759546526515688172706141941}}
The generalized complex Bernoulli function.
JFC[s0_, z0_, prec_] := Module[{s, z},
{s, z} = SetPrecision[{s0, z0}, prec $MachinePrecision];
Block[{$MinPrecision = prec $MachinePrecision,
$MaxPrecision = prec $MachinePrecision},
(1/2 + I z)^s / (Exp[-Pi z] + Exp[Pi z])^2 ]];
JCIntegral[s0_, prec_] := Module[{s},
{s} = SetPrecision[{s0}, prec $MachinePrecision];
4 Pi NIntegrate[JFC[s, z, prec], {z, 0, Infinity},
WorkingPrecision -> prec $MachinePrecision ]];
JCIntegral[2.5, 2]
Precision[%]
Do you know the imaginary part of the Bernoulli numbers?
Table[JCIntegral[n, 2], {n, 0, 8, 2}] // MatrixForm
Can you identify more values?
Table[Im[JCIntegral[n, 2]], {n, 0, 8, 2}] // MatrixForm // TeXForm
{ 0, Log[2]/Pi, 1/42 } // N
{0., 0.220636, 0.0238095}
ReImPlot[JCIntegral[x, 1], {x, -1, 8}, PlotRange -> {-0.4, 1}]
The Hurwitz–Bernoulli function.
PL[s_, v_] := (-s! / (2 Pi)^s) PolyLog[s, Exp[2 Pi I v]];
HB[s_, v_] := Exp[-I Pi s / 2] PL[s, v] + Exp[I Pi s / 2] PL[s, 1 - v];
Clear[s, v]; HB[s, v] // FullSimplify // TeXForm
The Hurwitz–Bernoulli function represents the Bernoulli function for 0 ≤ v ≤ 1 and s > 1.
Plot[{Bg[s, 3/4], HB[s, 3/4]}, {s, 1, 4},
PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.7}], {0.9, 0.7}}]]
The Hurwitz–Bernoulli functions with s = 2 + k/6 for 0 ≤ k ≤ 6 deform $B_2(x)$ into $B_3(x)$.
deform := Table[HB[2 + k/6, x], {k, 0, 6}];
Plot[deform, {x, 0, 1}]
(* Export["Fig4HurwitzBernoulliFunction.eps", %] *)
The case v = 1 in the Hurwitz–Bernoulli function.
B1[s_] := -2 s! PolyLog[s, 1] Cos[s Pi/2] / (2 Pi)^s;
{Limit[B1[n], n->0], Limit[B1[n], n->1], Table[B1[n], {n, 2, 12}]} // TeXForm
Representation of the Bernoulli function by the PolyLog.
Plot[{B[s], B1[s]}, {s, 1, 4},
PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.7}], {0.9, 0.7}}]]
The case v = 1/2 in the Hurwitz–Bernoulli function: representation of the central Bernoulli function by the PolyLog.
Bch[s_] := -2 s! PolyLog[s, -1] Cos[s Pi/2] / (2 Pi)^s;
Table[Bch[n], {n, 0, 12}] // TeXForm
Series[Bch[s], {s, 0, 6}] // Normal // N // TeXForm
The central Bernoulli function, used as definition.
Bc[s_] := Bg[s, 1/2];
Clear[s]; Bc[s] // TeXForm
Series[Bc[s], {s, 0, 6}] // Normal // N // TeXForm
Table[Bc[n], {n, 0, 12, 2}] // TeXForm
Plot[{B[s], Bc[s]}, {s, 0, 11}, PlotRange -> {-0.1, 1}, WorkingPrecision -> 40,
PlotTheme -> {"Thin"}, Filling -> {1 -> {2}},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.7}], {0.9, 0.7}}]]
(* Export["Fig5CenteredBernoulliFunction.eps", %] *)
The central Bernoulli function, via Bernoulli function.
BcB[s_] := B[s] (2^(1 - s) - 1);
Table[BcB[n], {n, 0, 12, 2}] // TeXForm
Series[BcB[s], {s, 0, 6}] // Normal // N // TeXForm
Jensen integral of the central Bernoulli function for even integer n.
f[n_, z_] := ((I z)^n / (Exp[-Pi z] + Exp[Pi z]))^2;
Clear[n, z]; f[n, z] // FullSimplify // TeXForm
JInt[n_] := 2 Pi NIntegrate[f[n, z], {z, -Infinity, Infinity},
WorkingPrecision -> 30]
Table[JInt[n], {n, 0, 6}] // MatrixForm // TeXForm
Computation of the even indexed Bernoulli numbers via the integral representation of the centered Bernoulli function.
NBInt[n_] := Pi ((-4)^(n + 1) / (4^n - 2)) NIntegrate[
(z^n / (Exp[-Pi z] + Exp[Pi z]))^2, {z, 0, Infinity},
Method -> {"GlobalAdaptive", Method -> "GaussKronrodRule"},
MaxRecursion -> 100, WorkingPrecision -> 30]
{Table[NBInt[n], {n, 0, 6}] // MatrixForm,
Table[BernoulliB[2 n, 1], {n, 0, 6}] // N // MatrixForm } // TeXForm
n = 500;
N[BernoulliB[2 n], 30]
NBInt[n]
1769 -5.31870446941552203648291374377 10
1769 -5.31870446941552203648291374377 10
The secant decomposition of B(s) and the cosecant numbers A001896.
CosecInt[n_] := 2 Pi (-1)^n NIntegrate[
(z^n / (Exp[-Pi z] + Exp[Pi z]))^2, {z, -Infinity, Infinity},
Method -> {"GlobalAdaptive", Method -> "GaussKronrodRule"},
MaxRecursion -> 100, WorkingPrecision -> 30]
Table[Rationalize[CosecInt[n]], {n, 0, 8}] // TeXForm
BInt[s_] := Pi (Cos[Pi s / 2] / (2^(1 - s) - 1)) NIntegrate[
z^s Sech[Pi z]^2, {z, 0, Infinity},
Method -> {"GlobalAdaptive", Method -> "GaussKronrodRule"},
WorkingPrecision -> 30, MaxRecursion -> 100]
Table[{Chop[N[B[n + 1/3], 25]], BInt[n + 1/3]}, {n, 2, 12}] // TeXForm
atext := MaTeX["\\pi \\cos(\\pi s/2)/(2^{1 - s} - 1)"];
btext := MaTeX@HoldForm[Integrate[z^s Sech[Pi z]^2, {z, 0, Infinity}]]
atext
btext
Bosc[s_] := Pi (Cos[Pi s / 2] / (2^(1 - s) - 1)) ;
Plot[{Bosc[s], B[s] / Bosc[s]}, {s, -1, 17}, PlotRange -> {-4, 8},
PlotLegends -> Placed[{atext, btext}, Above]]
(* Export["Fig35SecantDecomposition.eps", %] *)
Central Bernoulli numbers.
BcNum[n_] := 2^n Bg[n, 1/2];
Table[BcNum[n], {n, 0, 12}] // TeXForm
BcLi[n_] := 2*(-1)^(n+1)*Pi^(-2*n)*(2*n)!*PolyLog[2*n, -1];
Table[BcLi[n], {n, 0, 8}] // TeXForm
Clausen[0] = 1;
Clausen[n_] := Times @@ (Select[Divisors[n+1], PrimeQ[# + 1] &] + 1);
Table[Clausen[n], {n, 0, 11}]
{1, 6, 2, 30, 2, 42, 2, 30, 2, 66, 2, 2730}
BcL[n_] := (2*n)!*PolyLog[2*n, 1]*Pi^(-2*n)*Clausen[2*n - 1] / 2;
Table[BcL[n], {n, 1, 18}]
{1, 4, 16, 64, 1280, 707584, 28672, 59260928, 2874867712, 45773225984, 896021823488, > 991382852337664, 143497256501248, 1593799350268461056, 2312797281748024033280, > 8277820436597920759808, 11071085050982544965632, 452092922822895257024443973632}
Table[Bg[n, 2], {n, 1, 18}]
BcLi[n_] := n!*PolyLog[n, 1]*Pi^(-n);
Table[BcLi[n], {n, 1, 8}] // TeXForm
Central Bernoulli polynomials.
Bcpoly[n_, x_] := Sum[Binomial[n, k] BcNum[k] x^(n - k), {k, 0, n}];
(* Clear[n, x]; Bc[n, x] // FullSimplify // TeXForm *)
Table[Bcpoly[n, x], {n, 0, 6}] // MatrixForm
Table[Bcpoly[n, -1], {n, 0, 12}]
Table[Bcpoly[n, 1], {n, 0, 12}]
Table[Bcpoly[n, 0], {n, 0, 12}]
NormBcpoly := Table[Expand[FullSimplify[Bcpoly[n, x] / n!]], {n, 0, 7}]
Plot[NormBcpoly, {x, -2.5, 2.5}, PlotRange -> {-0.2, 0.2}]
Going halves.
s[n_] := Sum[Binomial[n, k] 2^k Bg[k, 1/2], {k, 0, n}];
Table[s[n], {n, 0, 12}] // TeXForm
Table[2^n BernoulliB[n, 1], {n, 0, 12}] // TeXForm
This is a completely natural result. However note how absurd in contrast the following is for n = 1!
Table[2^n BernoulliB[n], {n, 0, 12}] // TeXForm
The Genocchi function, by definition.
G[s_] := 2^s (Bg[s, 1/2] - Bg[s, 1]);
Clear[s, v]; G[s] // FullSimplify // TeXForm
The Genocchi function as the difference between the Bernoulli function and the Bernoulli central function.
Gbc[s_] := 2^s (Bc[s] - B[s]);
Clear[s, v]; Gbc[s] // FullSimplify // TeXForm
Table[G[n], {n, 0, 14}]
{0, -1, -1, 0, 1, 0, -3, 0, 17, 0, -155, 0, 2073, 0, -38227}
Plot[G[s], {s, -1, 7},
Epilog -> {PointSize[0.01], Red, Point[Table[{k,G[k]}, {k, 0, 7}]]}]
Genocchi function represented via Bernoulli function.
Gb[s_] := 2 (1 - 2^s) B[s];
Clear[s]; Gb[s] // FullSimplify // TeXForm
(* Plot[Gb[s], {s, -1, 7}] *)
Generalized Genocchi function.
Gg[s_, x_] := 2^s (Bg[s, x/2] - Bg[s, (x + 1)/2]);
Clear[s, x]; Expand[Gg[s, x]] // FullSimplify // TeXForm
Limit[2^s (Bg[s, x/2] - Bg[s, (x + 1)/2]), x -> 1] // TeXForm
A226158
Table[Gg[n, 1], {n, 0, 12}]
{0, -1, -1, 0, 1, 0, -3, 0, 17, 0, -155, 0, 2073}
The Genocchi polynomials.
V := Table[Expand[Simplify[FunctionExpand[
2^n (BernoulliB[n, x/2] - BernoulliB[n, (x + 1)/2])]]], {n, 0, 6}];
MatrixForm[V]
Clear[x];
V := Table[Expand[FullSimplify[Gg[n, x]]], {n, 0, 6}]
W := Table[Expand[FullSimplify[Gg[n, x]]], {n, 0, 6}]
U := CoefficientList[W, x]
Grid[{V, W, U}, Frame -> All]
The Genocchi polynomials as difference between the Bernoulli polynomials and the central polynomials.
V := Table[Expand[Simplify[FunctionExpand[
2 (BernoulliB[n, x] - Bcpoly[n, x])]]], {n, 0, 6}];
MatrixForm[V]
w[n_, x_] := Poly[2^n (Bg[n, x/2] - Bg[n, (x + 1)/2])];
W := Table[w[n, x], {n, 0, 6}]
u[n_, x_] := Poly[Gg[n, x]];
U := Table[u[n, x], {n, 0, 6}]
Grid[{V, W, U}, Frame -> All]
Table[Expand[FullSimplify[Gg[n, 1]]], {n, 0, 14}]
{0, -1, -1, 0, 1, 0, -3, 0, 17, 0, -155, 0, 2073, 0, -38227}
Table[Expand[FullSimplify[Gg[n, x] / n!]], {n, 3, 7}]
Plot[%, {x, 0, 1}]
The alternating Riemann zeta function.
atext := MaTeX["\\zeta_{\\text{alt}}(s)"];
btext := MaTeX["\\zeta(s)"];
ζalt[s_] := Zeta[s] (1 - 2^(1 - s));
Plot[{ζalt[s], Zeta[s]}, {s, -8, 12}, PlotRange -> {-3/2, 2}, WorkingPrecision -> 50,
Filling -> {1 -> {2}}, PlotTheme -> {"Thin"},
PlotLegends -> Placed[{atext, btext}, {0.85, 0.15}]]
(* Export["Fig25AlternatingZeta.eps", %] *)
The alternating Bernoulli function, definition.
Balt[s_] := -s ζalt[1 - s];
Balt[0] := 0;
Clear[s]; Balt[s] // FullSimplify // TeXForm
atext := MaTeX["B_{\\text{alt}}(s)"];
btext := MaTeX["B(s)"];
Plot[{Balt[s], B[s]}, {s, -7, 7}, PlotTheme -> {"Thin"},
WorkingPrecision -> 50, Filling -> {1 -> {2}},
PlotLegends -> Placed[{atext, btext}, {0.85, 0.7}] ]
(* Export["Fig26AlternatingBernoulli.eps", %] *)
Table[Numerator[Balt[n]], {n, 0, 12}]
Table[Denominator[Balt[n]], {n, 0, 12}]
{0, -1, -1, 0, 1, 0, -3, 0, 17, 0, -155, 0, 2073}
{1, 2, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2}
Series[Balt[s], {s, 0, 4}] // TeXForm
% // N // Chop
Table[(B[n] - Balt[n]) / 2^n, {n, 0, 12}] // TeXForm
The alternating Hurwitz zeta function via Hurwitz zeta.
Limit[2^(-s) (HurwitzZeta[s, x/2] - HurwitzZeta[s, (x + 1)/2]),
s -> 1] // TeXForm
Hζalt[s_, x_] := 2^(-s) (HurwitzZeta[s, x/2] - HurwitzZeta[s, (x + 1)/2]);
Hζalt[1, x_] := (PolyGamma[0, (1 + x)/2] - PolyGamma[0, x/2]) / 2;
Clear[s, x]; Hζalt[s, x] // FullSimplify // TeXForm
Table[Hζalt[n, 1], {n, 0, 7}] // N
{0.5, 0.693147, 0.822467, 0.901543, 0.947033, 0.97212, 0.985551, 0.992594}
Plot[{ζalt[s], Hζalt[s, 1]}, {s, -2, 7}, PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.3}], {0.9, 0.3}}]]
The alternating Bernoulli polynomials, definition. A333303, A110501, A001469
BHalt[s_, v_] := -s Hζalt[1 - s, v];
Clear[s, v]; BHalt[s, v] // FullSimplify // TeXForm
Clear[x];
Table[Expand[FullSimplify[BHalt[n, x]]], {n, 0, 6}] // MatrixForm
The alternating Bernoulli function via the Bernoulli function.
BBalt[s_] := B[s] (1 - 2^s);
Clear[s]; BBalt[s] // FullSimplify // TeXForm
The alternating Bernoulli numbers.
Table[Balt[n], {n, 0, 12}]
% // Numerator (* A036968 *)
%% // Denominator
The alternating centered Bernoulli numbers. A346464 and A346463
Bcalt1[s_] := Bc[s] (1 - 2^s) 2^s;
Bcalt2[s_] := Cos[Pi s / 2] B[s] (2^(1 - s) - 1)(2^s - 1) 2^s;
Limit[Bcalt1[s], s -> 0]
Clear[s]; Bcalt1[s] // FullSimplify // TeXForm
Clear[s]; Bcalt2[s] // FullSimplify // TeXForm
0
Table[Bcalt1[n], {n, 0, 16, 2}]
Table[Bcalt2[n], {n, 0, 16, 2}]
{0, 1, -7, 93, -2159, 79205, -4243431, 313117357, -30459187423}
{0, 1, 7, 93, 2159, 79205, 4243431, 313117357, 30459187423}
Table[6 QBinomial[2 n, 2, 2] Bg[2 n, 1], {n, 0, 8}]
{0, 1, -7, 93, -2159, 79205, -4243431, 313117357, -30459187423}
a(n) = (4^n - 2)*(4^n - 1) / Clausen(2*n - 1). A346463.
Clausen[n_] := Times @@ (Select[Divisors[n + 1], PrimeQ[# + 1] &] + 1);
Table[((4^n - 2)*(4^n - 1)) / Clausen[2 n - 1], {n, 1, 8}]
{1, 7, 93, 2159, 15841, 6141, 44731051, 8421119}
Table[6 QBinomial[2 n, 2, 2] / Denominator[B[2 n]], {n, 1, 8}]
{1, 7, 93, 2159, 15841, 6141, 44731051, 8421119}
Derivatives of the Bernoulli function.
dB[n_, x_] := If[x == 0, Limit[Derivative[n][B][s], s -> 0],
Derivative[n][B][s] /. s -> x];
Clear[s, x, n]; dB[n, s] // FullSimplify // TeXForm
Table[Print[n, " -> ", FullSimplify[dB[n, s]]], {n, 0, 4}] ;
0 -> Piecewise[{{1, s == 0}}, -(s Zeta[1 - s])] 1 -> If[s == 0, Limit[B'[s], s -> 0], B'[s] /. s -> s] 2 -> If[s == 0, Limit[B''[s], s -> 0], B''[s] /. s -> s] (3) (3) 3 -> If[s == 0, Limit[B [s], s -> 0], B [s] /. s -> s] (4) (4) 4 -> If[s == 0, Limit[B [s], s -> 0], B [s] /. s -> s]
dBz[n_, x_] := If[x == 0, Limit[Derivative[n][B][s], s -> 0],
((-1)^n (n Derivative[n - 1][Zeta][1-s]
- s Derivative[n][Zeta][1-s])) /. s -> x];
Clear[s, x, n]; dBz[n, s] // FullSimplify // TeXForm
Table[Print[n, " -> ", FullSimplify[dBz[n, s]]], {n, 0, 4}] ;
0 -> If[s == 0, 1, -(s Zeta[1 - s])] 1 -> If[s == 0, -EulerGamma, -Zeta[1 - s] + s Zeta'[1 - s]] 2 -> If[s == 0, -2 StieltjesGamma[1], 2 Zeta'[1 - s] - s Zeta''[1 - s]] (3) 3 -> If[s == 0, -3 StieltjesGamma[2], -3 Zeta''[1 - s] + s Zeta [1 - s]] (3) (4) 4 -> If[s == 0, -4 StieltjesGamma[3], 4 Zeta [1 - s] - s Zeta [1 - s]]
Plot[{dB[1, x], dBz[1, x], dB[2, x], dBz[2, x]}, {x, 0, 6}]
Plot[{-s Zeta[1 - s],
-Zeta[1 - s] + s Zeta'[1 - s],
2 Zeta'[1 - s] - s Zeta''[1 - s],
-3 Zeta''[1 - s] + s Zeta'''[1 - s]},
{s, 0, 12}, PlotLegends -> "Expressions"]
(* Export["Fig6BernoulliDerivatives.eps", %] *)
Bernoulli constants as values of a derivative.
Table[dB[n, 0], {n, 0, 6}] // TeXForm
% // N
Table[dBz[n, 0], {n, 0, 6}] // TeXForm
% // N
Table[beta[n], {n, 0, 4}] // Chop
{1.000000000068801, -0.5772156649015378, 0.1456316909673506, 0.02907108957862079, > -0.008215337681139509}
dBz[1, 0] == -EulerGamma // TeXForm
Table[Expand[(n-1)! D[BernoulliB[n, x], x]] /. x -> 1, {n, 1, 16}]
{1, 1, 1, 0, -4, 0, 120, 0, -12096, 0, 3024000, 0, -1576143360, 0, 1525620096000, 0}
For odd integer $n = 3, 5, 7, \ldots $ the value of $\mathcal{L}\!\operatorname{B}(n) $ is undefined.
LdB[s_] := B'[s] / B[s];
LdB[0] := -EulerGamma;
LdG[s_] := Gamma'[s] / Gamma[s];
LdZ[s_] := Zeta'[s] / Zeta[s];
Compare the logarithmic derivative of the Bernoulli function at the even integers with the logarithm of x/π.
Show[Plot[Log[x / Pi], {x, 8, 120}, PlotStyle -> Red],
DiscretePlot[LdB[2 n], {n, 8, 120}, WorkingPrecision -> 70]]
The logarithmic derivative of the Bernoulli function.
LdBz[s_] := 1/s - LdZ[1 - s];
LdBz[0] := -EulerGamma;
Clear[s]; LdBz[s] // FullSimplify // TeXForm
Table[{LdBz[s], N[LdBz[s]]}, {s, 0, 9, 2}] // TableForm
Plot[{1/s - LdZ[1 - s], LdB[s]}, {s, -1/2, 7},
WorkingPrecision -> 20, PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.21, 0.89}], {0.21, 0.89}}]]
Representation of LdB by LdGamma and LdZeta.
ρ[s_] := (1/s) - (Pi/2) Tan[s Pi/2] - Log[2 Pi];
ρ[s] // TeXForm
lhs[s_] := LdG[s] + LdZ[s] + ρ[s];
Clear[s]; lhs[s] // FullSimplify // TeXForm
Plot[{LdZ[s] + LdG[s], LdB[s] - ρ[s]}, {s, -1, 4},
WorkingPrecision -> 20, PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.9}], {0.9, 0.9}}]]
The coefficients in the series expansion of the logarithmic derivative of the Bernoulli function. The logarithmic polynomials generated by the Bernoulli constants.
K := 3
Series[LdBz[s], {s, 0, K}]
% /. Table[StieltjesGamma[n] -> -Subscript[β, n+1]/(n+1), {n, 1, K}]
% /. EulerGamma -> -Subscript[β, 1]
CoefficientList[Normal[%], s] Range[0, K]!
% // Expand // TableForm
Clear[beta, s];
S := Sum[beta[n] s^n / n!, {n, 0, 10}];
beta[0] := 1;
L := Normal[Series[Log[S], {s, 0, 4}]];
Tc := Table[n! Coefficient[L, s, n] , {n, 1, 4}];
Tc // Expand // TableForm // TeXForm
Worpitzky numbers and Fubini polynomials, A163626, A278075.
w[n_, k_] := (-1)^k k! StirlingS2[n + 1, k + 1];
Table[w[n, k], {n, 0, 5}, {k, 0, n}] // MatrixForm
FubiniPoly[n_] := Sum[(-1)^(n-k) StirlingS2[n, k] k! x^k, {k, 0, n}]
Table[FubiniPoly[n], {n, 0, 7}] // MatrixForm
Table[Integrate[FubiniPoly[n], {x, 0, 1}], {n, 0, 12}]
F0 := FubiniPoly[0]; F1 := FubiniPoly[1]; F2 := FubiniPoly[2];
F3 := FubiniPoly[3]; F4 := FubiniPoly[4]; F5 := FubiniPoly[5];
Plot[{F0,F1,F2,F3,F4,F5}, {x, 0, 1}, PlotLegends -> "Expressions",
PlotRange -> {-0.8, 1}]
(* Export["Fig30FubiniPolynomials.eps", %] *)
WorpitzkyPoly[n_] := Sum[w[n, k] x^k, {k, 0, n}]
Table[WorpitzkyPoly[n], {n, 0, 7}] // MatrixForm
Table[Integrate[WorpitzkyPoly[n], {x, 0, 1}], {n, 0, 12}]
WorpitzkyPoly2[n_] := Expand[FubiniPoly[n] /. x -> 1-x]
Table[WorpitzkyPoly2[n], {n, 0, 7}] // MatrixForm
Worpitzky transform.
Wt[n_, a_] := Sum[w[n, k] a[k], {k, 0, n}]
a[n_] := 1 / (n + 1);
Table[Wt[n, a], {n, 0, 12}] // TeXForm (* Bernoulli numbers *)
Generalized Worpitzky transform.
Clear[a]
Wtg[m_, a_] := Sum[(-1)^n Binomial[m, n] Wt[n, a] x^(m - n), {n, 0, m}];
Clear[m, a]; Wtg[m, a] // FullSimplify // TeXForm
Table[Poly[Wtg[n, a]], {n, 0, 4}] // MatrixForm // TeXForm
a[n_] := 1 / (n + 1);
Table[Wtg[n, a] /. x -> 1, {n, 0, 12}] // TeXForm
Table[Wtg[n, HarmonicNumber], {n, 6}] // TeXForm
Generalized Worpitzky transform, alternative form.
Wtga[m_, a_] := Sum[a[n] Sum[(-1)^k Binomial[n, k] (x - k -1)^m,
{k, 0, n}], {n, 0, m}];
Clear[m, a]; Wtga[m, a] // FullSimplify // TeXForm
Table[Poly[Wtga[n, a]], {n, 0, 4}] // TableForm // TeXForm
Bernoulli polynomials and Bernoulli numbers from the generalized Worpitzky transform.
Bw[m_] := Sum[(n + 1)^(-1) Sum[(-1)^(m - k) Binomial[n, k] k^m,
{k, 0, n}], {n, 0, m}];
Table[Poly[Bw[n]], {n, 0, 12}] // TeXForm
a[n_] := 1 / (n + 1);
{Table[Poly[Wtga[n, a]], {n, 0, 5}] // MatrixForm ,
Table[BernoulliB[n, x], {n, 0, 5}] // MatrixForm }
Examples: a(n) = n + 1 and a(n) = H(n + 1).
a[n_] := n + 1;
Table[Poly[Wtga[n, a]], {n, 0, 5}] // MatrixForm
a[n_] := HarmonicNumber[n + 1];
{Table[Poly[Wtga[n, a]], {n, 0, 6}] // TableForm,
Table[Poly[BernoulliB[n,x]], {n, 0, 6}] // TableForm }
Hasse's formula.
Bh[s_, v_] := Sum[(n + 1)^(-1) Sum[(-1)^k Binomial[n, k] (k + v)^s,
{k, 0, n}], {n, 0, Infinity}];
Clear[s, v, n]; Bh[s, v] // FullSimplify // TeXForm
BhNum[s_, v_] := Sum[(n + 1)^(-1) Sum[(-1)^k Binomial[n, k] (k + v)^s,
{k, 0, n}], {n, 0, Ceiling[s]}];
Table[BhNum[s, 1], {s, 0, 12}] // TeXForm
Table[2^s BhNum[s, 1/2], {s, 0, 12}] // TeXForm
Show[Plot[BcNum[n], {n, 0, 12}, PlotStyle -> Brown],
DiscretePlot[2^n BhNum[n, 1/2], {n, 0, 12}, WorkingPrecision -> 70]]
The Hasse representation of the central Bernoulli function.
Bhc[s_] := Bh[s, 1/2];
Clear[s]; Bhc[s] // Poly // FullSimplify // TeXForm
Table[2^s BhNum[s, 1/2], {s, 0, 12}]
% // Numerator (* even indexed are A001896 *)
%% // Denominator (* A141459, even indexed A001897 *)
For the central Bernoulli numbers equivalent to:
Bhcn[N_] := Sum[(n + 1)^(-1) Sum[(-1)^k Binomial[n, k] (2 k + 1)^N,
{k, 0, n}], {n, 0, N}];
Table[Bhcn[s], {s, 0, 12}]
% // Numerator
%% // Denominator
Bernoulli constants via Hasse representation
(* Not suited for numerical computation! *)
betah[s_, v_] := Sum[(n + 1)^(-1) Sum[(-1)^k Binomial[n, k] Log[k + v]^s,
{k, 0, n}], {n, 0, Infinity}];
Clear[s, v, n]; betah[s, v] // FullSimplify // TeXForm
The tau constant and the tau function.
tau := 2*Pi*I ;
Tau[s_] := tau^(-s) + (-tau)^(-s);
Tau[s] // TeXForm
Plot[Tau[s], {s, -1, 3}, PlotRange -> {-0.1, 3.7}]
ZTG, the ZetaTauGamma product is the reflected Zeta function.
ZTG[s_] := Zeta[s] Tau[s] Gamma[s];
Plot[{ZTG[s], Zeta[1 - s]}, {s, -1, 3}, PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.9}], {0.9, 0.9}}]]
ZTF, the -ZetaTauFactorial product is (a representation of) the Bernoulli function.
ZTF[s_] := -Zeta[s] Tau[s] Factorial[s];
Plot[{ZTF[s], B[s]}, {s, -1, 3}, PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.8}], {0.9, 0.8}}]]
Plot[{-Zeta[s], \[Tau][s], Factorial[s]}, {s, -1/2, 3},
PlotTheme -> {"Thick", "DashedLines"}, PlotRange -> {-9/2, 13/2},
PlotLegends -> Placed["Expressions", {Scaled[{0.25, 0.01}], {0.25, 0.01}}]]
(* Export["Fig36RiemannDecomposition.eps", %] *)
The functional equation of the Bernoulli function.
Bfeq[s_] := Tau[s] Factorial[s] B[1 - s] / (1 - s);
Plot[{B[s], Bfeq[s]}, {s, -1, 3}, PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.8}], {0.9, 0.8}}]]
The symmetric functional equation.
Bsfl[s_] := B[1 - s] (s/2)! / Pi^(s/2);
Bsfr[s_] := B[s] ((1 - s)/2)! / Pi^((1 - s)/2);
Clear[s]; Bsfl[s] // FullSimplify // TeXForm
Clear[s]; Bsfr[s] // FullSimplify // TeXForm
ReImPlot[{Bsfr[s] - Bsfl[s]}, {s, -1, 4}, WorkingPrecision -> 30,
PlotLegends -> Placed["Expressions", {Scaled[{0.5, 0.2}], {0.5, 0.2}}]]
The Riemann xi (lower case) function, as defined by Landau and, to add to the confusion denoted by Mathematica as RiemannXi, although it is not the Riemann Xi (upper case) function, as defined by Landau with upper case and denoted by Riemann with xi (lower case).
xi[s_] := (s/2)! Pi^(-s/2) (s - 1) Zeta[s];
xi[s]
FullSimplify[RiemannXi[u] - xi[u]] // TeXForm
The Bernoulli function in terms of the Riemann xi function.
Bxi[s_] := If[n == 1, 1/2, (Pi^((1 - s) / 2) / ((1 - s) / 2)!) xi[s]];
Clear[s, v, n]; Bxi[s] // FullSimplify // TeXForm
Table[Bxi[n], {n, 0, 8}] // N
Table[B[n], {n, 0, 8}] // N
{1., 0.5, 0.166667, 0., -0.0333333, 0., 0.0238095, 0., -0.0333333}
{1., 0.5, 0.166667, 0., -0.0333333, 0., 0.0238095, 0., -0.0333333}
The Bernoulli function in terms of the Riemann xi function.
Bxiref[s_] := (Pi^(s/2) / (s/2)!) RiemannXi[s];
Table[Bxiref[n], {n, 0, 8}] // N
Table[B[1 - n], {n, 0, 8}] // N
{0.5, 1., 1.64493, 2.40411, 3.24697, 4.14771, 5.08672, 6.0501, 7.02854}
{0.5, 1., 1.64493, 2.40411, 3.24697, 4.14771, 5.08672, 6.0501, 7.02854}
The Basel problem. The solution is: The Bernoulli function at s = -1.
{B[-1], Pi RiemannXi[-1], Pi RiemannXi[2]} // TeXForm
Hadamard's infinite product expansion of the zeta function.
H[s_] := Zeta[s] (s - 1) (s/2)! / Pi^(s/2);
H[1] := 1/2;
Clear[s]; H[s] // FullSimplify // TeXForm
h[s_] := With[{sigma = (1 - s)/2}, Pi^sigma / sigma!];
Clear[s]; h[s] // FullSimplify // TeXForm
Hadamard decomposition of the Bernoulli function.
Plot[{H[s] h[s], B[s], RiemannXi[s] h[s] }, {s, 0, 8},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.8}], {0.9, 0.8}}]]
Jensen's formula for the Hadamard product and the Riemann xi function.
Clear[a, b]
JensenInt[s_, a_, b_] := 2 (s/2)! Pi^(1 - s/2) NIntegrate[Re[(1/2 + I x)^(1 - s) /
(Exp[Pi x] + Exp[-Pi x])^2], {x, a, b}];
HoldForm[2 (s/2)! Pi^(1 - s/2) Integrate[Re[(1/2 + I x)^(1 - s)
/ (Exp[Pi x] + Exp[-Pi x])^2], {x, -Infinity, Infinity}]] // TeXForm
(* The splitting helps to evaluate the integral numerically. *)
HJ[s_] := JensenInt[s, -Infinity, 1] + JensenInt[s, 1, Infinity];
Table[HJ[s], {s, 1, 4}]
Table[H[s], {s, 1, 4}] // N
Table[RiemannXi[s], {s, 1, 4}] // N
{0.5, 0.523599, 0.57394, 0.657974}
{0.5, 0.523599, 0.57394, 0.657974}
{0.5, 0.523599, 0.57394, 0.657974}
ComplexExpand[Re[(1/2 + I z)^(1 - s)/(E^(-(Pi z)) + E^(Pi z))^2]]
Generalized Euler function.
Eg[s_, v_] := -Gg[s + 1, v] / (s + 1);
Eg[-1, v_] := Log[4];
Clear[s, v]; Eg[s, v] // FullSimplify // TeXForm
Test (see also A002425).
Table[Eg[n, 1], {n, 0, 13}] // SeqGrid
Table[2^n Eg[n, 1], {n, 0, 11}] // SeqGrid
V := Table[Expand[FullSimplify[Eg[n, x]]], {n, 1, 6}]
W := Table[EulerE[n, x], {n, 1, 6}]
Grid[{V, W}, Frame -> All]
Plot[V, {x, -1, 3/2}, PlotRange -> {-1, 1/2}]
Euler tangent function, definition.
Et[s_] := 2^s Eg[s, 1];
Et[-1] := Log[2];
Clear[s]; Et[s] // FullSimplify // TeXForm
ReImPlot[Et[s], {s, -1, 6}, PlotRange -> {-3, 23},
PlotLegends -> Placed["Expressions", {Scaled[{0.3, 0.8}], {0.3, 0.8}}]]
Euler tangent function, via polylogarithm.
EtLi[s_] := -2 Re[PolyLog[-s, I]];
Clear[s]; EtLi[s] // FullSimplify // TeXForm
Test (Note that -2 Re[-Log[1 - I]] = Log[2]).
Table[EtLi[n], {n, 0, 11}]
{1, 1, 0, -2, 0, 16, 0, -272, 0, 7936, 0, -353792}
(* Plot[EtLi[s], {s, -1, 6}, PlotRange -> {-3, 23}] *)
A155585
Table[Et[n], {n, 0, 11}]
{1, 1, 0, -2, 0, 16, 0, -272, 0, 7936, 0, -353792}
Euler tangent function, via Bernoulli function.
EtB[s_] := B[s + 1] (4^(s + 1) - 2^(s + 1)) / (s + 1);
EtB[-1] := Log[2];
Clear[s]; EtB[s] // FullSimplify // TeXForm
Table[2^n Eg[n, 1], {n, 0, 11}]
Table[Et[n], {n, 0, 11}]
Table[EtB[n], {n, 0, 11}]
{1, 1, 0, -2, 0, 16, 0, -272, 0, 7936, 0, -353792}
{1, 1, 0, -2, 0, 16, 0, -272, 0, 7936, 0, -353792}
{1, 1, 0, -2, 0, 16, 0, -272, 0, 7936, 0, -353792}
(* Plot[EtB[s], {s, -1, 6}, PlotRange -> {-3, 23}] *)
Connection to the Eulerian numbers, A173018.
EulerA[n_ /; n >= 0, 0] = 1; EulerA[n_, k_] /; k < 0 || k > n = 0;
EulerA[n_, k_] := EulerA[n, k] = (n-k)*EulerA[n-1, k-1] + (k+1)*EulerA[n-1, k];
Table[EulerA[n, k], {n, 0, 7}, {k, 0, n}] // TableForm
$ 2^n E_n(1) = A_n(-1)$
EulerApoly[n_] := Sum[EulerA[n, k] x^k, {k, 0, n}];
Table[EulerApoly[n] /. x -> -1, {n, 0, 9}]
{1, 1, 0, -2, 0, 16, 0, -272, 0, 7936}
Stirling-Fubini type polynomials.
sf[n_] := Sum[(-2)^(n - k) StirlingS2[n, k] k! x^k, {k, 0, n}];
Table[sf[n] /. x -> 1, {n, 0, 9}]
{1, 1, 0, -2, 0, 16, 0, -272, 0, 7936}
A122704
Table[(-1)^n sf[n] /. x -> -1, {n, 0, 9}]
{1, 1, 4, 22, 160, 1456, 15904, 202672, 2951680, 48361216}
A122704[n_] := (-2)^(n + 1) PolyLog[-n, 3] / 3;
Table[A122704[n], {n, 0, 9}]
{1, 1, 4, 22, 160, 1456, 15904, 202672, 2951680, 48361216}
Euler secant function, definition.
Es[s_] := If[1 + s == 0, Pi/2, 2^s Eg[s, 1/2]];
Clear[s]; Es[s] // FullSimplify // TeXForm
Fake traditional notation since 'E' is protected.
\[CapitalEpsilon][s_] := Es[s];
ReImPlot[Es[s], {s, -1, 6}, PlotRange -> {-3/2, 13/2},
PlotLegends -> Placed["Expressions", {Scaled[{0.3, 0.8}], {0.3, 0.8}}]]
Euler (secant) numbers.
Table[FullSimplify[Es[n]], {n, 0, 12}] // SeqGrid
Table[FullSimplify[AbsEs[n]], {n, 0, 12}] // SeqGrid
Euler secant function, via generalized Bernoulli.
EsB1[s_] := 2 * 4^s (Bg[s + 1, 3/4] - Bg[s + 1, 1/4]) / (s + 1);
EsB1[-1] := Pi / 2;
Clear[s]; EsB1[s] // FullSimplify // TeXForm
EsB[s_] := (2^(s + 1) Bg[s + 1, 1/2] - 4^(s + 1) Bg[s + 1, 1/4]) / (s + 1);
EsB[-1] := Pi / 2;
Clear[s]; EsB[s] // FullSimplify // TeXForm
Table[FullSimplify[EsB[n]], {n, 0, 12}]
Table[FullSimplify[EsB1[n]], {n, 0, 12}]
{1, 0, -1, 0, 5, 0, -61, 0, 1385, 0, -50521, 0, 2702765}
{1, 0, -1, 0, 5, 0, -61, 0, 1385, 0, -50521, 0, 2702765}
Clear[s]; FullSimplify[EsB[s] - EsB1[s]]
Plot[{EsB[s], EsB1[s]}, {s, -1, 6}, PlotRange -> {-3/2, 13/2},
PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.3, 0.8}], {0.3, 0.8}}]]
Euler secant function, via polylogarithm.
EsLi[s_] := 2 Im[PolyLog[-s, I]];
Clear[s]; EsLi[s] // FullSimplify // TeXForm
Table[EsLi[n], {n, 0, 10}] (* 2 Im[-Log[1-I]] = Pi/2 *)
{1, 0, -1, 0, 5, 0, -61, 0, 1385, 0, -50521}
(* Plot[EsLi[s], {s, -1, 6}, PlotRange -> {-3/2, 13/2}] *)
atext := MaTeX["E_{\\tau}(s)"];
btext := MaTeX["E_{\\sigma}(s)"];
Etan[s_] := Et[s];
Esec[s_] := Es[s];
Plot[{Etan[s], Esec[s]}, {s, -1, 6}, PlotRange -> {-9, 23},
Filling -> {1 -> {2}}, WorkingPrecision -> 60,
PlotLegends -> Placed[{atext, btext}, {0.35, 0.8}]]
(* Export["Fig23EulerTanSec.eps", %] *)
Even indexed classical Euler numbers via an Jensen integral.
EInt[s0_, z0_, prec_] := Module[{s, z},
{s, z} = SetPrecision[{s0, z0}, prec $MachinePrecision];
Block[{$MinPrecision = prec $MachinePrecision,
$MaxPrecision = prec $MachinePrecision},
((4 z I + 1)^(s + 1) - (4 z I - 1)^(s + 1))/(Exp[-Pi z] + Exp[Pi z])^2]];
JEInt[s0_, prec_] := Module[{s},
{s} = SetPrecision[{s0}, prec $MachinePrecision];
((2 Pi ) / (s + 1))
NIntegrate[EInt[s, z, prec], {z, 0, Infinity},
WorkingPrecision -> prec $MachinePrecision ]];
A346838
Table[JEInt[2 n, 2], {n, 0, 6}] // Chop
{1.0000000000000000000000000000000, -1.0000000000000000000000000000000, > 5.000000000000000000000000000000, -61.00000000000000000000000000000, > 1385.0000000000000000000000000000, -50521.00000000000000000000000000, 6 > 2.7027650000000000000000000000000 10 }
Euler Zeta numbers.
{1, 1, 1/2, 1/3, 5/24, 2/15, 61/720, 17/315, 277/8064, 62/2835} // TeXForm
The Bernoulli secant function.
Bsec[s_] := (2^(s - 1) / (2^s - 1))(Bg[s, 3/4] - Bg[s, 1/4]);
Clear[s]; Bsec[s] // FullSimplify // TeXForm
A160143, A193476
Table[FullSimplify[Bsec[n]], {n, 1, 10}]
% // Numerator
%% // Denominator
atext := MaTeX["B_{\\tau}(s)"];
btext := MaTeX["B_{\\sigma}(s)"];
Btan[s_] := B[s];
Plot[{Btan[s], Bsec[s]}, {s, 1, 8},
PlotRange -> {-0.1, 1/2}, WorkingPrecision -> 50, Filling -> {1 -> {2}},
PlotLegends -> Placed[{atext, btext}, {0.8, 0.6}] ]
(* Export["Fig24BernoulliTanSec.eps", %] *)
The Bernoulli secant numbers represented by the Euler secant numbers.
BsecE[n_] := (-1)^(n - 1) (n / (4^n - 2^n)) Es[n - 1];
Clear[n]; BsecE[n] // FullSimplify // TeXForm
Table[FullSimplify[BsecE[n]], {n, 1, 11}] // TeXForm
The Bernoulli secant function via the polylogarithm.
BsecP[s_] := ((2 s) / (4^s - 2^s)) Im[PolyLog[1 - s, I]];
BsecP[0] := (2 Pi) / Log[16];
Clear[n]; BsecP[s] // FullSimplify // TeXForm
Table[FullSimplify[BsecP[n]], {n, 1, 11}] // TeXForm
Plot[{BsecP[s], Bsec[s]}, {s, -1, 6},
PlotTheme -> {"Thick", "DashedLines"}, WorkingPrecision -> 30,
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.9}], {0.9, 0.9}}]]
Extended Zeta function.
Zext[s_] := Zeta[s] - (Zeta[s, 3/4] - Zeta[s, 1/4]) / (2^s - 2);
Zext[s] // TeXForm
Extended Bernoulli function, definition via generalized Zeta.
Bext[s_] := -s Zext[1 - s];
Bext[0] := 1 + Pi/Log[4];
Clear[s]; Bext[s] // FullSimplify // TeXForm
(* N[Pi + PolyGamma[0, 1/4] - PolyGamma[0, 3/4], 20] *)
Series[Bext[s], {s, 0, 7}] // Normal // N
CoefficientList[%, s] // SeqGrid
Extended Bernoulli function via generalized Bernoulli, B(s, v).
BextB[s_] := B[s] + (2^(s - 1) / (2^s - 1))(Bg[s, 3/4] - Bg[s, 1/4]);
BextB[0] := 1 + Pi/Log[4];
Clear[s]; BextB[s] // FullSimplify // TeXForm
Plot[{BextB[s], B[s]}, {s, 2, 8}, PlotRange -> {-0.1, 0.2},
WorkingPrecision -> 40, Filling -> {1 -> {2}},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.9}], {0.9, 0.9}}]]
The extended Bernoulli function is the sum of the Bernoulli function and the Bernoulli secant function.
Clear[s]; Btan[s] + Bsec[s] // FullSimplify // TeXForm
Plot[{Bext[s], Btan[s], Bsec[s]}, {s, -1, 6},
PlotTheme -> {"Thick", "DashedLines"}, WorkingPrecision -> 30,
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.9}], {0.9, 0.9}}]]
Plot[{Bext[s], Btan[s] + Bsec[s]}, {s, -1, 6},
PlotTheme -> {"Thick", "DashedLines"}, WorkingPrecision -> 30,
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.9}], {0.9, 0.9}}]]
The extended Bernoulli numbers are the values of the extended Bernoulli function for integers n ≥ 1.
Bextn[n_] := FullSimplify[BextB[n]];
Table[Bextn[n], {n, 1, 10}]
% // Numerator // Print
%% // Denominator // Print
{1, 1, -3, -1, 25, 1, -427, -1, 12465, 5} {1, 6, 56, 30, 992, 42, 16256, 30, 261632, 66}
Extended Euler function via extended Bernoulli.
Eext[s_] := (4^(s + 1) - 2^(s + 1)) (Bext[s + 1] / (s + 1));
Eext[-1] := Pi / 2 + Log[2];
Clear[s]; Eext[s] // FullSimplify // TeXForm
Series[Eext[s], {s, 0, 7}] // Normal // N
CoefficientList[%, s] // SeqGrid
Table[FullSimplify[Eext[n]], {n, 0, 12}]
{2, 1, -1, -2, 5, 16, -61, -272, 1385, 7936, -50521, -353792, 2702765}
Extended Euler function via extended Zeta.
EextZ[s_] := Zext[-s] (2^(1+s) - 4^(1 + s));
EextZ[-1] := Pi/2 + Log[2];
Clear[s]; EextZ[s] // FullSimplify // TeXForm
The extended Euler function is the sum of the Euler secant and the Euler tangent function.
Est[s_] := Es[s] + Et[s];
Clear[s]; Est[s] // FullSimplify // TeXForm
Plot[{Es[s] + Et[s], Eext[s]}, {s, -1, 6},
PlotRange -> {-9, 17}, PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.3, 0.9}], {0.3, 0.9}}]]
The scaled extended Euler function.
Plot[Eext[s] / s!, {s, 6, 18}, WorkingPrecision -> 60 ]
See also OEIS A163982.
Table[FullSimplify[Eext[n]], {n, 0, 11}]
Table[FullSimplify[EextZ[n]], {n, 0, 11}]
Table[FullSimplify[Est[n]], {n, 0, 11}]
{2, 1, -1, -2, 5, 16, -61, -272, 1385, 7936, -50521, -353792}
{2, 1, -1, -2, 5, 16, -61, -272, 1385, 7936, -50521, -353792}
{2, 1, -1, -2, 5, 16, -61, -272, 1385, 7936, -50521, -353792}
Euler extended function via generalized Bernoulli.
EextBg[-1] := Pi/2 + Log[2];
EextBg[s_] := (((4^(s+1) - 2^(s+2) + 2) B[s + 1]
- 4^(s + 1) Bg[s + 1, 1/4]) / (s + 1));
Clear[s]; EextBg[s] // FullSimplify // TeXForm
Table[FullSimplify[EextBg[n]], {n, 0, 11}]
{2, 1, -1, -2, 5, 16, -61, -272, 1385, 7936, -50521, -353792}
Plot[{EextBg[s], Eext[s]},{s, -1, 6}, PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.3, 0.9}], {0.3, 0.9}}]]
Plot[{Esec[s], Etan[s], Eext[s]},{s, -1, 6}, PlotTheme -> {"Thick", "DashedLines"},
WorkingPrecision -> 30, PlotRange -> {-10, 20},
PlotLegends -> Placed["Expressions", {Scaled[{0.3, 0.9}], {0.3, 0.9}}]]
Jensen integral representation of the extended Euler numbers.
The polynomials are the numerators in the integral. See A342317
Ef[s0_, z0_, prec_] := Module[{s, z},
{s, z} = SetPrecision[{s0, z0}, prec $MachinePrecision];
Block[{$MinPrecision = prec $MachinePrecision,
$MaxPrecision = prec $MachinePrecision},
(((1 + 4 z I)^(s + 1) + (1 - 2^(-2 s - 1))(2 + 4 z I)^(s + 1))
/ (Exp[-Pi z] + Exp[Pi z])^2 )]];
JEfIntegral[s0_, prec_] := Module[{s},
{s} = SetPrecision[{s0}, prec $MachinePrecision];
((2 Pi) / (s + 1)) NIntegrate[Ef[s, z, prec], {z, -Infinity, Infinity},
WorkingPrecision -> prec $MachinePrecision ]];
Table[Round[JEfIntegral[n, 2]], {n, 0, 12}]
{2, 1, -1, -2, 5, 16, -61, -272, 1385, 7936, -50521, -353792, 2702765}
Plot[{JEfIntegral[s, 1], Eext[s]}, {s, -1, 6},
PlotTheme -> {"Thick", "DashedLines"},
WorkingPrecision -> 30, PlotRange -> {-10, 20},
PlotLegends -> Placed["Expressions", {Scaled[{0.3, 0.9}], {0.3, 0.9}}]]
The unsigned Euler functions.
AbsEt[s_] := Sin[Pi s / 2] Et[s];
AbsEt[-1] := -Log[2];
Clear[s]; AbsEt[s] // FullSimplify // TeXForm
AbsEs[s_] := Cos[Pi s / 2] Es[s]
Clear[s]; AbsEs[s] // FullSimplify // TeXForm
Euler secant function, unsigned version.
AbsEs[s_] := Cos[Pi s / 2] Es[s]
Clear[s]; AbsEs[s] // FullSimplify // TeXForm
Table[FullSimplify[AbsEs[n]], {n, 0, 11}]
{1, 0, 1, 0, 5, 0, 61, 0, 1385, 0, 50521, 0}
ReImPlot[Cos[Pi s / 2] Es[s], {s, -1, 6}, PlotRange -> {-3/2, 13/2},
PlotLegends -> Placed["Expressions", {Scaled[{0.3, 0.8}], {0.3, 0.8}}]]
Euler tangent function, unsigned version.
AbsEt[s_] := Cos[Pi (s - 1) / 2] Et[s];
AbsEt[-1] := -Log[2];
Clear[s]; AbsEt[s] // FullSimplify // TeXForm
Test, compare OEIS A009006.
Table[AbsEt[n], {n, 0, 11}]
{0, 1, 0, 2, 0, 16, 0, 272, 0, 7936, 0, 353792}
ReImPlot[Sin[Pi s / 2] Et[s], {s, -1, 6}, PlotRange -> {-1, 20},
PlotLegends -> Placed["Expressions", {Scaled[{0.3, 0.8}], {0.3, 0.8}}]]
The André function.
A[s_] := AbsEt[s] + AbsEs[s];
Clear[s]; A[s] // FullSimplify // TeXForm
atext := MaTeX["|E|_{\\tau}(s)"];
btext := MaTeX["|E|_{\\sigma}(s)"];
ctext := MaTeX["A(s)\, = \, |E|_{\\tau}(s) + |E|_{\\sigma}(s)"];
Plot[{AbsEt[s], AbsEs[s], A[s]}, {s, -1, 6}, PlotRange -> {-1, 25},
Filling -> {1 -> {2}}, WorkingPrecision -> 60,
PlotLegends -> Placed[{atext, btext, ctext}, {0.4, 0.7}],
Epilog -> {PointSize[0.01], Red, Point[Table[{k, A[k]}, {k, 0, 5}]]}]
(* Export["Fig37AndreFunction.eps", %] *)
The André function via the polylogarithm.
Apl[s_] := (-I)^(s+1) PolyLog[-s, I] + I^(s+1) PolyLog[-s, -I];
Clear[s]; Apl[s] // FullSimplify // TeXForm
Plot[{A[s], Apl[s]}, {s, -5, 5},
PlotTheme -> {"Thick", "DashedLines"},
WorkingPrecision -> 30, PlotRange -> {-10, 20},
PlotLegends -> Placed["Expressions", {Scaled[{0.1, 0.9}], {0.1, 0.9}}]]
The André numbers.
Table[FullSimplify[A[n]], {n, 0, 11}]
{1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521, 353792}
The André numbers for positive integers.
Prepend[Table[2 (-I)^(s + 1) PolyLog[-s, I], {s, 1, 11}], 1]
{1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521, 353792}
Plot[{A[s], 2 Re[(-I)^(s + 1) PolyLog[-s, I]]}, {s, -5, 5},
PlotTheme -> {"Thick", "DashedLines"},
WorkingPrecision -> 30, PlotRange -> {-10, 20},
PlotLegends -> Placed["Expressions", {Scaled[{0, 0.9}], {0, 0.9}}]]
Euler zeta numbers. A099612 / A099617
Table[Apl[n] / n!, {n, 0, 10}]
% // Numerator // Print
%% // Denominator // Print
{1, 1, 1, 1, 5, 2, 61, 17, 277, 62, 50521} {1, 1, 2, 3, 24, 15, 720, 315, 8064, 2835, 3628800}
The signed André function.
As[s_] := I (PolyLog[-s, -I] - Exp[I Pi s] PolyLog[-s, I]) / Exp[I Pi s / 2];
Clear[s]; As[s] // FullSimplify // TeXForm
atext := MaTeX["A(s)"];
btext := MaTeX["A^{\\ast}(s)"];
Plot[{A[s], As[s]},{s, -1.2, 4.6},
PlotRange -> {-4, 9}, WorkingPrecision -> 30,
Epilog -> {PointSize[0.01], Red, Point[Table[{k, (-1)^k A[k]}, {k, 0, 4}]]},
PlotLegends -> Placed[{atext, btext}, {0.4, 0.8}]]
(* Export["Fig31AndreFunctions.eps", %] *)
The scaled André functions.
atext := MaTeX["\\frac{A(s)}{s!}"];
btext := MaTeX["\\frac{A^{\\ast}(s)}{s!}"];
Plot[{A[s] / s!, As[s] /s! }, {s, -4, 6},
PlotRange -> {-2.0, 1.5}, Filling -> {1 -> {2}},
PlotLegends -> Placed[{atext, btext}, {0.85, 0.2}],
Epilog -> {PointSize[0.01], Red, Point[Table[{k, A[k] / k!}, {k, 0, 6}]]} ]
(* Export["Fig35ScaledAndreFunctions.eps", %] *)
The signed Andre numbers. A346838, A346839.
Table[As[n], {n, 0, 11}] // FullSimplify
{1, -1, 1, -2, 5, -16, 61, -272, 1385, -7936, 50521, -353792}
Table[As[n] / n!, {n, 0, 29}] // FullSimplify // Accumulate // N
{1., 0., 0.5, 0.166667, 0.375, 0.241667, 0.326389, 0.272421, 0.306771, 0.284901, > 0.298824, 0.28996, 0.295603, 0.292011, 0.294298, 0.292842, 0.293769, 0.293178, > 0.293554, 0.293315, 0.293467, 0.29337, 0.293432, 0.293393, 0.293418, 0.293402, > 0.293412, 0.293405, 0.29341, 0.293407}
The unsigned Bernoulli functions.
bs[s_] := Sin[Pi s / 2] Bsec[s];
bt[s_] := Cos[Pi s / 2] Btan[s];
Table[FullSimplify[bs[s] - bt[s]], {s, 1, 12}]
The Seki function.
Seki[s_] := If[s == 0, -1, bs[s] - bt[s]];
Clear[s]; Seki[s] // FullSimplify // TeXForm
atext := MaTeX["|B|_{\\tau}(s)"];
btext := MaTeX["|B|_{\\sigma}(s)"];
ctext := MaTeX["S(s)\, = \, |B|_{\\sigma}(s) - |B|_{\\tau}(s)"];
Plot[{-bt[s], bs[s], Seki[s]}, {s, -0.4, 14},
Filling -> {1 -> {2}}, WorkingPrecision -> 60, PlotRange -> {-0.4, 1.012},
PlotLegends -> Placed[{atext, btext, ctext}, {0.47, 0.8}],
Epilog -> {PointSize[0.01], Red, Point[Table[{k, Seki[k]}, {k, 1, 13}]]}]
(* Export["Fig38SekiFunction.eps", %] *)
The Seki function via the André function.
SekiA[s_] := s Apl[s-1] / (4^s - 2^s);
SekiA[0] := -1;
SekiA[-1] := -8 Catalan;
Clear[s]; SekiA[s] // FullSimplify // TeXForm
The Seki function via the polylogarithm.
SekiP[s_] := s (I^s PolyLog[1-s, -I] + (-I)^s PolyLog[1-s, I]) / (4^s - 2^s);
SekiP[0] := -1;
Clear[s]; SekiP[s] // FullSimplify // TeXForm
SekiP2[s_] := Re[(2 s (-I)^s PolyLog[1-s, I]) / (4^s - 2^s)];
SekiP2[0] := -1;
Clear[s]; SekiP2[s] // FullSimplify // TeXForm
Table[Seki[n], {n, 0, 12}] // FullSimplify
Table[SekiA[n], {n, 0, 12}]
Table[SekiP[n], {n, 0, 12}]
Table[SekiP2[n], {n, 0, 12}]
% // Numerator // Print
%% // Denominator // Print
{-1, 1, 1, 3, 1, 25, 1, 427, 1, 12465, 5, 555731, 691} {1, 2, 6, 56, 30, 992, 42, 16256, 30, 261632, 66, 4192256, 2730}
Plot[{SekiP[s], SekiA[s], SekiP2[s], Seki[s]},{s, 0, 8},
WorkingPrecision -> 90,
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.85}], {0.9, 0.85}}]]
The signed Seki function.
SekiS[s_] := Exp[I Pi s / 2] (Exp[I Pi s] PolyLog[1 - s, -I] + PolyLog[1 - s, I]) s / (2^s - 4^s);
SekiS[0] := 1;
Clear[s]; SekiS[s] // FullSimplify // TeXForm
ReImPlot[SekiS[s], {s,0,6}, PlotRange -> {-1, 1.012},
PlotLegends -> Placed["Expressions", {Scaled[{0.9, 0.85}], {0.9, 0.85}}]]
See A193472 and A193473, apart from the signs.
Table[SekiS[n], {n, 0, 12}]
% // Numerator // Print
%% // Denominator // Print
{1, 1, -1, 3, -1, 25, -1, 427, -1, 12465, -5, 555731, -691} {1, 2, 6, 56, 30, 992, 42, 16256, 30, 261632, 66, 4192256, 2730}
The scaled signed Seki numbers.
Table[SekiS[n] / n!, {n, 0, 12}] // TeXForm
Table[FullSimplify[SekiS[n] / n!], {n, 0, 8}]
% // Numerator // Print
%% // Denominator // Print
{1, 1, -1, 1, -1, 5, -1, 61, -1} {1, 2, 12, 112, 720, 23808, 30240, 11704320, 1209600}
ez[n_] := SeriesCoefficient[Sec[t] + Tan[t], {t, 0, n}];
a[n_] := (-1)^(n-1) If[n == 0, -1, ez[n - 1] / (4^n - 2^n)];
Table[a[n], {n, 0, 8}]
Swiss knife polynomials.
Skp[-1, x_] := 1;
Skp[n_, x_] := Sum[Binomial[n, k] Es[k] x^(n-k), {k, 0, n}];
Clear[n, x]; Skp[n, x] // TeXForm
SKP := Table[Expand[FullSimplify[Skp[n, x]]], {n, 0, 7}]
SKP // MatrixForm
Observe the sinusoidal character of the normalized SKP polynomials.
NSKP[n_, x_] := Skp[n, x] / n!;
K0 := NSKP[0,x]; K1 := NSKP[1,x]; K2 := NSKP[2,x];
K3 := NSKP[3,x]; K4 := NSKP[4,x]; K5 := NSKP[5,x];
K6 := NSKP[6,x]; K7 := NSKP[47x];
Plot[{K1,K2,K3,K4,K5,K6,K7}, {x, -2.5, 2.5}, PlotRange -> {-0.75, 0.75},
PlotLegends -> "Expressions"]
(* Export["Fig20SwissKnifePolynomials.eps", %] *)
Worpitzky representation of the SK polynomials.
a[k_] := List[1, 1, 1, 0, -1, -1, -1, 0][[Mod[k, 8] + 1]];
Table[a[n], {n, 0, 12}]
{1, 1, 1, 0, -1, -1, -1, 0, 1, 1, 1, 0, -1}
Skpoly[-1, x_] := 1;
Skpoly[n_, x_] := Sum[a[k]*2^(-Floor[k/2])
Sum[(-1)^v Binomial[k, v] (x + v + 1)^n,
{v, 0, k}], {k, 0, n}]
Table[Expand[FullSimplify[Skpoly[n, x]]], {n, 0, 7}] // MatrixForm
Recurrence of the SK polynomials.
Clear[n, x, K]
c := {1}
P := 1
Print[P]
For[n = 1, n < 8, n++,
c = Table[(c[[k+1]] n) / (n - 2 k), {k, 0, Floor[(n-1)/2]}];
If[EvenQ[n], AppendTo[c, -Sum[c[[k+1]], {k, 0, Floor[(n-1)/2]}]]];
P = Sum[c[[k+1]] x^(n - 2 k), {k, 0, Floor[n/2]}];
Print[P]
]
1 x 2 -1 + x 3 -3 x + x 2 4 5 - 6 x + x 3 5 25 x - 10 x + x 2 4 6 -61 + 75 x - 15 x + x 3 5 7 -427 x + 175 x - 21 x + x
R[K_, s_] := Exp[1/2 + Sum[BernoulliB[n + 1]/((n + 1) n s^n), {n, 1, K}]];
R5[s_] := Exp[1/2 + s^(-1) / 12 - s^(-3) / 360 + s^(-5) / 1260];
R[5, s]
For even positive integer n:
Basyn[s_] := 4 Pi (s / (2 Pi E))^(s + 1/2) R[5, s];
Clear[n]; Basyn[n] // FullSimplify
Table[Basyn[n], {n, 20, 30, 2}] // N
Table[Abs[BernoulliB[n]], {n, 20, 30, 2}] // N
6 7 8 {529.124, 6192.12, 86580.2, 1.42552 10 , 2.72982 10 , 6.01581 10 }
6 7 8 {529.124, 6192.12, 86580.3, 1.42552 10 , 2.72982 10 , 6.01581 10 }
For positive real s:
Basy[K_, s_] := 4 Pi (s/(2 Pi Exp[1]))^(s + 1/2) R[K, s] (-Cos[s Pi / 2]);
Clear[s]; Basy[5, s] // FullSimplify (* for K=5 *)
Basy5[s_] := - 2 (Exp[(2 - 7 (s^2 - 30 s^4 + 360 s^6))/(2520 s^5)]
(2 Pi)^(1/2 - s) s^(1/2 + s) Cos[(Pi s) / 2]);
Clear[s]; Basy5[s]
Table[Basy5[n], {n, 20, 30, 2}] // N
Table[BernoulliB[n], {n, 20, 30, 2}] // N
6 7 8 {-529.124, 6192.12, -86580.2, 1.42552 10 , -2.72982 10 , 6.01581 10 }
6 7 8 {-529.124, 6192.12, -86580.3, 1.42552 10 , -2.72982 10 , 6.01581 10 }
Plot[{Basy[5, s], B[s]}, {s, 1, 13},
PlotLegends -> Placed["Expressions", {Scaled[{0.2, 0.1}], {0.2, 0.1}}],
WorkingPrecision -> 30, PlotTheme -> {"Thick", "DashedLines"}]
SekiAsy[K_, s_] := 4 Pi (s/(2 Pi Exp[1]))^(s + 1/2) R[K, s];
Clear[s]; SekiAsy[5, s] // FullSimplify
SekiAsy5[s_] := (2^(3/2 - s) Pi^(1/2 - s) s^(1/2 + s)
Exp[(2 - 7 (s^2 - 30 s^4 + 360 s^6))/(2520 s^5)]);
Clear[s]; SekiAsy5[s] // TeXForm
atext := MaTeX["\\text{S}_{\\text{asy5}}(s)"];
btext := MaTeX["\\text{S}(s)"];
Plot[{SekiP[s], SekiAsy5[s]}, {s, 1, 13},
PlotLegends -> Placed[{btext, atext}, {0.55, 0.85}],
WorkingPrecision -> 30, PlotTheme -> {"Thick", "DashedLines"}]
(* Export["Fig33SekiApprox.eps", %] *)
Asymptotic expansion of the Euler function.
Easy[K_, s_] := -4 ((2 s) / (Pi Exp[1]))^(s + 1/2) R[K, s]*(-Cos[s Pi / 2]);
TeXForm[Easy[K, s]]
atext := MaTeX["E_{\\sigma \\text{ asy5}}(s)"];
btext := MaTeX["E_{\\sigma}(s)"];
Easy5[s_] := Easy[5, s];
Plot[{Esec[s], Easy5[s]}, {s, 0, 6},
WorkingPrecision -> 30, PlotRange -> {-10, 10},
PlotLegends -> Placed[{btext, atext}, {0.25, 0.2}],
PlotTheme -> {"Thick", "DashedLines"}]
(* Export["Fig34EulerApprox.eps", %] *)
Asymptotic expansion of the logarithm of the Andre function.
LogAasy[s_] := Log[4] + (1/2 + s) Log[2 s / Pi] +
((2/7) - s^2 + 30 s^4 - 360 s^6) / (360 s^5);
LogAasy[s] // TeXForm
Exp[LogAasy[s]]
Plot[{Log[A[s]], LogAasy[s]}, {s, 1/2, 4}, WorkingPrecision -> 30,
PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.25, 0.85}], {0.25, 0.85}}]]
Plot[{A[s], Exp[LogAasy[s]]}, {s, 1/2, 4}, WorkingPrecision -> 30,
PlotTheme -> {"Thick", "DashedLines"},
PlotLegends -> Placed["Expressions", {Scaled[{0.25, 0.85}], {0.25, 0.85}}]]
Plot[{LogAasy[s] / Log[A[s]], 1}, {s, 9/2, 11},
PlotRange -> {0.99994, 1.00012}, WorkingPrecision -> 40,
PlotLegends -> Placed["Expressions", {Scaled[{0.95, 0.85}], {0.95, 0.85}}]]
(* Export["FigXXAndreLogApprox.eps", %] *)
Todd = Series[z / (1 - Exp[-z]), {z, 0, 6} ]
A122045, Euler secant numbers
Table[(-1)^n FullSimplify[Skp[n, 0]], {n, 0, 12}]
{1, 0, -1, 0, 5, 0, -61, 0, 1385, 0, -50521, 0, 2702765}
A155585, 2^n*E(n, 1)
Table[FullSimplify[Skp[n, 1]], {n, 0, 12}]
{1, 1, 0, -2, 0, 16, 0, -272, 0, 7936, 0, -353792, 0}
A163982, -2^n*(E(n, 1/2) + E(n, 1))
Table[FullSimplify[-Skp[n, 0] - Skp[n, 1]], {n, 0, 12}]
{-2, -1, 1, 2, -5, -16, 61, 272, -1385, -7936, 50521, 353792, -2702765}
A163747, 2^n*(E(n, 1/2) - E(n, 1)).
Table[FullSimplify[Skp[n, 0] - Skp[n, 1]], {n, 0, 12}]
{0, -1, -1, 2, 5, -16, -61, 272, 1385, -7936, -50521, 353792, 2702765}
A304980, (2^n - 4^n) B[n] / n + E[n]
Table[FullSimplify[Skp[n, 0] - Skp[n-1, 1]], {n, 1, 12}]
Table[(2^n - 4^n) BernoulliB[n] / n + EulerE[n], {n, 1, 12}]
{-1, -2, 0, 7, 0, -77, 0, 1657, 0, -58457, 0, 3056557}
{1, -2, 0, 7, 0, -77, 0, 1657, 0, -58457, 0, 3056557}
Euler zeta numbers, A099612/A099617, 2^n*|E(n, 1/2) - E(n,1)| / n!
Table[Abs[FullSimplify[Skp[n, Mod[n, 2]]] / n!], {n, 0, 8}]
% // Numerator // Print
%% // Denominator // Print
Table[2^n Abs[EulerE[n, 1/2] - EulerE[n, 1]]/ n!, {n, 0, 8}]
{1, 1, 1, 1, 5, 2, 61, 17, 277} {1, 1, 2, 3, 24, 15, 720, 315, 8064}
Andre numbers, A000111
Table[Abs[FullSimplify[Skp[n, Mod[n, 2]]]], {n, 0, 10}]
{1, 1, 1, 2, 5, 16, 61, 272, 1385, 7936, 50521}
Extended Euler numbers
Table[FullSimplify[Skp[n, Mod[n, 2]]], {n, 0, 10}]
{1, 1, -1, -2, 5, 16, -61, -272, 1385, 7936, -50521}
Euler secant, A028296
Table[FullSimplify[Skp[2n, 0]], {n, 0, 8}]
{1, -1, 5, -61, 1385, -50521, 2702765, -199360981, 19391512145}
Euler tangent, A000182
Table[FullSimplify[Skp[2n + 1, 1]], {n, 0, 8}]
{1, -2, 16, -272, 7936, -353792, 22368256, -1903757312, 209865342976}
A336898 / A336899
alpha[n_] := If[n == 0, 1, n / (4^n - 2^n)]
Table[alpha[n], {n, 0, 10}]
% // Numerator // Print
%% // Denominator // Print
{1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 5} {1, 2, 6, 56, 60, 992, 672, 16256, 8160, 261632, 523776}
Bernoulli, A164555/A027642
Table[FullSimplify[Skp[n - 1, 1] alpha[n]], {n, 0, 10}]
% // Numerator // Print
%% // Denominator // Print
{1, 1, 1, 0, -1, 0, 1, 0, -1, 0, 5} {1, 2, 6, 1, 30, 1, 42, 1, 30, 1, 66}
Bernoulli tangent, n even, A000367/A002445
Table[FullSimplify[Skp[2n - 1, 1] alpha[2n]], {n, 0, 8}]
% // Numerator // Print
%% // Denominator // Print
{1, 1, -1, 1, -1, 5, -691, 7, -3617} {1, 6, 30, 42, 30, 66, 2730, 6, 510}
Bernoulli secant, n odd, A160143/A193476
Table[FullSimplify[Skp[2n, 0] alpha[2n + 1]], {n, 0, 7}]
% // Numerator // Print
%% // Denominator // Print
{1, -3, 25, -427, 12465, -555731, 35135945, -2990414715} {2, 56, 992, 16256, 261632, 4192256, 67100672, 1073709056}
Bernoulli extended, A193472/A193473
Table[FullSimplify[Skp[n-1, Mod[n-1, 2]] alpha[n]], {n, 0, 8}]
% // Numerator // Print
%% // Denominator // Print
{1, 1, 1, -3, -1, 25, 1, -427, -1} {1, 2, 6, 56, 30, 992, 42, 16256, 30}
Genocchi, A226158
Table[FullSimplify[-Skp[n-1, 1] n / 2^(n-1)], {n, 0, 12}]
{0, -1, -1, 0, 1, 0, -3, 0, 17, 0, -155, 0, 2073}
Springer, A188458
Table[FullSimplify[Skp[n, 1/2] 2^n], {n, 0, 8}]
{1, 1, -3, -11, 57, 361, -2763, -24611, 250737}
A001586 A212435
Table[FullSimplify[Skp[n, -1/2] 2^n], {n, 0, 8}]
{1, -1, -3, 11, 57, -361, -2763, 24611, 250737}