/* Copyright (C) 2019 Alessandro Languasco */ /**************** A. LANGUASCO ******************** ************* COMPUTATION OF THE EULER KRONECKER CONSTANTS MOD q(PRIME) *******/ /******* Direct use of the pari/gp lfun functions *****/ {global_eulerkronecker_direct(r1,r2,defaultprecision)=local(minutes, millisec, seconds, rows, n,m,L,Seven,Sodd,q, G, chi, elaptimecomp); default(realprecision,defaultprecision); print("************ A. LANGUASCO *************"); print("********* COMPUTATION OF THE EULER-KRONECKER **********"); print("******* CONSTANTS IN ONE INTERVAL ********"); print("********* direct use of the lfun command **********"); r1=nextprime(r1); r2=precprime(r2); if (r1>r2, print("error: no odd primes in this interval. END PROGRAM");return); if (r1 < 3, r1=3); print("Interval=[",r1,",",r2,"]"); gettime(); forprime(q=r1,r2, Sodd=0; Seven=0; G= znstar(q, 1); for(m=2, q-1, chi=znconreychar(G,m); L=lfuncreate(Mod(m,q)); \\ defines L as the Dirichlet L-function associated with a non-trivial Dirichlet character (Conrey notation) if (zncharisodd(G,chi), Sodd+= lfun(L,1,1)/lfun(L,1), \\ computes the logarithmic derivative of L at 1 Seven+= lfun(L,1,1)/lfun(L,1)); ); print("EK(",q")^+ = ", real(Seven)+Euler); print("EK(",q,") = ",real(Sodd+Seven)+Euler); \\ final sum ); elaptimecomp=gettime(); seconds=floor(elaptimecomp/1000)%60; minutes=floor(elaptimecomp/60000); millisec=elaptimecomp- minutes*60000 - seconds*1000; print("Total computation time: ", minutes, " min, ", seconds, " sec, ", millisec, " millisec"); print("****** END PROGRAM ********"); } /************************************ **** RESULTS **** gp2.11.2 and gp2c0.0.11 compiled by myself, see below ******************* gp 2.11.2 on Dell Optiplex languasc@languasco1:~/Desktop/EK$ gp2c-run -pmy_ -g -W EK-direct-final.gp GP/PARI CALCULATOR Version 2.11.2 (released) amd64 running linux (x86-64/GMP-6.1.2 kernel) 64-bit version compiled: May 21 2019, gcc version 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04) threading engine: single (readline v7.0 enabled, extended help enabled) Copyright (C) 2000-2018 The PARI Group PARI/GP is free software, covered by the GNU General Public License, and comes WITHOUT ANY WARRANTY WHATSOEVER. Type ? for help, \q to quit. Type ?17 for how to get moral (and possibly technical) support. parisize = 8000000, primelimit = 500000 *************** Directly ************ ? init_EK_direct_final();global_eulerkronecker_direct(3,300,30) ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[3,293] EK(3)^+ = 0.577215664901532860606512090082 EK(3) = 0.945497280871680703239749994158 EK(5)^+ = 1.40489514161703774859755907976 EK(5) = 1.72062421251340476169572878865 EK(7)^+ = 1.95715645444971475271382186143 EK(7) = 2.08759407471733013281542471957 EK(11)^+ = 2.66207409890433174906654072453 EK(11) = 2.41542590428326783034287963583 EK(13)^+ = 2.89959572414790509559591203013 EK(13) = 2.61075773741765019699776108857 EK(17)^+ = 3.23179164885108167689200470642 EK(17) = 3.58197604409757765927178812919 EK(19)^+ = 3.36702810226943360422911738361 EK(19) = 4.79040941571428332590703936458 EK(23)^+ = 3.56605274186303485506490005633 EK(23) = 2.61128917618820092550739164964 EK(29)^+ = 3.77451272291818155837540505527 EK(29) = 3.09373170599426872316275179819 EK(31)^+ = 3.74063417131631765163927862231 EK(31) = 4.31444292526747509770757441042 EK(37)^+ = 3.88346103237113739135523493388 EK(37) = 4.30493818995760201798557926417 EK(41)^+ = 3.90067243331576039538420460289 EK(41) = 3.97152162792133216028257040014 EK(43)^+ = 4.37462848511375110150884874389 EK(43) = 4.37862750574695049413775062336 EK(47)^+ = 4.78330592374031492736088514964 EK(47) = 4.79939425890741613452758429988 EK(53)^+ = 4.06734814093911422415451881781 EK(53) = 4.33773685859709231869696082307 EK(59)^+ = 5.74977495098717868985714511291 EK(59) = 5.43351634538500398077634438193 EK(61)^+ = 4.71919160448137601223479232791 EK(61) = 5.07108519057651619595805098113 EK(67)^+ = 5.49478574409231087894450914285 EK(67) = 5.29213930662896260873428461831 EK(71)^+ = 5.02459221437013823603453457463 EK(71) = 5.25525819281894616772013128637 EK(73)^+ = 5.56638018904420607773144876527 EK(73) = 4.06694909044749529201648815625 EK(79)^+ = 4.31392816983842153234814442952 EK(79) = 4.99827631817068010789431392945 EK(83)^+ = 4.06119890648015486954960478374 EK(83) = 3.03313611343607418716403819105 EK(89)^+ = 5.44834851555434719261902953243 EK(89) = 4.16409079888983276880841110372 EK(97)^+ = 4.44563411256346738186380452664 EK(97) = 4.89124074040389666830751468857 EK(101)^+ = 5.93364557387726998305789899164 EK(101) = 5.29701289150966971887860032739 EK(103)^+ = 5.53312508630999898815400644939 EK(103) = 5.14433955125208822113330503220 EK(107)^+ = 5.35744691959596839332603590620 EK(107) = 5.45827420997024503421680245453 EK(109)^+ = 6.28639312060842026587282318484 EK(109) = 6.90663814626423653219469837704 EK(113)^+ = 4.71308052553071355344451609738 EK(113) = 4.02173038257803067578318006617 EK(127)^+ = 5.28427526641642291108714895825 EK(127) = 5.08859912415333449423215636240 EK(131)^+ = 4.29182422162389365669036230041 EK(131) = 2.83682634158837909860285797321 EK(137)^+ = 5.17281966401368126952267004684 EK(137) = 4.93700022614368468691962999711 EK(139)^+ = 5.15673467267785693456200640445 EK(139) = 5.88916863399867186726383730369 EK(149)^+ = 6.35744273145487616682151978517 EK(149) = 5.98342477769515981450242785739 EK(151)^+ = 5.66732269410388218441768644382 EK(151) = 5.04201611352872179914519461022 EK(157)^+ = 5.67766459100970078752076942990 EK(157) = 7.40802206572222729350845201390 EK(163)^+ = 5.54289611872522541669860167904 EK(163) = 5.92966482288720678755499913844 EK(167)^+ = 6.80394798958259907108839110755 EK(167) = 8.03300175268872470467583357802 EK(173)^+ = 4.74313680866654143318864467269 EK(173) = 3.38434753653206190344297798897 EK(179)^+ = 5.59074764196693719810304550344 EK(179) = 3.86236132549903008112126130282 EK(181)^+ = 5.52401113238735460988935254057 EK(181) = 5.14111848776848135810136664257 EK(191)^+ = 6.21621633683078754687889560801 EK(191) = 4.69286990201422664003552434812 EK(193)^+ = 6.33516880970302226248749231989 EK(193) = 5.16342219673915483320078262720 EK(197)^+ = 6.72431280547758930911931614898 EK(197) = 7.55148715896640647886485129372 EK(199)^+ = 4.97867314026834059118807347477 EK(199) = 6.47366513609320738699497459778 EK(211)^+ = 5.43928767077706865027592727891 EK(211) = 7.73613578424586162532810587585 EK(223)^+ = 6.97640718267880419790301145060 EK(223) = 7.81777971785991367471336734851 EK(227)^+ = 6.16478105833535800088839052312 EK(227) = 8.08053156951296218697071193757 EK(229)^+ = 5.19368182825228459062582716349 EK(229) = 7.16298632058099546745778115058 EK(233)^+ = 5.48268694035180653761326391137 EK(233) = 3.11948354485127541303115295258 EK(239)^+ = 4.89826038220509731091188200357 EK(239) = 3.99911017207833249512632297919 EK(241)^+ = 6.91099570349028181262249488655 EK(241) = 6.03752521401034215065709250935 EK(251)^+ = 5.85522475367262429906377535883 EK(251) = 5.04313708502347351042811119022 EK(257)^+ = 7.41413126491779482941571986652 EK(257) = 8.16991391232741391670225155227 EK(263)^+ = 6.88761891078185993452639437420 EK(263) = 7.30343624736815435414348077406 EK(269)^+ = 6.33572466741282346876839833227 EK(269) = 6.26034831666577102735252755712 EK(271)^+ = 4.91607375378349595312704873315 EK(271) = 5.97717804854803304223773905976 EK(277)^+ = 6.07306330239530923314413596279 EK(277) = 4.59280817714077895164777081661 EK(281)^+ = 4.99043740542558229612252801406 EK(281) = 4.66496432366211457505220852623 EK(283)^+ = 7.04969230270522888347459792033 EK(283) = 7.15028579741068251409225231188 EK(293)^+ = 5.12676122531917231941583293241 EK(293) = 3.38438152121953978658468259238 Total computation time: 0 min, 50 sec, 165 millisec ****** END PROGRAM ******** ? for(n=1,10,m=nextprime(n*10^3); init_EK_direct_final();global_eulerkronecker_direct(m,m,30)) ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[1009,1009] EK(1009)^+ = 6.27335408443221031721862501118 EK(1009) = 8.44213515184929927586069467274 Total computation time: 0 min, 13 sec, 892 millisec ****** END PROGRAM ******** ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[2003,2003] EK(2003)^+ = 6.99352586114139787466168421420 EK(2003) = 5.79342136907936332803849821625 Total computation time: 0 min, 38 sec, 918 millisec ****** END PROGRAM ******** ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[3001,3001] EK(3001)^+ = 8.64597006729841389989349765775 EK(3001) = 8.64746513696838693880234535092 Total computation time: 1 min, 10 sec, 241 millisec ****** END PROGRAM ******** ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[4001,4001] EK(4001)^+ = 8.78053800942307358728679938495 EK(4001) = 7.00343554620314399435685176843 Total computation time: 1 min, 48 sec, 168 millisec ****** END PROGRAM ******** ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[5003,5003] EK(5003)^+ = 7.24402247427910626344123306179 EK(5003) = 5.54929300458161422773687954041 Total computation time: 2 min, 35 sec, 256 millisec ****** END PROGRAM ******** ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[6007,6007] EK(6007)^+ = 9.87426664724257694868961234209 EK(6007) = 8.31161012199848381656290344038 Total computation time: 3 min, 21 sec, 650 millisec ****** END PROGRAM ******** ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[7001,7001] EK(7001)^+ = 9.68333277349107864470848805445 EK(7001) = 8.50527787610087713931687803847 Total computation time: 4 min, 6 sec, 591 millisec ****** END PROGRAM ******** ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[8009,8009] EK(8009)^+ = 11.4431421556247084876087109206 EK(8009) = 11.6868463915493575353450869960 Total computation time: 4 min, 59 sec, 740 millisec ****** END PROGRAM ******** ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[9001,9001] EK(9001)^+ = 9.48683888314549627674927600069 EK(9001) = 10.1094784318383409358225035802 Total computation time: 5 min, 55 sec, 646 millisec ****** END PROGRAM ******** ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[10007,10007] EK(10007)^+ = 11.0601624759024741933308283063 EK(10007) = 12.6646120045606923275389356783 Total computation time: 7 min, 11 sec, 560 millisec ****** END PROGRAM ******** ****************** larger q's ********************** ? init_EK_direct_final();global_eulerkronecker_direct(20011,20011,30) ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[20011,20011] EK(20011)^+ = 10.5489807692170969459672226221 EK(20011) = 10.7996803112999205186430402899 Total computation time: 20 min, 0 sec, 837 millisec ****** END PROGRAM ******** ? init_EK_direct_final();global_eulerkronecker_direct(30011,30011,30) ************ A. LANGUASCO ************* ********* COMPUTATION OF THE EULER-KRONECKER ********** ******* CONSTANTS IN ONE INTERVAL ******** ********* direct use of the lfun command ********** Interval=[30011,30011] EK(30011)^+ = 11.0127039500540893278498877674 EK(30011) = 10.3330799721240242255136062255 Total computation time: 37 min, 27 sec, 774 millisec ****** END PROGRAM *******/