/**************** A. LANGUASCO & A. ZACCAGNINI *********************** ************* COMPUTATION OF THE MERTENS CONSTANTS B(q,a) MOD q; 3 <= q<= 100 ******* ************* WITH A PRECISION OF AT LEAST 100 DECIMAL DIGITS ***************** *******************************************************************************/ /****************************************************************************** ***** The results are collected in a matrix named MBmatrix.gp ************ ***** every row contains q, a, B(q,a), number of correct digits ************ ***** for a fixed q>=3, the starting row for the B(q,a)s is detected ******** ***** with the q-component of the vector position which is precomputed ****** ***** The value corresponding to q=2 is inserted as ************ ***** B(2,1) = B - log(1/2) - 1/2; B = Meissel-Mertens constant *** ***** The results of this control are printed on a file ************ ***** named Bsumcheckresults.txt ************ *******************************************************************************/ {checksMB() = local(MB, position, div, q2, q1, j, n, ndiv,a, factors,nfactors, l, i0, phiq1,phiq2,digitprecision,flagerror,counter); position=vector(100); position[1]=0; position[2]=1; \\ REMARK: B(2,1) = B - log(1/2) - 1/2; B = Meissel-Mertens constant position[3]=2; for (q=4,100, position[q]=position[q-1]+eulerphi(q-1)); \\write("~/Bsumcheckresults.txt",position); \\ input of the constants MB=read("~/MBmatrix.gp"); default(realprecision,120); \\ REMARK: in this verification we admit a precision of 100 decimal digits digitprecision=100; print("****** A. LANGUASCO & A. ZACCAGNINI *******"); write("~/Bsumcheckresults.txt","****** A. LANGUASCO & A. ZACCAGNINI *******"); print("****** VERIFICATION FOR 4 <= q <= 100 *******"); write("~/Bsumcheckresults.txt","****** VERIFICATION FOR 4 <= q <= 100 *******"); \\print("****** REMARK: B(2,1) = B - log(1/2) - 1/2; B = Meissel-Mertens constant *******"); \\write("~/Bsumcheckresults.txt","****** REMARK: B(2,1) = B - log(1/2) - 1/2; B = Meissel-Mertens constant *******"); print("******************* START CHECK ********************"); write("~/Bsumcheckresults.txt","******************* START CHECK ********************"); write("~/Bsumcheckresults.txt","**************************"); flagerror=0; counter=0; for (q2=4,100, phiq2=eulerphi(q2); div=divisors(q2); factors=factor(q2); nfactors=length(factors[,1]); ndiv=length(div); \\if (div[2]==2,i0=1,i0=0); i0=0; for (i=2+i0, ndiv-1, q1=div[i]; phiq1=eulerphi(q1); n=q2\q1; for (a = 1, q1, if (gcd(a,q1)==1, counter=counter+1; write("~/Bsumcheckresults.txt","The constant B(",q1,",",a,")", " has to be equal to the sum of: "); P=0; for(j=0,n-1, if (gcd(a+j*q1,q2)==1, for (i=1, phiq2, if (MB[position[q2]+i-1,2]==(a+j*q1)%q2, P=P+MB[position[q2]+i-1,3]; write("~/Bsumcheckresults.txt","B(",q2,",",(a+j*q1)%q2,") = ",MB[position[q2]+i-1,3]); ); ); ); ); for (l=1, nfactors, p=factors[l,1]; if ((p-a)%q1==0, P=P+log(1-1/p)+1/p; write("~/Bsumcheckresults.txt","And of the summand: ",1/p); ) ); write("~/Bsumcheckresults.txt","Their sum is = ",P); u=1; for(i=1, phiq1, if (MB[position[q1]+i-1,2]==a, write("~/Bsumcheckresults.txt","The constant B(",q1,",",a,")"," is = ", MB[position[q1]+i-1,3]); diff = P-MB[position[q1]+i-1,3]; write("~/Bsumcheckresults.txt","The difference (constant-sum) is = ", diff); write("~/Bsumcheckresults.txt","**************************"); if (abs(diff)>10^(-digitprecision), flagerror=1; write("~/Bsumcheckresults.txt","**************************"); write("~/Bsumcheckresults.txt","ERROR: less than ",digitprecision," digits are correct"); write("~/Bsumcheckresults.txt","**************************")); ); ); ); ); ); ); write("~/Bsumcheckresults.txt","**************************************************"); if (flagerror==0, print("We built and checked n. ", counter, " possible relationships between the given constants"); print("All the results are correct with a precision of at least ",digitprecision," decimal digits"); write("~/Bsumcheckresults.txt","We built and checked n. ", counter, " possible relationships between the given constants"); write("~/Bsumcheckresults.txt","All the results are correct with a precision of at least ",digitprecision," decimal digits"), print("ERROR: At least one result has not the prescribed precision of more than ",digitprecision," decimal digits"); write("~/Bsumcheckresults.txt","ERROR: At least one result has not the prescribed precision of more than ", digitprecision," decimal digits"); ); print("******************* END CHECK ********************"); write("~/Bsumcheckresults.txt","******************* END CHECK ********************"); return(); } /****************** ? checksMB() ****** A. LANGUASCO & A. ZACCAGNINI ******* ****** VERIFICATION FOR 4 <= q <= 100 ******* ******************* START CHECK ******************** We built and checked n. 1907 possible relationships between the given constants All the results are correct with a precision of at least 100 decimal digits ******************* END CHECK ******************** **********************/