login
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.
1
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,5
COMMENTS
Conjecture: (i) a(n) > 0 for all n > 2.
(ii) If n > 2, then 2*p*n + 1 (or 2*p*n - 1) is prime for some prime p < n.
Part (i) of the conjecture is a further extension of the conjecture in A238597 to cover the even case.
LINKS
Zhi-Wei Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014.
EXAMPLE
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.
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}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Mar 01 2014
STATUS
approved