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-4 of 4 results.

A240712 Number of decompositions of 2n into an unordered sum of two terms of A240710.

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, 4, 7, 4, 4, 8, 4, 4, 9, 3, 5, 7, 3, 5, 8, 4, 5, 8, 5, 6, 10, 5, 6, 12, 4, 5, 10, 3, 6, 9, 5, 5, 8, 6, 7, 11, 6, 5, 12, 3, 7, 11, 5, 7, 10, 5, 5, 13, 8
Offset: 1

Views

Author

Lei Zhou, Apr 10 2014

Keywords

Comments

a(n) differs from A171611 beginning at term a(264). To show the difference, the first 270 terms are listed.
Conjecture: a(n) > 0 for all n > 4.
This is a much stronger version of the Goldbach Conjecture.

Examples

			For n < 264, please refer to examples at A171611.
For n = 264, 2n=528. A240710 has terms {5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521} up to 528, where prime number 523 < 528 is not in the set, such that 528 = 5 + 523 is not counted in this sequence but is counted in A171611. So a(264) = A171611(264)-1 = 25-1 = 24.
		

Crossrefs

Programs

  • Mathematica
    a240710 = {5}; Table[s = 2*n; While[a240710[[-1]] < s, p = a240710[[-1]]; While[p = NextPrime[p]; ok = 0; a1 = p - 12; a2 = p - 6; a3 = p + 6; a4 = p + 12; If[a1 > 0, If[PrimeQ[a1], ok = 1]]; If[a2 > 0, If[PrimeQ[a2], ok = 1]]; If[PrimeQ[a3], ok = 1]; If[PrimeQ[a4], ok = 1]; ok == 0]; AppendTo[a240710, p]]; pos = 0; ct = 0; While[pos++; pos <= Length[a240710], p = a240710[[pos]]; If[p <= n, If[MemberQ[a240710, s - p], ct++]]]; ct, {n, 1, 270}]

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}]

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-4 of 4 results.