A052349 Lexicographically earliest sequence of distinct positive integers such that no subsequence sums to a prime.
1, 8, 24, 25, 86, 1260, 1890, 14136, 197400, 10467660, 1231572090, 682616834970
Offset: 1
Examples
a(4) = 25 as 25+1, 25+8, 25+24, 25+1+8, 25+1+24, 25+8+24 and finally 25+1+8+24 all are composite numbers.
Links
- Chris Nash, Proof that A052349, A128687, and A128688 are infinite [Cached copy of proof, from The Prime Puzzles and Problems website]
- Carlos Rivera, Puzzle 84. Non-primes adding up to non-primes, The Prime Puzzles and Problems Connection.
Crossrefs
Programs
-
Mathematica
a[1]=1; a[n_]:=a[n]=(s=Subsets[Array[a,n-1],n-1]; c=a[n-1]; While[d=1;While[!PrimeQ[Total[s[[d]]]+c]&&d
Giorgos Kalogeropoulos, Nov 19 2021 *) -
Python
from sympy import isprime from itertools import islice def agen(start=1): # generator of terms alst, k, sums = [start], 1, {0} | {start} while True: yield alst[-1] while any(isprime(k + s) for s in sums): k += 1 alst.append(k) sums.update([k + s for s in sums]) k += 1 print(list(islice(agen(), 9))) # Michael S. Branicky, Dec 12 2022
Extensions
One more term from T. D. Noe, Mar 20 2007
a(12) from Donovan Johnson, Jun 26 2010
New name from Charles R Greathouse IV, Jan 13 2014
Name clarified by Peter Kagey, Jan 07 2017
Comments