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.

A237628 a(n) is the smallest product of prime numbers such that all numbers from 6 and 2n can be written as the sum of two prime factors (duplication allowed) of a(n).

Original entry on oeis.org

3, 15, 15, 105, 105, 1155, 1155, 1365, 15015, 15015, 15015, 255255, 255255, 596505, 4849845, 4849845, 4849845, 10140585, 10140585, 179444265, 229474245, 229474245, 242777535, 640049865, 5898837945, 7357214865, 7357214865, 7357214865, 13350001665, 196656364905
Offset: 3

Views

Author

Lei Zhou, May 02 2014

Keywords

Comments

The prime factors of a(n) make a subset of prime numbers that satisfies the Goldbach Conjecture for even numbers from 6 to 2n.

Examples

			n=4: 2*4=8. 8=3+5.  This is the only possible two-prime decomposition which contains prime numbers 3 and 5, while 6=3+3, 3 is an element of set {3,5}.  So a(4)=3*5=15.
n=5: 2*5=10. 6=3+3, 8=3+5, 10=5+5.  So two selections of prime numbers in set {3,5} (reuse allowed) can be summed into all three numbers 6, 8, and 10.  So a(5)=3*5=15.
...
n=8: 2n=16. We will be able to find two sets, {3,5,7,11} and {3,5,7,13}, that have such feature:
  for set {3,5,7,11}, 6=3+3, 8=3+5, 10=5+5, 12=5+7, 14=7+7, and 16=5+11;
  for set {3,5,7,13}, 6=3+3, 8=3+5, 10=5+5, 12=5+7, 14=7+7, and 16=3+13.
  3*5*7*11=1155, and 3*5*7*13=1365.  1155<1365, so a(8)=1155.  Here we did not count set {3,5,7,11,13} which also has the desired feature since the two shorter sets are its subsets such that the products of the elements in the subsets are obviously smaller than the product of elements in this larger set.
		

Crossrefs

Programs

  • Mathematica
    a = {{{3}}}; Table[n2 = 2*n; na = {}; la = Last[a]; lo = Length[la]; Do[ok = 0; Do[p1 = la[[i, j]]; p2 = n2 - p1; If[MemberQ[la[[i]], p2], ok = 1], {j, 1, Length[la[[i]]]}];
      If[ok == 1, na = Sort[Append[na, la[[i]]]], Do[p1 = la[[i, j]]; p2 = n2 - p1; If[PrimeQ[p2], ng = Sort[Append[la[[i]], p2]]; big = 0; If[Length[na] > 0, Do[If[Intersection[na[[k]], ng] == na[[k]], big = 1], {k, 1, Length[na]}]]; If[big == 0, na = Sort[Append[na, ng]]]], {j, 1, Length[la[[i]]]}]], {i, 1, lo}]; AppendTo[a, na]; b = {};
    lna = Length[na]; Do[prd = Times @@ na[[k]]; AppendTo[b, prd], {k, 1, lna}]; Min[b], {n, 4, 32}](*Program lists the 4th item and beyond*)

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

A237638 a(n) is the number of prime sets such that each set contains enough prime numbers to decompose every even number from 6 to 2n into the sum of two of its elements (reuse allowed), while none of the sets is a subset of another such set.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 2, 3, 4, 4, 5, 6, 6, 9, 11, 11, 11, 13, 16, 23, 25, 31, 47, 57, 63, 70, 74, 79, 82, 122, 131, 129, 180, 215, 219, 323, 367, 446, 501, 531, 661, 867, 897, 1311, 1471, 1691, 1695, 2130, 2288, 2833, 3363, 3891, 5435, 8068, 8867, 13476, 15451, 15897
Offset: 3

Views

Author

Lei Zhou, May 02 2014

Keywords

Examples

			n=4, 2n=8. There is only one set of primes {3,5} such that 6=3+3, 8=3+5. So a(4)=1.
...
n=8, 2n=16. We can find two sets, {3,5,7,11} and {3,5,7,13} that have such features. So a(8)=2. Here any set with more primes either contains an unused prime number or one of these two sets is a subset of them, like {3,5,7,11,13}, and thus is not considered. So a(8)=2.
...
n=13, 2n=26. Five such sets are found: {3,5,7,11,13}, {3,5,7,13,17},{3,5,7,13,19}, {3,5,7,11,17,19}, {3,5,7,11,17,23}. So a(13)=5.
		

Crossrefs

Programs

  • Mathematica
    a = {{{3}}}; Table[n2 = 2*n; na = {}; la = Last[a]; lo = Length[la]; Do[ok = 0; Do[p1 = la[[i, j]]; p2 = n2 - p1; If[MemberQ[la[[i]], p2], ok = 1], {j, 1, Length[la[[i]]]}];
      If[ok == 1, na = Sort[Append[na, la[[i]]]], Do[p1 = la[[i, j]]; p2 = n2 - p1; If[PrimeQ[p2], ng = Sort[Append[la[[i]], p2]]; big = 0; If[Length[na] > 0, Do[If[Intersection[na[[k]], ng] == na[[k]], big = 1], {k, 1, Length[na]}]]; If[big == 0, na = Sort[Append[na, ng]]]], {j, 1, Length[la[[i]]]}]], {i, 1, lo}]; AppendTo[a, na]; Length[na], {n, 4, 60}](* Program lists the 4th item and beyond *)

A242189 a(n) is the smallest prime number such that every even number from 6 to 2n can be written as the sum of two primes less than or equal to a(n).

Original entry on oeis.org

3, 5, 5, 7, 7, 11, 11, 13, 13, 13, 13, 17, 17, 19, 19, 19, 19, 23, 23, 31, 31, 31, 31, 31, 31, 37, 37, 37, 37, 41, 41, 41, 41, 41, 41, 47, 47, 47, 47, 47, 47, 47, 47, 61, 61, 61, 61, 61, 61, 61, 61, 61, 67, 67, 67, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 83
Offset: 3

Views

Author

Lei Zhou, May 06 2014

Keywords

Comments

The two primes stated in the name can be equal.

Examples

			n=3, 2*3=6=3+3. Since 3 is the smallest prime needed, a(3)=3.
n=4, 2*3=6=3+3, 2*4=8=5+3, Since 5 is the smallest prime needed, a(4)=5.
...
n=14, we need to consider the even numbers from 6 to 2*14=28, while trying to minimize the larger prime number used to decompose such even numbers. 6=3+3; 8=5+3; 10=5+5; 12=7+5; 14=7+7; 16=11+5; 18=11+7; 20=13+7; 22=11+11; 24=13+11; 26=13+13; 28=17+11. The maximum prime number used is 17. So a(14)=17.
		

Crossrefs

Programs

  • Maple
    f:= proc(m) local p,p0;
       p0:= m/2; if p0::even then p0:= p0+1 fi;
       for p from p0 by 2 do if isprime(p) and isprime(m-p) then return p fi od
    end proc:
    R:= 3: m:= 3:
    for i from 8 to 200 by 2 do
      v:= f(i);
      if v > m then R:= R,v; m:= v
      else R:= R,m
      fi
    od:
    R; # Robert Israel, Oct 10 2024
  • Mathematica
    a = {2}; Table[found = 0; While[la = Length[a]; xx = 1; Do[yy = 0; Do[If[MemberQ[a, i*2 - a[[j]]], yy = 1], {j, 1, la}]; If[yy == 0, xx = 0], {i, 3, n}]; If[xx == 1, found = 1]; found == 0, AppendTo[a, NextPrime[Last[a]]]]; Last[a], {n, 3, 68}]

Formula

a(n) = max_{3 <= i <= n} A234345(i). - Robert Israel, Oct 10 2024

Extensions

Name corrected by Robert Israel, Oct 10 2024
Showing 1-5 of 5 results.