login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 0
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

4,2

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.

LINKS

Table of n, a(n) for n=4..78.

EXAMPLE

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.

MATHEMATICA

Array[Min@ Map[First@ # - Last@ # &, Select[IntegerPartitions[Prime@ #, {3}], AllTrue[#, PrimeQ] &]] &, 75, 4] (* Michael De Vlieger, Jul 19 2018 *)

PROG

(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

CROSSREFS

Cf. A302756, A302607.

Sequence in context: A260983 A103222 A319100 * A175809 A061033 A075094

Adjacent sequences:  A304791 A304792 A304793 * A304795 A304796 A304797

KEYWORD

nonn

AUTHOR

David James Sycamore, May 18 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 09:52 EDT 2021. Contains 346273 sequences. (Running on oeis4.)