OFFSET
1,1
COMMENTS
LINKS
Hugo Pfoertner, Table of n, a(n) for n = 1..12135
Wikipedia, Twin prime, First Hardy-Littlewood conjecture.
Marek Wolf, The Skewes number for twin primes: counting sign changes of pi_2(x)-C_2 Li_2(x), arXiv:1107.2809 [math.NT], 14 Jul 2011.
PROG
(PARI) halicon(h) = {my(w=Set(vecsort(h)), n=#w, wmin=vecmin(w), distres(v, p)=#Set(v%p)); for(k=1, n, w[k]=w[k]-wmin); my(plim=nextprime(vecmax(w))); prodeuler(p=2, plim, (1-distres(w, p)/p)/(1-1/p)^n) * prodeulerrat((1-n/p)/(1-1/p)^n, 1, nextprime(plim+1))}; \\ k-tuple constant
Li(x, n)=intnum(t=2, n, 1/log(t)^x); \\ logarithmic integral
a347278(nterms, CHL)={my(n=1, pprev=1, np=0); forprime(p=5, , if(p%6!=1&&ispseudoprime(p+2), n++; L=Li(2, p); my(x=n/L-CHL); if(x*pprev>0, if(pprev>0, print1(p, ", "); np++; if(np>nterms, return)); pprev=-pprev)))};
a347278(10, halicon([0, 2])) \\ computing 30 terms takes about 5 minutes
CROSSREFS
KEYWORD
nonn
AUTHOR
Hugo Pfoertner, Aug 26 2021
STATUS
approved