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.

A376917 Starting from Goldbach decomposition of 10 = p + q = 5 + 5, 12 = 7 + 5, and 14 = 7 + 7, a(n) is the first number in A001057 such that if 2n - 6 = p + q, 2n = p' + q', where p' = p + 6 * a(n) and q' = 2n - q' are both primes.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, -1, 1, 1, 0, 1, -1, 0, 1, 0, 1, -1, 0, 2, 0, 0, 0, 0, 1, 1, 0, -1, 1, 1, 1, -2, -1, -1, 0, 1, 0, 0, -1, 1, 0, 0, -1, 1, 1, 0, 1, -1, 0, -2, 0, 1, 0, 0, 2, 0, 1, 0, 1, 2, 1, 1, 0, 1, -2, 1, -2, 1, 1, 0, 1, 1, 1, -1, 2, 1, 1
Offset: 8

Views

Author

Lei Zhou, Oct 09 2024

Keywords

Comments

By definition, this sequence starts from n = 8.
Hypothesis: a(n) is defined for all n >= 8 and for all n >=8, the corresponding Goldbach decomposition 2n = p + q has positive primes p and q.

Examples

			When n = 8, 2n = 16.  2n - 6 = 10. 10 = p + q = 5 + 5 (by definition). a(8) = 0, p' = p + a(8) = 5, q' = 2n - p' = 16 - 5 = 11. P' and q' are both primes.
...
When n = 10, 2n = 20. 2n - 6 = 14. 14 = p + q = 7 + 7 (by definition). a(10) = 0, p' = p + a(10) = 7, q' = 2n - p' = 20 - 7 = 13. P' and q' are both primes.
...
When n = 13, 2n = 26. 2n - 6 = 20. 20 = p + q = 7 + 13 (per above evaluation). a(13) = 0, p' = p + a(13) = 7, q' = 2n - p' = 26 - 7 = 19. P' and q' are both primes.
When n = 16, 2n = 32. 2n - 6 = 26. 26 = p + q = 7 + 19 (per above evaluation). a(16) = 1, p' = p + a(16) = 13, q' = 2n - p' = 32 - 13 = 19. P' and q' are both primes. It is tested when a(16) is 0, q' = 25 is not a prime, thus a(16) = 1 is the first number in A001057 that makes both p' and q' primes.
		

Crossrefs

Ref. A001057; Cf. A045917

Programs

  • Mathematica
    a = {}; p = {5, 7, 7}; Do[Do[n = 6*k - 4 + 2*j; i = 0; While[i++; m = 1/4 + (i - 1/2)*(-1)^i/2; pr = p[[j]] + 6*m; q = n - pr; ! (PrimeQ[pr] && PrimeQ[q])]; p[[j]] = pr; AppendTo[a, m], {j, 1, 3}], {k, 3, 30}]; Print[a]