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

A302756 a(n) is the least possible greatest prime in any partition of prime(n) into three primes; n >= 4.

Original entry on oeis.org

3, 5, 5, 7, 7, 11, 11, 13, 13, 17, 17, 17, 19, 23, 23, 29, 29, 31, 31, 31, 31, 37, 41, 37, 41, 41, 41, 43, 47, 47, 53, 53, 61, 61, 61, 61, 61, 61, 61, 71, 67, 71, 71, 73, 79, 83, 79, 83, 83, 83, 89, 89, 97, 97, 101, 97, 101, 97, 103, 103, 107, 107, 107, 113, 127, 127
Offset: 4

Views

Author

David James Sycamore, Apr 12 2018

Keywords

Comments

Goldbach's weak (ternary) conjecture states that every odd number > 5 can be expressed as the sum of three primes (see link). This sequence applies the conjecture (now proven) to primes > 5. From all possible partitions of prime(n) = p+q+r for primes p,q,r (p <= q <= r), a(n) is chosen as the least possible value of the greatest prime r (with lower prime p not constrained to be A302607(n)). The sequence is not strictly increasing, and although many primes appear repeatedly, some do not appear at all (e.g. 59 is not included).

Examples

			The partition of prime(5)=11 into 3 primes p <= q <= r is 11=3+3+5 and since no smaller value than 5 can be attributed to r, a(5)=5.
		

Crossrefs

Programs

  • PARI
    a(n) = {my(pn = prime(n), res = oo); forprime(p=2, pn, forprime(q=p, pn, forprime(r=q, pn, if (p+q+r == pn, res = min(res, r));););); res;} \\ Michel Marcus, May 13 2018
    
  • PARI
    first(n) = {n = prime(n + 3); my(strt = vector(n, i, i), t = 0, res = vector(primepi(n) - 3)); forprime(p = 2, n, forprime(q = p, n - p, forprime(r = q, n - p - q, strt[p + q + r] = min(r, strt[p + q + r])))); forprime(p = 7, n, t++; res[t] = strt[p]); res} \\ David A. Corneth, May 14 2018

A304794 a(n) is the least possible difference between the greatest and the smallest prime in any partition of prime(n) into three primes p+q+r (p <= q <= r); n >= 4.

Original entry on oeis.org

1, 2, 2, 2, 2, 6, 4, 6, 2, 6, 4, 4, 2, 6, 4, 10, 10, 12, 12, 8, 2, 8, 12, 8, 12, 10, 10, 2, 6, 4, 10, 10, 18, 18, 18, 8, 8, 2, 2, 12, 8, 12, 10, 6, 8, 12, 8, 12, 10, 4, 10, 10, 14, 14, 24, 14, 14, 8, 14, 2, 6, 4, 4, 4, 24, 20, 18, 14, 28, 14, 28, 26, 26, 4, 12
Offset: 4

Views

Author

David James Sycamore, May 18 2018

Keywords

Comments

From Goldbach's (weak) conjecture, any prime >= 7 can be expressed as the sum of three primes. For n >= 5 at least 2 different partitions of this kind are possible for the same prime. Many primes (>90% in the above data) exhibit the property of the maximum value of the smallest prime p (=A302607(n)) occurring in the same partition as the minimum value of the greatest prime, r (=A302756(n)). The exceptions in these data are 103, 193, 229, 271, 281, ... where the greatest value of the smallest prime and the smallest value of the greatest prime appear in different partitions. In such cases a(n) is chosen from the partition with the smallest difference r-p, see examples.

Examples

			Prime(6) = 13 = 3+5+5 = 3+3+7, so a(6) = 5-3 = 2.
Prime(27) = 103 = 31+31+41 = 29+37+37, A302607(27) = 31, and A302756(27) = 37; a(27) = 37-29 = 8.
Prime(44) = 193 = 61+61+71 = 59+67+67, A302607(44) = 61, A302756(44) = 67; a(44) = 67-59 = 8.
		

Crossrefs

Programs

  • Mathematica
    Array[Min@ Map[First@ # - Last@ # &, Select[IntegerPartitions[Prime@ #, {3}], AllTrue[#, PrimeQ] &]] &, 75, 4] (* Michael De Vlieger, Jul 19 2018 *)
  • PARI
    a(n) = {my(pn = prime(n), res = oo); forprime(p=2, pn, forprime(q=p, pn, forprime(r=q, pn, if (p+q+r == pn, res = min(res, r-p)); ); ); ); res; } \\ Michel Marcus, Jul 05 2018
Showing 1-2 of 2 results.