%I #19 Jan 20 2017 13:45:22
%S 1,8,24,24,86,1260,1890,14136,197400,10467660,1231572090
%N Lexicographically earliest sequence such that no subsequence sums to a prime.
%C This sequence is monotonically increasing.
%C So far, apart from a(4) this sequence is identical to A052349.
%e For n = 4, a(4) = 24 because all subsets have nonprime sums:
%e 1 + 8 = 9 = 3^2
%e 1 + 24 = 25 = 5^2
%e 8 + 24 = 32 = 2^5
%e 24 + 24 = 48 = 2^4*3
%e 1 + 8 + 24 = 33 = 3*11
%e 1 + 24 + 24 = 49 = 7^2
%e 8 + 24 + 24 = 56 = 2^3*7
%e 1 + 8 + 24 + 24 = 57 = 3*19
%p S:= {0}: count:= 0:
%p x:= 1:
%p while x < 10^6 do
%p if ormap(s -> isprime(s+x), S) then x:= x+1
%p else
%p count:= count+1;
%p A[count]:= x;
%p S:= S union map(`+`,S,x);
%p fi
%p od:
%p seq(A[i],i=1..count); # _Robert Israel_, Jan 20 2017
%t t = {1}; c = 1; Print[1]; While[Length[t] < 11, r = Rest[Subsets[t]]; s = Table[Total[r[[i]]], {i, Length[r]}]; While[PrimeQ[c] || Union[PrimeQ[s + c]] != {False}, c++]; Print[c]; AppendTo[t, c]] (* _Hans Havermann_, Jan 20 2017 *)
%Y Cf. A052349.
%K nonn,hard,more
%O 1,2
%A _Peter Kagey_, Jan 07 2017
%E a(9) and a(10) from _Dmitry Kamenetsky_, Jan 12 2017
%E a(11) from _Hans Havermann_, Jan 20 2017