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.

A236541 Number of ways to write 2*n = k + m with 0 < k <= m such that prime(k) + m and k + prime(m) are both prime.

Original entry on oeis.org

1, 1, 0, 1, 1, 2, 0, 1, 1, 0, 3, 2, 1, 2, 2, 1, 1, 2, 1, 1, 0, 2, 2, 4, 0, 4, 2, 1, 2, 3, 0, 4, 3, 2, 1, 1, 1, 1, 2, 2, 1, 3, 2, 2, 5, 1, 5, 3, 3, 4, 5, 1, 4, 1, 3, 3, 6, 4, 4, 1, 4, 4, 3, 5, 5, 5, 2, 2, 2, 4, 3, 2, 3, 3, 7, 4, 3, 2, 4, 3, 5, 3, 3, 5, 2, 4, 6, 3, 4, 3, 4, 2, 5, 2, 7, 6, 3, 3, 5, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Jan 28 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 31.
(ii) Any positive even number can be written as k + m with k > 0 and m > 0 such that (prime(k) - k) + m and k + (prime(m) - m) are both prime.
(iii) Each integer n > 24 can be written as k + m with k > 0 and m > 0 such that prime(k) + m*(m-1) and k*(k-1) + prime(m) are both prime.
(iv) Any integer n > 15 can be written as k + m with k > 0 and m > 0 such that prime(k) + phi(m) and phi(k) + prime(m) are both prime.
Part (ii) of the conjecture in A232443 implies that any integer n > 7 can be written as k + m (k > 0, m > 0) with prime(k) + m = n + prime(k) - k prime.

Examples

			a(9) = 1 since 2*9 = 8 + 10 with prime(8) + 10 = 19 + 10 = 29 and 8 + prime(10) = 8 + 29 = 37 both prime.
a(92) = 1 since 2*92 = 86 + 98 with prime(86) + 98 = 443 + 98 = 541 and 86 + prime(98) = 86 + 521 = 607 both prime.
		

Crossrefs

Programs

  • Mathematica
    p[k_,m_]:=PrimeQ[Prime[k]+m]
    a[n_]:=Sum[If[p[k,2n-k]&&p[2n-k,k],1,0],{k,1,n}]
    Table[a[n],{n,1,100}]