A238643 Number of primes p <= n such that 2*pi(p) - (-1)^n and p*n +((-1)^n - 3)/2 are both prime, where pi(x) is the number of primes not exceeding x.
0, 0, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 3, 4, 2, 1, 3, 1, 2, 5, 2, 3, 3, 1, 2, 3, 3, 1, 4, 2, 1, 4, 2, 3, 5, 3, 1, 2, 2, 2, 3, 3, 4, 4, 2, 3, 2, 1, 2, 5, 1, 3, 4, 1, 2, 3, 1, 2, 4, 4, 2, 5, 4, 2, 5, 2, 1, 2, 4, 3, 5, 3, 1, 6, 7, 3, 5, 3, 3
Offset: 1
Keywords
Examples
a(9) = 1 since 5, 2*pi(5)-(-1)^9 = 2*3 + 1 = 7 and 5*9 + ((-1)^9-3)/2 = 45 - 2 = 43 are all prime. a(10) = 1 since 3, 2*pi(3)-(-1)^(10) = 2*2 - 1 = 3 and 3*10 + ((-1)^(10)-3)/2 = 30 - 1 = 29 are all prime. a(268) = 1 since 23, 2*pi(23) - 1`= 2*9 - 1 = 17 and 23*268 - 1 = 6163 are all prime. a(389) = 1 since 71, 2*pi(71) + 1 = 2*20 + 1 = 41 and 71*389 - 2 = 27617 are all prime.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
- Zhi-Wei Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014.
Programs
-
Mathematica
p[n_,k_]:=PrimeQ[2k-(-1)^n]&&PrimeQ[n*Prime[k]+((-1)^n-3)/2] a[n_]:=Sum[If[p[n,k],1,0],{k,1,PrimePi[n]}] Table[a[n],{n,1,80}]
Comments