Message Boards Message Boards

How to calculate the digits of the MKB constant

34 Replies

Since the original formula for the MKB constant is an integral, its domain is continuous. So, we have the following comparison of it to the original formula of the MRB constant which is a sum. (MKB has many more pairs of terms that are equal to each other.)

The MRB constant = Limit[Sum[(-1)^n n^(1/n),{n,1,2N}],N->Infinity]

In the domain of terms of the MRB constant ask, when are the pairs of terms equal?

•   Limit[x^(1/x) - (x + h)^(1/(x + h)) ,h->Infinity]  == 0 when x=1 because Limit[x^(1/x),x->Infinity]=1.
•   x^(1/x) - (x + 2)^(1/(x + 2)) == 0 when x=2 because 2^(1/2)=4^(1/4).
•   I think there are no more.

The MKB constant = Limit[Integrate[(-1)^x x^(1/x),{x,1,2N}],N->Infinity].

Compare the previous list to one using the domain of terms of the MKB constant, and ask when pairs of terms are equal?

•   For x != 0, x^(1/x) - (x + 0)^(1/(x + 0)) == 0 because, for example, Limit[x^(1/x) - (x + 10^-h)^(1/(x + 10^-h)), h -> Infinity]=0; see last line a special such x.
•   x^(1/x) - (x + 1)^(1/(x + 1)) == 0 when x= 2.2931662874… (By definition Foias’ second constant. See second constant at http://mathworld.wolfram.com/FoiasConstant.html).
•   x^(1/x) - (x + 2)^(1/(x + 2)) == 0 when x=2.
•   x^(1/x) - (x + 3)^(1/(x + 3)) == 0 when x= 1.801627661…
•   x^(1/x) - (x + 4)^(1/(x + 4)) == 0 when x= 1.6647142806…
•   x^(1/x) - (x + 10)^(1/(x + 10)) == 0 when x= 1.3295905071…
•   …
•   x^(1/x) - (x + 100)^(1/(x + 100)) == 0 when x= 1.00697415301373…
•   …
•   Limit[x^(1/x) - (x + h)^(1/(x + h)) ,h->Infinity]  == 0 when x=1 because Limit[x^(1/x),x->Infinity]=1, and that is where the sequence very slowly goes to.
•   Many more.
•   x^(1/x) - (x + 10^-1)^(1/(x +10^- 1)) == 0 when x 2.669048059942…
•   x^(1/x) - (x + 10^-2)^(1/(x + 10^-2)) == 0 when x= 2.713289492595…
•   x^(1/x) - (x + 10^-3)^(1/(x + 10^-3)) == 0 when x= 2.71778190…
•   x^(1/x) - (x + 4)^(1/(x + 4)) == 0 when x= 2.71823182922…
•   …
•   x^(1/x) - (x + 10^-10)^(1/(x + 10^-10)) == 0, when x= 2.718281828…
•   …
•   Many more.
•   Limit[x^(1/x) - (x +10^- h)^(1/(x + 10^-h)) ,h->Infinity]  == 0 when x=E, because that is where the sequence very rapidly goes to!

With

enter image description here

and

enter image description here

Latest:

ClearSystemCache[]; Timing[
  Quiet[NIntegrate[
      Exp[Pi I x] Sum[(Log[x]/x)^n/n!, {n, 1, Infinity}], {x, 1, 
        Infinity I}, WorkingPrecision -> 4453, 
   Method -> "Trapezoidal", 
      MaxRecursion -> 11]]]

gives {134.516,...

More details and results to come.

I finally found a sum for the MKB constant! enter image description here enter image description here

See this cloud notebook. In there we see the sixth partial sum:

In[16]:= N[
 MeijerG[{{}, {1, 1}}, {{0, 0, 0}, {}}, -I \[Pi]] - 
  I \[Pi] MeijerG[{{}, {1, 1, 1}}, {{-1, 0, 0, 
      0}, {}}, -I \[Pi]] - \[Pi]^2 MeijerG[{{}, {1, 1, 1, 1}}, {{-2, 
      0, 0, 0, 0}, {}}, -I \[Pi]] + 
  I \[Pi]^3 MeijerG[{{}, {1, 1, 1, 1, 1}}, {{-3, 0, 0, 0, 0, 
      0}, {}}, -I \[Pi]] + \[Pi]^4 MeijerG[{{}, {1, 1, 1, 1, 1, 
      1}}, {{-4, 0, 0, 0, 0, 0, 0}, {}}, -I \[Pi]] - 
  I \[Pi]^5 MeijerG[{{}, {1, 1, 1, 1, 1, 1, 1}}, {{-5, 0, 0, 0, 0, 0, 
      0, 0}, {}}, -I \[Pi]]]

Out[16]= 0.070776 - 0.0473807 I

So now we have sum and integral notation for both the MRB and MKB constants.

enter image description here

In[135]:= 
f[n_] := MeijerG[{{}, 
   Table[1, {n + 1}]}, {Prepend[
    Table[0, n + 1], -n + 1], {}}, -I \[Pi]];

In[144]:= N[Sum[(I/\[Pi])^(1 - n) f[n], {n, 1, 16}]]

Out[144]= 0.070776 - 0.0473806 I

More code and how well it works is at the bottom of this cloud notebook.

Here is the Notebook I used to discover it.

I finally computed 200,000 digits of the MKB constant (0.070776 - 0.684 I...) Started ‎Saturday, ‎May ‎15, ‎2021, ‏‎10 : 54 : 17 AM, and finished 9:23:50 am EDT | Friday, August 20, 2021, for a total of 8.37539*10^6 seconds or 96 days 22 hours 29 minutes 50 seconds.

The full computation, verification to 100,000 digits, and hyperlinks to various digits are found below at 200k MKB A.nb. The code was

g[x_] = x^(1/x); u := (t/(1 - t)); Timing[
 MKB1 = (-I Quiet[
      NIntegrate[(g[(1 + u I)])/(Exp[Pi u] (1 - t)^2), {t, 0, 1}, 
       WorkingPrecision -> 200000, Method -> "DoubleExponential", 
       MaxRecursion -> 17]] - I/Pi)]

I have 2 other codes running to verify all 200,000 digits.

Attachments:

I presented M1 and M2 in the above messages. Some of the formulae mentioned below are new ones for M2 (part 1) as mentioned in the immediately previous message and M1 (part2-i/Pi). enter image description here

we look at formulas previously used for the MKB constant.

The following subtle changes transform M2 to M1.

Wolfram Notebook updated with the new version of the miraculous algorithm on 6/16/2021.

Here is the improvement we get from using i f(i t) as an integrand from 0 to infinity vs the Exp[I Pi t] g[t].

New speed records up to 40k digits.

enter image description here

test3 is M1. M1 +2i/pi = M2 (the result from method 2). This is a great proof of the accuracy of those digits!

All worked out at

https://www.wolframcloud.com/obj/bmmmburns/Published/MKB%20fI.nb

That includes a check of 100K digits, its time computed by the new version of the miraculous algorithm. See "I computed and confirmed 100,000 digits of the MKB constant" above for where the 100K digits were first computed and confirmed the first time.

Since the MKB constant comes from an oscillating integral, I thought about naming the convergent M2.

Although the MKB constant is slow to converge, I did discover the following fast integral formula for it.

According to Wikipedia, improper integrals like that of the MKB constant can be transformed into proper ones by enter image description here.

So we have the following.

enter image description here

   g[x_] = x^(1/x); Timing[
   MKB = NIntegrate[Exp[I Pi t] (g[t]), {t, 1, Infinity}, 
      WorkingPrecision -> 100]
     - I/Pi];



    Timing[
   MKB - (-I NIntegrate[(g[(1 + t I)])/( Exp[Pi t]), {t, 0, Infinity}, 
        WorkingPrecision -> 51] - I/Pi)]

{0.078125, 0.10^-52 - 2.10^-51 I}

    u := (t/(1 - t));Timing[
   MKB - (-I NIntegrate[(g[(1 + u I)])/( Exp[Pi u] (1 - t)^2), {t, 0, 
         1}, WorkingPrecision -> 51] - I/Pi)]

{0.140625, 0.10^-52 - 2.10^-51 I}

Here is what the region of the proper integral's function looks like.

g[x_]=x^(1/x);u:=(t/(1-t));Plot[{Re[-I(g[(1+u I)])/( Exp[Pi u](1-t)^2)-I/Pi],Im[-I(g[(1+u I)])/( Exp[Pi u](1-t)^2)-I/Pi]},{t,0,1},TicksStyle->Directive[FontSize->6],Ticks->{0,1/4,1/2,3/4,1},PlotLabels->"Expressions",PlotStyle->{Red,Blue},PlotRange->{-2,.3}]

enter image description here

In[24]:= N[{Re[MKB],Im[MKB]}]

Out[24]= {0.070776,-0.684}

This gives some improvement on timings, as shown below.

Timing[MKB = (-I NIntegrate[(g[(1 + t I)])/( Exp[Pi t]), {t, 0, 
        Infinity}, WorkingPrecision -> 1000, MaxRecursion -> 11] - 
     I/Pi)][[1]]

82.296875

u := (t/(1 - t)); Timing[
 MKB - (-I NIntegrate[(g[(1 + u I)])/( Exp[Pi u] (1 - t)^2), {t, 0, 
       1}, WorkingPrecision -> 1250, Method -> "DoubleExponential"] - 
    I/Pi)]

{8.046875, 0.10^-1001 + 0.10^-1001 I}

I will follow up on this soon.

EDIT

The following notebook was completed in V 12.1 to show the precise differences in the computed integrals. V12.2 doesn't show that detail.

I tried to make sure Mathematica did not use the same formula for any of the last 3 integrals, so that any 2 of them combined may be sufficient to prove the accuracy of a calculation of the MKB constant digits.

MaxRecursion guide

     max digits M.R.   

       1309  default
       2410      10
       4453      11   
       8275      12
       15442     13
       28932     14
    54286          15
   102600          16
   193914          17

I am presently computing 200,000 digits from the following 2 different codes from the cyan (light blue)-colored methods mentioned above. They should agree to, and prove to be accurate 193,914 digits.

g[x_] = x^(1/x); t = (Timing[
    test = -(I NIntegrate[(g[(1 + t I)]) (Exp[-Pi t]), {t, 0, 
           Infinity}, WorkingPrecision -> 200000, 
          Method -> "Trapezoidal", MaxRecursion -> 17] + 
        I/Pi)])[[1]]; Print["Timing for calculation=", t]

and

g[x_] = x^(1/x); u := (t/(1 - t)); Timing[
 MKB1 = (-I Quiet[
      NIntegrate[(g[(1 + u I)])/(Exp[Pi u] (1 - t)^2), {t, 0, 1}, 
       WorkingPrecision -> 200000, Method -> "DoubleExponential", 
       MaxRecursion -> 17]] - I/Pi)]

left=right

Using this new, fast method, I computed and proved to be correct 64,000 digits of the MKB constant

!

The computation time for the original calculation was 784,937 seconds, 9.08492 days. The computation time for the check was 900,860 seconds,10.42662 days. See attached "64k MKB proven.nb" for the work and digits.

The code for the calculation:

g[x_] = x^(1/x); t = 
 Timing[MKB64k = -(I NIntegrate[(g[(1 + t I)])/(Exp[Pi t]), {t, 0, 
          Infinity}, WorkingPrecision -> 64000, 
         Method -> "Trapezoidal", MaxRecursion -> 16] + I/Pi)][[1]];
t



DateString[]

The formula for the check: right

The code for the check:

g[x_] = x^(1/x); t = (Timing[
    test2 = (1/Pi  NIntegrate[
         g'[1 + I t] Exp[-Pi t], {t, 0, Infinity}, 
         WorkingPrecision -> 64000, Method -> "Trapezoidal", 
         MaxRecursion -> 16] - 2 I/Pi)])[[
  1]]; Print["Timing for verification=", t];

The code for the comparison:

  MKB64k - test2

 (* 0.*10^-64000 + 0.*10^-64000 I *)

Here are the new speed records

digits       seconds
2000        23
3000        96
4000       165
5000        442
6000        623
10000      3250
40000      175,551=49  hours
64000      784,937=218  hours, half a day longer than the 35,000 using the long code.

The 35,000 digit computation finished on Sun 14 Jun 2015 06:52:29, taking 727,844 seconds, 8.42412 days.

Attachments:

Here is part of the reason this new method of computing the MKB constant is so productive.

The integrated of enter image description here

is extremely oscillatory and does not converge.

Here is its plot:

g[x_]=x^(1/x); ReImPlot[Exp[Pi I x] g[x], {x, 1, 20}]

enter image description here

I said it does not converge because

g[x_] = x^(1/x); Limit[Exp[Pi I x] g[x], x -> Infinity]

gives Indeterminate.

On the other hand, the plot of the converging integrand we are now using to compute more digits looks like this. ReImPlot[Exp[-Pi t] g'[1 + I t], {t, 1, 20}] enter image description here And the verification formula looks like this. ReImPlot[Exp[-Pi t] g'[1 + I t], {t, 1, 20}] enter image description here

I said it is convergent because

g[x_] = x^(1/x); Limit[Exp[-Pi t] g'[1 + I t], t -> Infinity]

gives 0.

On Tue 6 Apr 2021 04:13:58, I computed 64,000 digits of the MKB constant using the following code.

g[x_] = x^(1/x); t = 
 Timing[t64k = -(I NIntegrate[(g[(1 + t I)])/(Exp[Pi t]), {t, 0, 
          Infinity}, WorkingPrecision -> 64000, 
         Method -> "Trapezoidal", MaxRecursion -> 15] + I/Pi)][[1]];
t
(*393847*)

I verified it to 40,000 digits, See attached 64KMKB.nb.

Later I found it was accurate only to 54,390 decimal places.

Attachments:

Here is proof of the faster integral I'm using is indeed exactly equal to the MKB constant integral. In the following hypothesis, the MKB constant integral=LHS and the faster integral I'm using=RHS.

g(x)=x^(1/x), M1=hypothesis Which is the same as

enter image description here because Changing the upper limit to 2N + 1 increases MI by 2i/π.

by Ariel Gershon.

Iimofg->1

Cauchy's Integral Theorem

Lim surface h gamma r=0

Lim surface h beta r=0

limit to 2n-1

limit to 2n-

Plugging in equations [5] and [6] into equation [2] gives us:

leftright

Now take the limit as N→∞ and apply equations [3] and [4] : QED He went on to note that

enter image description here

I found the 64,000 digit computation was accurate only to 54,390 decimal places; see attached 54390 confirmed MKB digits.nb.

The new recommended setting for MaxRecursion (M.R.), as hypothesized, is found in the following table. It starts out at digits around 2^(M.R.+1).

       digits    M.R.   
      1309  default
      2410      10
      4453      11    
      8182      12
      19734     13
      31286     14
      54390     15
Attachments:

Today I followed a lots of links about your work on internet. And this is the first time I post in Mathematica community! Since I very interested in your efforts, I wish to become a successful man like you in mathematics so that my name remains eternal ... My dear friend Marvin Ray Burns. Your sincerely, Fereydoon Shekofte

@Fereydoon Shekofte: All it takes to leave a legacy is to keep planting seeds! A million baby steps >a mile.

I found out how to verify my MKB constant calculations beyond any shadow of a doubt. Use one iteration of partial integration, because for g(x)=x^(1/x),

enter image description here.

The following computation will show that the calculation was right by leaving a small error.

g[x_] = x^(1/x); t = (Timing[
    test = -(I NIntegrate[(g[(1 + t I)]) ( Exp[-Pi t]), {t, 0, 
           Infinity}, WorkingPrecision -> 2410, 
          Method -> "Trapezoidal", MaxRecursion -> 10] + I/Pi)])[[
  1]]; Print["Timing for calculation=", t]; t = (Timing[
    test2 = (1/Pi  NIntegrate[
         g'[1 + I t] Exp[-Pi t], {t, 0, Infinity}, 
         WorkingPrecision -> 2410, Method -> "Trapezoidal", 
         MaxRecursion -> 10] - 2 I/Pi)])[[
  1]]; Print["Timing for verification=", t]; err = 
 test - test2; Print["Error=", N[err, 20]]
(*Timing for calculation=48.0927

Timing for verification=69.4713

Error=-1.*10^-2410-1.03*10^-2408 I*)

The following will show that the calculation was wrong by leaving a large error.

g[x_] = x^(1/x); t = (Timing[
    test = -(I NIntegrate[(g[(1 + t I)]) ( Exp[-Pi t]), {t, 0, 
           Infinity}, WorkingPrecision -> 2410, 
          Method -> "Trapezoidal", MaxRecursion -> 9] + I/Pi)])[[
  1]]; Print["Timing for calculation=", t]; t = (Timing[
    test2 = (1/Pi  NIntegrate[
         g'[1 + I t] Exp[-Pi t], {t, 0, Infinity}, 
         WorkingPrecision -> 2410, Method -> "Trapezoidal", 
         MaxRecursion -> 9] - 2 I/Pi)])[[
  1]]; Print["Timing for verification=", t]; err = 
 test - test2; Print["Error=", N[err, 20]]

(* Timing for calculation=14.375
Timing for verification=18.7344
Error=-1.21910183828457949*10^-1311-1.6392815749781077289*10^-1309 I*)

The following proves that MaxRecursion -> 12 is good for calculating and verifying at least 8192 digits.

Compute 8192 with MaxRecursion -> 12

g[x_] = x^(1/x); t = (Timing[
    test = -(I NIntegrate[(g[(1 + t I)]) ( Exp[-Pi t]), {t, 0, 
           Infinity}, WorkingPrecision -> 8192, 
          Method -> "Trapezoidal", MaxRecursion -> 12] + I/Pi)])[[
  1]]; Print["Timing for calculation=", t]
   (*Timing for calculation=1111.69*)

Verify 8192 with MaxRecursion -> 12

g[x_] = x^(1/x); t = (Timing[
    test2 = (1/Pi NIntegrate[g'[1 + I t] Exp[-Pi t], {t, 0, Infinity},
          WorkingPrecision -> 8192, Method -> "Trapezoidal", 
         MaxRecursion -> 12] - 2 I/Pi)])[[
  1]]; Print["Timing for verification=", t]; err = 
 test - test2; Print["Error=", N[err, 20]]
(*Timing for verification=1419.66

Error=0.*10^-8193+0.*10^-8193 I*)

As time allows, I will post what all this parity-check has to say to confirm or unconfirm my latest table of recommended MaxRecursions (M.R.).

       digits    M.R.   
      1309  default
      2410      10
      4453      11    
      8182      12
      19734     13
      31286     14
      54390     15
      65942     16
      77494     17
      89046     18

We see that 4453 11

is confirmed, although the real part converges to a slightly higher magnitude:

g[x_] = x^(1/x); t = (Timing[
    test = -(I NIntegrate[(g[(1 + t I)]) (Exp[-Pi t]), {t, 0, 
           Infinity}, WorkingPrecision -> 5000, 
          Method -> "Trapezoidal", MaxRecursion -> 11] + 
        I/Pi)])[[1]]; Print["Timing for calculation=", t]; t = \
(Timing[test2 = (1/Pi NIntegrate[
         g'[1 + I t] Exp[-Pi t], {t, 0, Infinity}, 
         WorkingPrecision -> 5000, Method -> "Trapezoidal", 
         MaxRecursion -> 11] - 
       2 I/Pi)])[[1]]; Print["Timing for verification=", t]; err = 
 test - test2; Print["Error=", N[err, 20]]



Timing for calculation=230.391



Timing for verification=299.469

Error=2.8146045128793867*10^-4456+1.6474663184374133246*10^-4453 I

As for MaxRecursion -> 12 where the R.M. table shows up to 8182 digits, r.e.

      8182      12.

Actual inspection from this method shows it is possible to get all the way up to 8278 accurate digits of the real part and 8275 of the imaginary. That is the same difference that exists from it and 35,000 digits computed by a totally different method.

So

      8182      12.

should say

      8275      12.

Here is the work for the verification:

g[x_] = x^(1/x); t = (Timing[
    test = -(I NIntegrate[(g[(1 + t I)]) (Exp[-Pi t]), {t, 0, 
           Infinity}, WorkingPrecision -> 10000, 
          Method -> "Trapezoidal", MaxRecursion -> 12] + 
        I/Pi)])[[1]]; Print["Timing for calculation=", t]; t = \
(Timing[test2 = (1/Pi NIntegrate[
         g'[1 + I t] Exp[-Pi t], {t, 0, Infinity}, 
         WorkingPrecision -> 10000, Method -> "Trapezoidal", 
         MaxRecursion -> 12] - 
       2 I/Pi)])[[1]]; Print["Timing for verification=", t]; err = 
 test - test2; Print["Error=", N[err, 20]]



Timing for calculation=1764.03



Timing for verification=2247.2

Error=-7.2028204961753149*10^-8278-8.0907462882284574618*10^-8275 I

As for MaxRecursion -> 13 where the R.M. table shows up to 8182 digits, r.e.

      19734      12.

Actual inspection from this method shows it is possible to get all the way up to 15444 accurate digits of the real part and 15442 of the imaginary. That is the same difference that exists from it and 35,000 digits computed by a totally different method.

So

      19734      13

should say

      15442      13.

Here is the work for the verification:

g[x_] = x^(1/x); t = (Timing[
    test = -(I NIntegrate[(g[(1 + t I)]) (Exp[-Pi t]), {t, 0, 
           Infinity}, WorkingPrecision -> 20000, 
          Method -> "Trapezoidal", MaxRecursion -> 13] + 
        I/Pi)])[[1]]; Print["Timing for calculation=", t]; t = \
(Timing[test2 = (1/Pi NIntegrate[
         g'[1 + I t] Exp[-Pi t], {t, 0, Infinity}, 
         WorkingPrecision -> 20000, Method -> "Trapezoidal", 
         MaxRecursion -> 13] - 
       2 I/Pi)])[[1]]; Print["Timing for verification=", t]; err = 
 test - test2; Print["Error=", N[err, 20]]



Timing for calculation=11440.4



Timing for verification=14435.1

Error=1.269166151550935283*10^-15444-1.34038091454473637998*10^-15442 I

Through actual inspection the next row is

           28932   14.

More to come. But so far through actual inspection, we have the following.

        digits    M.R.   
       1309  default
       2410      10
       4453      11   
       8275      12
       15442     13
       28932     14

So far, the table gives a clear-cut pattern:

            digits     M.R.
1309*1.84 ~=2410         10 
2410*1.85~=4453          11
4453*1.86~=8275          12
8275*1.87~=15442         13
15442*1.875~= 28932      14

Following the growth with an eye on our experience were we proved the next row is

               54286          15

we get

            digits         M.R.

 28932*1.88~=54286          15
54286*1.89~=102600          16

March 30, 2021

I finally computed 40,000 digits of the MKB constant!!!!!

(March 30, 2021, approximately 8:00 am) The new 40,000 digit record took 362945 seconds, while the 35,000 digits old record took 727,844 seconds. That's more 2.29 times as fast: (40000/362945)/(35000/727844.) = 2.291867126660277. See attached first 40 K MKB.nb and 35KMKB (1).nb

Here is the short, very fast code.

g[x_] = x^(1/x); t = (Timing[
    test = -(I NIntegrate[(g[(1 + t I)])/(Exp[Pi t]), {t, 0, 
           Infinity}, WorkingPrecision -> 40000, 
          Method -> "Trapezoidal", MaxRecursion -> 18] + I/Pi)])[[1]];
t

The recommended setting for MaxRecursion (M.R.) is found in the following table.

digits     M.R.
2048      10
3000      11
4096      12

10000     13
40000     18

40000/2048+9 Here are the new speed records

digits       seconds
2000        23
3000        96
4000       165
5000        442
6000        623
10000      3250
40000      362945=101 hours

Documentation is available from the Wolfram Cloud here. (40,000 digits are saved at the bottom by the name of "test.") Here is a redo of the 10K run, where "test" is 40,000 digits of which 35,000 have been computed by very different methods.

 g[x_] =  x^(1/x); t = (Timing[ t10k = -(I NIntegrate[(g[(1 + t I)])/(Exp[Pi t]), {t, 0,  Infinity}, WorkingPrecision -> 10000,  Method -> "Trapezoidal", MaxRecursion -> 13] + I/Pi)])[[1]];t


 (*3250.55*)

 N[test - t10k, 10000]

  (* 0.*10^-10001 + 0.*10^-10001 I*)

"Thu 1 Apr 2021 11:42:14" I computed a much faster 40,000 digits of the MKB constant.

g[x_] = x^(1/x); t = (Timing[
test3 = -(I NIntegrate[(g[(1 + t I)])/(Exp[Pi t]), {t, 0, 
Infinity}, WorkingPrecision -> 40000, 
Method -> "Trapezoidal", MaxRecursion -> 15] + I/Pi)])[[1]];

175,551seconds That's more 473% as fast as the old 35,000 digit record!!!: (40000/175551)/(35000/727844.)=4.738347911921403

Here are the new speed records

digits       seconds
2000        23
3000        96
4000       165
5000        442
6000        623
10000      3250
40000      175551=49  hours

I made a quicker program for calculating the digits of the MKB constant in V12.1.0 enter image description here

Module[{$MaxExtraPrecision = 200, sinplus1, cosplus1, middle, end, a, 
  b, c, d, g, h}, prec = 5000; f[x_] = x^(1/x);
  Print[DateString[]];
  Print[T0 = SessionTime[]];

   d = Ceiling[0.264086 + 0.00143657 prec];
  h[n_] := 
    Sum[StirlingS1[n, k]*
        Sum[(-j)^(k - j)*Binomial[k, j], {j, 0, k}], {k, 1, n}];
  h[0] = 1;
  g = 2 I/Pi - Sum[-I^(n + 1) h[n]/Pi^(n + 1), {n, 1, d}];
  sinplus1 := Module[{},
     NIntegrate[
       Simplify[Sin[Pi*x]*D[f[x], {x, d + 1}]], {x, 1, Infinity}, 
       WorkingPrecision -> prec*(105/100), 
       PrecisionGoal -> prec*(105/100)]];
  cosplus1 := Module[{},
     NIntegrate[
       Simplify[Cos[Pi*x]*D[f[x], {x, d + 1}]], {x, 1, Infinity}, 
       WorkingPrecision -> prec*(105/100), 
       PrecisionGoal -> prec*(105/100)]];
  middle := Module[{}, Print[SessionTime[] - T0, " seconds"]];
  end := Module[{}, Print[SessionTime[] - T0, " seconds"];
      Print[N[Sqrt[a^2 - b^2], prec]]; Print[DateString[]]];
  If[Mod[d, 4] == 0, 
    Print[N[a = -Re[g] - (1/Pi)^(d + 1)*sinplus1, prec]];
    middle;
    Print[N[b = -I (Im[g] - (1/Pi)^(d + 1)*cosplus1), prec]];
    end];
  If[Mod[d, 4] == 1, 
    Print[N[a = -Re[g] - (1/Pi)^(d + 1)*cosplus1, prec]];
    middle;
    Print[N[b = -I (Im[g] + (1/Pi)^(d + 1)*sinplus1), prec]]; end];
  If[Mod[d, 4] == 2, 
    Print[N[a = -Re[g] + (1/Pi)^(d + 1)*sinplus1, prec]];
    middle;
    Print[N[b = -I (Im[g] + (1/Pi)^(d + 1)*cosplus1), prec]];
    end];
  If[Mod[d, 4] == 3, 
    Print[N[a = -Re[g] + (1/Pi)^(d + 1)*cosplus1, prec]];
    middle;
    Print[N[b = -I (Im[g] - (1/Pi)^(d + 1)*sinplus1), prec]];
    end];]

Whether it will allow me to calculate more digits is a question that will be answered in a week or two.

Here is a comparison of timings on similar computers.

 digits    seconds

                                              (Impoved code)
             V10.3       v11.3   V12.0         V12.1 
 2000       256            67      67           58
 3000       794           217     211          186
 4000       1633          514     492          447
 5000       2858          1005    925          854
 10000      17678         8327    7748        7470
 20000      121431       71000   66177
 30000      411848      ?        229560

Seethe following cloud notebook for the results from my improved code. https://www.wolframcloud.com/obj/bmmmburns/Published/2nd%2040k%20mkb%20prep.nb

Here is a comparison between some of the last few versions of Mathematica computing the MKB constant on similar computers.

digits    seconds
            V10.3       v11.3   V12.0
2000       256            67      67
3000       794           217     211
4000       1633          514     492
5000       2858          1005    925
10000      17678         8327    7748
20000      121431       71000   66177
30000      411848      ?        229560

For documentation of the 229560 seconds 30000 digit computation see "mkb 30k v12p0 2020.nb."

For documentation of the 411848 seconds 30000 digit computation see "MKB30K2 (1).nb."

Shutterstock has found the MKB constant, I(2N), at least 2 times! enter image description here enter image description here

enter image description here

June 5, 2018

Mathematica got hung up on the 40k run again! this time it complained about the dynamics stopping working and wouldn't quit complaining. I think it needs a smarter program! Anyone else want to try to beat this world record??

My computer is getting so sluggish that it has become nearly impossible to get snippets of RAM use! I was able to determine that it is, however, still working on the 40,000 digits. I'll let it do its job!

You might get tired of hearing this, but I made another improvement to my MKB computation formula and am trying to get 40,000 digits from it.

Code

 MaxMemoryUsed[(*Other program:For large calculations.Tested for \
 1000-35000 digits-- see post at \
 http://community.wolfram.com/groups/-/m/t/366628?p_p_auth=KA7y1gD4 \
 and search for "analog" to find pertinent replies.Designed to include \
 40000 digits.A157852 is saved as c,the real part as a and the \
 imaginary part as b.*)
  Block[{$MaxExtraPrecision = 200}, 
   prec = 40000(*Replace 40000 with number of desired digits.40000 \
 digits should take two weeks on a 3.5 GH Pentium processor.*);
   f[x_] = x^(1/x);
   ClearAll[a, b, h];
   Print[DateString[]];
   Print[T0 = SessionTime[]];
   If[prec > 35000, d = Ceiling[0.264086 + 0.0019 prec], 
    d = Ceiling[0.264086 + 0.00143657 prec]];
   h[n_] := 
    Sum[StirlingS1[n, k]*
      Sum[(-j)^(k - j)*Binomial[k, j], {j, 0, k}], {k, 1, n}];
   h[0] = 1;
   g = 2 I/Pi - Sum[-I^(n + 1) h[n]/Pi^(n + 1), {n, 1, d}];
   sinplus1 := 
    NIntegrate[
     Simplify[Sin[Pi*x]*Simplify[D[f[x], {x, d + 1}]]], {x, 1, 
      Infinity}, WorkingPrecision -> prec*(105/100), 
     PrecisionGoal -> prec*(105/100)];
   cosplus1 := 
    NIntegrate[
     Simplify[Cos[Pi*x]*Simplify[D[f[x], {x, d + 1}]]], {x, 1, 
      Infinity}, WorkingPrecision -> prec*(105/100), 
     PrecisionGoal -> prec*(105/100)];
   middle := Print[SessionTime[] - T0, " seconds"];
   end := Module[{}, Print[SessionTime[] - T0, " seconds"];
     Print[c = Abs[a + b]]; Print[DateString[]]];
   If[Mod[d, 4] == 0, 
    Print[N[a = -Re[g] - (1/Pi)^(d + 1)*sinplus1, prec]];
    middle;
    Print[N[b = -I (Im[g] - (1/Pi)^(d + 1)*cosplus1), prec]];
    end];
   If[Mod[d, 4] == 1, 
    Print[N[a = -Re[g] - (1/Pi)^(d + 1)*cosplus1, prec]];
    middle;
    Print[N[b = -I (Im[g] + (1/Pi)^(d + 1)*sinplus1), prec]]; end];
   If[Mod[d, 4] == 2, 
    Print[N[a = -Re[g] + (1/Pi)^(d + 1)*sinplus1, prec]];
    middle;
    Print[N[b = -I (Im[g] + (1/Pi)^(d + 1)*cosplus1), prec]];
    end];
   If[Mod[d, 4] == 3, 
    Print[N[a = -Re[g] + (1/Pi)^(d + 1)*cosplus1, prec]];
    middle;
    Print[N[b = -I (Im[g] - (1/Pi)^(d + 1)*sinplus1), prec]];
    end];] (*Marvin Ray Burns,Aug 06 2015*)]

Output so far:

Fri 18 May 2018 08:03:35

65.6633081

Here are the results from the task manager:

enter image description here

Attachments:
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract