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.
EXAMPLE
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
KEYWORD
nonn
AUTHOR
David James Sycamore, May 18 2018
STATUS
approved