A278076 Sums of finite subsequences of A280708.
0, 1, 8, 9, 24, 25, 32, 33, 48, 49, 56, 57, 86, 87, 94, 95, 110, 111, 118, 119, 134, 135, 142, 143, 1260, 1261, 1268, 1269, 1284, 1285, 1292, 1293, 1308, 1309, 1316, 1317, 1346, 1347, 1354, 1355, 1370, 1371, 1378, 1379, 1394, 1395, 1402, 1403, 1890, 1891, 1898
Offset: 1
Keywords
Links
- Robert Israel, Table of n, a(n) for n = 1..768
Crossrefs
Cf. A280708.
Programs
-
Maple
S:= {0}: # adapted from A280708 x:= 1: while x < 10^4 do if ormap(s -> isprime(s+x), S) then x:= x+1 else S:= S union map(`+`, S, x) fi od: sort(convert(S,list));
-
Mathematica
S = {0}; x = 1; While[x < 2000, If[AnyTrue[S, PrimeQ[#+x]&], x++, S = S ~Union~ (S+x)]]; S (* Jean-François Alcover, Apr 29 2019 *)
-
SageMath
def A278076(bound): x, y, S = 1, 1, {0} while x < bound: if any(is_prime(s+x) for s in S): x += 1 else: y = x S = S.union(s+x for s in S) return [s for s in sorted(S) if s <= y] print(A278076(10^5))