%I #6 Apr 11 2022 22:21:26
%S 8389,18433,25253,31231,33647,40289,40357,47237,47303,48731,51721,
%T 55621,57331,58763,61129,62303,63601,64189,65657,65677,65983,67723,
%U 68491,70099,70571,71341,71741,72739,75653,77153,77641,78509,78511,81401
%N Primes p such that there exist primes p'<p"<p"'<p""<p such that the concatenation of any two among the {p,...,p""} is prime.
%C Obviously, 2 and 5 cannot be part of such a 5-tuple.
%C Apart from 3, all the elements of the quintuple must have the same
%C residue mod 3, thus they are all = 1 or = -1 mod 6.
%C Two curious facts can be observed: for p=51721 and p=63601, there are
%C two possibilities for (p',p",p"',p""), which differ in both cases only
%C in p"": [p=51721, p""=44371 or 44683, p"'=22531, p"=12703, p'=8101],
%C resp. [63601, 26893 or 61417, 25939, 61, 7]. Secondly, the two
%C quintuples for p=51721 are followed by a quintuple whose sum is one of
%C smallest possible, only roughly half that of the two preceding
%C solutions.
%H Project Euler, <a href="https://projecteuler.net/problem=60">Problem 60: Prime pair sets</a>
%e The second such 5-tuple is [18433, 12409, 2341, 1237, 7].
%e The two quintuplets [51721, 44371, 22531, 12703, 8101]
%e /*sum=139427*/ and [51721, 44683, 22531, 12703, 8101] /*sum=139739*/
%e are followed by [55621, 18493, 991, 883, 733] /*sum=76721*/.
%e The next "degenerate" case is [63601, 26893, 25939, 61, 7]
%e /*sum=116501*/ and [63601, 61417, 25939, 61, 7] /*sum=151025*/.
%e The third "degenerate" case is [71341, 63277, 54583, 7741,
%e 241] /*sum=197183*/ and [71341, 63277, 54583, 36187, 241]
%e /*sum=225629*/.
%o (PARI) /* available from the author upon solving "Problem 60" on ProjectEuler.net */
%K nonn,base
%O 1,1
%A _M. F. Hasler_, Apr 30 2008
|