is there any possibility to write and calculate this sum in pari gp, which is very related to hardy littlewood first conjecture?

88 Views Asked by At

I studied hardy littlewood first conjecture, which predicts the density of primes of special form, so:

if I want to know the number of the primes of the form $2kp+1$, where $p$ is prime and $p \leq x$, then, according to hardy littlewood first conjecture, it is about $$2c_2\frac{x}{\ln^2 x}\prod^{}_{2<q|2k}\frac{q-1}{q-2}$$ where $c_2$ is hardy littlewood twin primes constant,

Now, if I want to know the number of the primes of the form $2kp+1$ where $1 \leq k \leq n$, $p$ is prime, and $p \leq x$, then it will be about

$$2c_2\frac{x}{\ln^2 x} \sum^{n}_{k=1} \prod^{}_{2<q|2k}\frac{q-1}{q-2}$$

Now my question is, is there any possibility to write and calculate this sum in pari gp calculator $$\sum^{n}_{k=1} \prod^{}_{2<q|2k}\frac{q-1}{q-2}$$

1

There are 1 best solutions below

5
On BEST ANSWER

sum(k=1,n,prod(q=3,2*k,if(isprime(q)&(2*k)%q==0,(q-1)/(q-2),1)))

Examples:

n=7;sum(..)=143/15

n=17;sum(..)=11881/495