cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 20 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 9, and a(n) = 1 only for n = 8, 10, 11, 26, 33, 50, 52.
This implies that there are infinitely many positive integers n with pi(2*n) - pi(n) prime.
Recall that Bertrand's postulate proved by Chebyshev in 1850 asserts that pi(2*n) - pi(n) > 0 for all n > 0.

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.
		

Crossrefs

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}]