hermann on Sun, 24 Mar 2024 01:42:58 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Question on PARI/GP realprecision


I have not worked with realprecision until now.

In
https://oeis.org/A080076

it is stated that reciprocal Proth prime sum is in an interval:

Sum_{n>=1} 1/a(n) is in the interval (0.7473924793, 0.7473924795) (Borsos et al., 2022). - Amiram Eldar, Jan 29 2022

I used below script and did set realprecision to 1000.
Obviously the first 122,742 Proth primes are not sufficient to get into the range:

hermann@7950x:~$ gp -q oeis_proth_recsum.gp
reciprocal Proth prime sum is not in (0.7473924793, 0.7473924795):
0.747392390283847276905233728778897365896603278129441172984039555628675134986926871400876988392867149853132984334670328620233413784669874487269176289573215941528935352656588147628215694166722573660690963967266590178108333121169226622828678498041128278119202642599860497951002320883829559673258603773279446145974444490877874004250207998667639349505388617396774341933459319407416883763000568951557532138334271883764360586256800391255846721084895615384145351273421753313838136355028024193207357209297906416216690271993923201941740019910303655433203341726937120161098229512085746765158232227577394021390198244187691740378509281939201641929725157706467044158003683829257699957638597524529084945986874381662602652904453699498289995225448201814977034175967183116498483796211445848641295876876135242465982605822174420187048321540032440242381932386460366853031795136116642542085740097641001293661035615342569693803448526999835266292613513731374779747186013131504324520926325830427916966306029998509359830640
5338
hermann@7950x:~$


Biggest Proth prime P[122742] is:

? P=readvec("a080076.json.txt")[1];
? #P
122742
? P[#P]
1099489607681
? vecmax(P)
1099489607681
?


What PARI/GP realprecision is needed to correctly deal with this finite reciprocal sum?


P=extern("curl -s https://oeis.org/A080076/a080076.json.txt";);
default(realprecision,1000);
s=0.0;foreach(P,p,s+=1.0/p);
print1("reciprocal Proth prime sum is");
if(0.7473924793>s||0.7473924795<s,print1(" not"));
print(" in (0.7473924793, 0.7473924795):");
print(s);
quit


Regards,

Hermann.