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.
%I A304794 #20 Jul 27 2018 16:59:09 %S A304794 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, %T A304794 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, %U A304794 14,8,14,2,6,4,4,4,24,20,18,14,28,14,28,26,26,4,12 %N 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. %C A304794 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. %e A304794 Prime(6) = 13 = 3+5+5 = 3+3+7, so a(6) = 5-3 = 2. %e A304794 Prime(27) = 103 = 31+31+41 = 29+37+37, A302607(27) = 31, and A302756(27) = 37; a(27) = 37-29 = 8. %e A304794 Prime(44) = 193 = 61+61+71 = 59+67+67, A302607(44) = 61, A302756(44) = 67; a(44) = 67-59 = 8. %t A304794 Array[Min@ Map[First@ # - Last@ # &, Select[IntegerPartitions[Prime@ #, {3}], AllTrue[#, PrimeQ] &]] &, 75, 4] (* _Michael De Vlieger_, Jul 19 2018 *) %o A304794 (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 %Y A304794 Cf. A302756, A302607. %K A304794 nonn %O A304794 4,2 %A A304794 _David James Sycamore_, May 18 2018