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}$$
sum(k=1,n,prod(q=3,2*k,if((2*k)%q==0,(q-1)/(q-2),1)))
.n=7;sum(..)
=547/40
,n=17;sum(..)
=18037309/480480
, this true calculations? $\endgroup$prime(q)
return q-th prime. Then is truen=7;sum(k=1,n,prod(q=3,2*k,if(isprime(q)&(2*k)%q==0,(q-1)/(q-2),1)))
=143/15
,n=17;sum(..)
=11881/495
? $\endgroup$