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.

Showing 1-5 of 5 results.

A276034 a(n) is the number of decompositions of 2n into an unordered sum of two primes in A274987.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Nov 15 2016

Keywords

Comments

The two primes are allowed to be the same.
It is conjectured that the primes in A274987 (a subset of all primes) are sufficient to decomposite even numbers into two primes in A274987 when n > 958.
This sequence provides a very tight alternative of the Goldbach conjecture for all positive integers, in which indices of zero terms form a complete sequence {1, 2, 16, 26, 64, 97, 107, 122, 146, 167, 194, 391, 451, 496, 707, 856, 958}.
There is no more zero terms of a(n) tested up to n = 100000.

Examples

			A274987 = {3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 59, 61, 73, 79, 83, 89, 101, 103, 109, ...}.
For n=3, 2n=6 = 3+3, one case of decomposition, so a(3)=1;
for n=4, 2n=8 = 3+5, one case of decomposition, so a(4)=1;
...
for n=17, 2n=34 = 3+31 = 11+23 = 17+17, three cases of decompositions, so a(17)=3.
		

Crossrefs

Programs

  • Mathematica
    p = 3; sp = {p}; a = Table[m = 2*n; l = Length[sp]; While[sp[[l]] < m, While[p = NextPrime[p]; cp = 2*3^(Floor[Log[3, 2*p - 1]]) - p; ! PrimeQ[cp]]; AppendTo[sp, p]; l++]; ct = 0; Do[If[(2*sp[[i]] <= m) && (MemberQ[sp, m - sp[[i]]]), ct++], {i, 1, l}]; ct, {n, 1, 87}]

A276520 a(n) is the number of decompositions of n into unordered form p + c*q, where p, q are terms of A274987, c=1 for even n-s and c=2 for odd n-s.

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 0, 1, 1, 2, 1, 1, 2, 2, 1, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 3, 2, 2, 0, 3, 3, 1, 2, 4, 1, 3, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 1, 3, 0, 2, 2, 0, 1, 3, 1, 3, 2, 0, 2, 3, 3, 3, 3, 3, 2, 3, 2, 2, 2, 2, 2, 3, 3, 2, 2, 4, 1, 2, 2, 3, 4, 4, 3, 4
Offset: 1

Views

Author

Lei Zhou, Nov 11 2016

Keywords

Comments

p=q is allowed.
It is conjectured that the primes p, q in A274987 (a subset of all primes) are sufficient to decomposite all numbers into p and c*q (c=1 when n is even, 2 when c is odd) when n > 2551.
This sequence provides a very tight alternative of the Goldbach conjecture for all positive integers, in which indices of zero terms form a complete sequence {1, 2, 3, 4, 5, 7, 32, 52, 55, 61, 128, 194, 214, 244, 292, 334, 388, 782, 902, 992, 1414, 1571, 1712, 1916, 2551}.
There are no more zero terms of a(n) up to n = 100000.

Examples

			A274987 = {3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 59, 61, 73, 79, 83, 89, 101, 103, 109, ...}
For n=6, 6 = 3+3, one case of decomposition, so a(6)=1;
For n=7, 7 < 3+2*3=9, no eligible case could be found, so a(7)=0;
...
For n=17, 17 = 3+2*7 = 7+2*5 = 11+2*3, three cases of decompositions, so a(17)=3.
		

Crossrefs

Programs

  • Mathematica
    p = 3; sp = {p}; Table[l = Length[sp]; While[sp[[l]] < n, While[p = NextPrime[p]; cp = 2*3^(Floor[Log[3, 2*p - 1]]) - p; ! PrimeQ[cp]]; AppendTo[sp, p]; l++]; c = 2 - Mod[n + 1, 2]; ct = 0; Do[If[MemberQ[sp, n - c*sp[[i]]], If[c == 1, If[(2*sp[[i]]) <= n, ct++], ct++]], {i, 1, l}]; ct, {n, 1, 87}]

A240713 Number of decompositions of 2n=p1+p2 (prime p1 <= p2), where at least one other such pair 2n=p3+p4 (prime p3 <= p4) exists such that |p1-p3|= 6 or 12.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Apr 10 2014

Keywords

Comments

It is conjectured that a(n)=0 only when n=1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 16, 34, 76, 229.
The 2n decompositions counted in this sequence are a subset of 2n decompositions as of in Goldbach conjecture (A002375).
Per definition, all nonzero terms are greater than 1.

Examples

			For n = 11, 2n=22. 22 = 3 + 19 = 5 + 17 = 11 + 11. |5-11|=6 so pair 5+17 and 11+11 are counted. So a(11)=2.
...
For n = 17, 2n=34. 34 = 3 + 31 = 5 + 29 = 11 + 23 = 17 + 17. |5-11|=6, so 5+29 and 11+23 are counted. Also since |11-17|=6, 17+17 is also counted (where 11+23 is already counted). In case |5-17|=12, both instances are already counted. So overall three instances are found. a(17)=3.
		

Crossrefs

Programs

  • Mathematica
    Table[s = 2*n; ct = 0; p = 1; While[p = NextPrime[p]; p <= n, If[PrimeQ[s - p], ok = 0; a1 = p - 12; b1 = s - a1; a2 = p - 6; b2 = s - a2; a3 = p + 6; b3 = s - a3; a4 = p + 12; b4 = s - a4; If[a1 > 0, If[PrimeQ[a1] && PrimeQ[b1], ok = 1]]; If[a2 > 0, If[PrimeQ[a2] && PrimeQ[b2], ok = 1]]; If[a3 <= n, If[PrimeQ[a3] && PrimeQ[b3], ok = 1]]; If[a4 <= n, If[PrimeQ[a4] && PrimeQ[b4], ok = 1]]; If[ok == 1, ct++]]]; ct, {n, 1, 85}]

A254041 Number of decompositions of 2n into an unordered sum of two sexy primes.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Jan 23 2015

Keywords

Comments

"Sexy primes" are listed in A136207.
It is conjectured that a(n) > 0 for n > 4.

Examples

			When n = 79, 2n = 158 = 7 + 151 = 19 + 139 = 31 + 127 = 61 + 97 = 79 + 79 has five "two prime decompositions". Among the involved prime numbers 7, 19, 31, 61, 79, 97, 127, 139, 151, prime 127 and 139 are not sexy primes. So only three decompositions, 158 = 7 + 151 = 61 + 97 = 79 + 79 satisfy the definition of this sequence. Thus a(79) = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[e = 2 n; ct = 0; p = 2; While[p = NextPrime[p]; p <= n, q = e - p; If[PrimeQ[q], If[(((p > 6) && PrimeQ[p - 6]) || PrimeQ[p + 6]) && (((q > 6) && PrimeQ[q - 6]) || PrimeQ[q + 6]), ct++]]]; ct, {n, 87}]

A376510 a(n) is the number of pairs of primes p+q=2*(n+4) with 5 <= p <= n such that either p+6 or q+6 is also prime.

Original entry on oeis.org

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

Views

Author

Lei Zhou, Sep 25 2024

Keywords

Comments

It is hypothesized that all terms of this sequence are positive integers.
If the above hypothesis is true, the Goldbach Hypothesis is true, since for every even number 2n, if there is a Goldbach decomposition p+q=2n meets the condition of this sequence, p+q+6=2n+6 forms at least one Goldbach decomposition of 2n+6.

Examples

			For n=1, 2*(n+4)=10, 10=5+5, and 5+6=11 is a prime. Thus a(1)=1;
For n=2, 2*(n+4)=12, 12=5+7, and 5+6=11 is a prime. Thus a(2)=1;
...
For n=14, 2*(n+4)=36, 36=5+31 (5+6=11); 7+29 (7+6=13); 13+23 (13+6=19); 17+19 (17+6=23), four cases found.  Thus a(14)=4.
		

Crossrefs

Programs

  • Mathematica
    res = {}; Do[n[2] = i*6; n[1] = n[2] - 2; n[3] = n[2] + 2;
     Do[c[j] = 0; p[j] = NextPrime[n[j]/2 - 1];
      While[q[j] = n[j] - p[j];
       If[PrimeQ[q[j]] && q[j] > 3,
        If[PrimeQ[p[j] + 6] || PrimeQ[q[j] + 6], c[j]++]];
       p[j] < n[j] - 5, p[j] = NextPrime[p[j]]], {j, 1, 3}];
     AppendTo[res, c[1]]; AppendTo[res, c[2]];
     AppendTo[res, c[3]], {i, 2, 29}]; Print[res]
Showing 1-5 of 5 results.