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.

A237496 Number of ordered ways to write n = k + m (0 < k <= m) with pi(k) + pi(m) - 2 prime, where pi(.) is given by A000720.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 2, 4, 4, 3, 2, 3, 3, 3, 5, 3, 1, 4, 5, 5, 7, 4, 1, 2, 1, 1, 1, 1, 1, 3, 6, 7, 8, 8, 8, 8, 8, 9, 11, 11, 11, 11, 9, 7, 7, 4, 1, 2, 1, 2, 3, 5, 7, 10, 14, 14, 14, 10, 6, 10, 14, 16, 19, 16, 13, 12, 11, 10, 7, 6, 5, 3, 3, 4, 3, 6, 9, 13, 17, 18
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 08 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) Any integer n > 23 can be written as k + m (k > 0 and m > 0) with pi(k) + pi(m) prime. Also, each integer n > 25 can be written as k + m (k > 0 and m > 0) with pi(k) + pi(m) - 1 prime.

Examples

			a(6) = 1 since 6 = 3 + 3 with pi(3) + pi(3) - 2 = 2 + 2 - 2 = 2 prime.
a(17) = 1 since 17 = 2 + 15 with pi(2) + pi(15) - 2 = 1 + 6 - 2 = 5 prime.
a(99) = 1 since 99 = 1 + 98 with pi(1) + pi(98) - 2 = 0 + 25 - 2 = 23 prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=n>0&&PrimeQ[n]
    p[k_,m_]:=PQ[PrimePi[k]+PrimePi[m]-2]
    a[n_]:=Sum[If[p[k,n-k],1,0],{k,1,n/2}]
    Table[a[n],{n,1,80}]