%I #22 Nov 21 2019 07:39:12
%S 2,4,10,31,45,85,151,253,420,775,1303,2521,4641
%N The smallest k such that one can form two sets of size n with distinct numbers from 1 to k with the property that the sum of any pair of numbers from different sets is a prime.
%C a(10) <= 775, because we can form these two sets:
%C {1, 61, 115, 151, 271, 295, 325, 361, 661, 775}
%C {12, 22, 162, 196, 348, 448, 462, 502, 658, 768}.
%C a(11) <= 1303, because we can form these two sets:
%C {4, 16, 58, 136, 178, 256, 268, 508, 586, 796, 1048}
%C {1, 13, 15, 133, 175, 253, 483, 505, 925, 1035, 1303}.
%H Dmitry Kamenetsky, <a href="https://puzzling.stackexchange.com/questions/90650/two-equal-sized-lists-that-produce-prime-sums">Two equal-sized lists that produce prime sums</a>, Puzzling StackExchange, 2019.
%e For n=3 one can use the sets {1, 3, 9} and {2, 4, 10}. The sum of every pair of numbers from different sets is prime: 1+2 = 3, 1+4 = 5, 1+10 = 11, 3+2 = 5, 3+4 = 7, 3+10 = 13, 9+2 = 11, 9+4 = 13, 9+10 = 19. The largest number in these sets is 10, hence a(3) = 10.
%e From _Bert Dobbelaere_, Nov 17 2019: (Start)
%e a(12) = 2521. One of the two solutions with all elements <= 2521 is the pair of sets
%e {1, 19, 49, 79, 175, 415, 595, 1405, 1531, 2311, 2359, 2521}
%e {88, 162, 192, 382, 568, 598, 708, 1012, 1152, 2062, 2202, 2292} (End).
%e From _Bert Dobbelaere_, Nov 20 2019: (Start)
%e a(13) = 4641. Unique solution is the pair of sets
%e {1, 21, 135, 561, 735, 1045, 1801, 1825, 2445, 3355, 3661, 3705, 4641}
%e {172, 262, 556, 592, 862, 886, 1018, 1732, 1978, 1996, 2656, 3592, 4462} (End).
%K nonn,more,hard
%O 1,1
%A _Dmitry Kamenetsky_, Oct 28 2019
%E a(10)-a(12) from _Bert Dobbelaere_, Nov 17 2019
%E a(13) from _Bert Dobbelaere_, Nov 20 2019