The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A133660 No sum of 2 or more terms equals a prime. 6
1, 3, 5, 87, 113, 1151, 5371, 199276, 32281747, 16946784207 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Sequence is infinite since the primes have density 0. - Charles R Greathouse IV, Apr 28 2011
LINKS
EXAMPLE
5 is a term of the series, as 5+1, 5+3 and 5+3+1 are all nonprime. The next term, 87, is the next number k such that k+1, k+3, k+1+3, k+5, k+1+5, k+3+5 and k+1+3+5 are all nonprime.
MATHEMATICA
(* first do *) Needs["Combinatorica`"] (* then *) lst = {}; g[k_] := Block[{j = 1, l = 2^Length@lst}, While[j < l && !PrimeQ[Plus @@ NthSubset[j, lst] + k], j++ ]; If[j == l, False, True]]; f[n_] := Block[{k = lst[[ -1]] + 1}, While[g[k] == True, k++ ]; AppendTo[lst, k]; k]; Do[Print@f@n, {n, 10}]; (* Robert G. Wilson v, Dec 31 2007 *)
(* Second program, avoids "Combinatorica`": *)
Nest[Append[#, Block[{k = Last@ # + 1}, While[AnyTrue[Total /@ Select[Subsets[Append[#, k]], Length@ # > 1 &], PrimeQ], k++ ]; k ] ] &, {1}, 6] (* Michael De Vlieger, Jun 11 2018 *)
CROSSREFS
Sequence in context: A182234 A308612 A082715 * A271925 A236365 A057663
KEYWORD
more,nonn
AUTHOR
Randy L. Ekl, Dec 28 2007
EXTENSIONS
a(9) from Robert G. Wilson v, Dec 31 2007
a(10) from Donovan Johnson, Feb 15 2008
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 16:26 EDT 2024. Contains 372554 sequences. (Running on oeis4.)