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.

A232502 Number of ways to write n = k + m (0 < k < m) with 2*prime(m) - prime(k) prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 24 2013

Keywords

Comments

Note that prime(k), prime(m), 2*prime(m) - prime(k) form a three-term arithmetic progression. It is known that there are infinitely many nontrivial three-term arithmetic progressions whose terms are all prime.
Conjecture: (i) a(n) > 0 for all n > 4, and a(n) = 1 only for n = 5, 6, 7, 9, 11, 14, 17, 21, 34, 43.
(ii) Any integer n > 4, can be written as k + m (0 < k < m) with 2*prime(m) + prime(k) prime.

Examples

			a(17) = 1 since 2*prime(10) - prime(7) = 2*29 - 17 = 41 is prime.
a(21) = 1 since 2*prime(19) - prime(2) = 2*67 - 3 = 131 is prime.
a(34) = 1 since 2*prime(24) - prime(10) = 2*89 - 29 = 149 is prime.
a(43) = 1 since 2*prime(28) - prime(15) = 2*107 - 47 = 167 is prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2*Prime[n-k]-Prime[k]],1,0],{k,1,(n-1)/2}]
    Table[a[n],{n,1,100}]