A239428 Number of ordered ways to write n = k + m with 0 < k <= m such that pi(2*k) - pi(k) and pi(2*m) - pi(m) are both prime, where pi(x) denotes the number of primes not exceeding x.
0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 2, 2, 3, 2, 3, 3, 2, 4, 2, 4, 2, 2, 3, 1, 4, 2, 3, 3, 2, 4, 1, 5, 4, 5, 6, 4, 6, 4, 5, 4, 3, 5, 2, 4, 2, 2, 2, 1, 2, 1, 2, 3, 3, 2, 3, 3, 5, 6, 4, 6, 5, 7, 4, 5, 5, 4, 5, 3, 5, 6, 5, 6, 4, 6, 4, 6, 5, 6
Offset: 1
Keywords
Examples
a(11) = 1 since 11 = 4 + 7 with pi(2*4) - pi(4) = 4 - 2 = 2 and pi(2*7) - pi(7) = 6 - 4 = 2 both prime. a(26) = 1 since 26 = 13 + 13 with pi(2*13) - pi(13) = 9 - 6 = 3 prime. a(33) = 1 since 33 = 6 + 27 with pi(2*6) - pi(6) = 5 - 3 = 2 and pi(2*27) - pi(27) = 16 - 9 = 7 both prime. a(50) = 1 since 50 = 23 + 27 with pi(2*23) - pi(23) = 14 - 9 = 5 and pi(2*27) - pi(27) = 16 - 9 = 7 both prime. a(52) = 1 since 52 = 21 + 31 with pi(2*21) - pi(21) = 13 - 8 = 5 and pi(2*31) - pi(31) = 18 - 11 = 7 both 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_]:=PrimeQ[PrimePi[2n]-PrimePi[n]] a[n_]:=Sum[If[p[k]&&p[n-k],1,0],{k,1,n/2}] Table[a[n],{n,1,80}]
Comments