login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140460 a(0) = 2; thereafter a(n) = smallest integer not a multiple of an earlier terms nor a sum of two earlier terms. 1
2, 3, 7, 11, 17, 23, 29, 37, 41, 47, 53, 59, 65, 71, 79, 83, 89, 95, 101, 107, 113, 125, 131, 137, 149, 155, 163, 167, 173, 179, 191, 197, 211, 215, 223, 227, 233, 239, 247, 251, 257, 263, 269, 277, 281, 293, 305, 311, 317, 331, 335 (list; graph; refs; listen; history; internal format)
OFFSET

0,1

COMMENTS

Note that the first composite value is a(12) = 65 = 5 * 13, since 5 and 13 are first two primes sieved out of the sequence. Similarly, the second composite value is a(17) = 95 = 5 * 19, since 5 and 19 are first and third primes sieved out of the sequence. - Jonathan Vos Post (jvospost3(AT)gmail.com), Jul 27 2008

LINKS

Nathaniel Johnston, Table of n, a(n) for n = 0..10000

PROG

// C program void sieve(){ const int first = 2; const int max = 10000; bool member[max]; for(int i = first; i < max; ++i){ member[i] = true; } for(int i = first; i < max; ++i){ if(member[i]){ for(int x = i + i; x < max; x += i){ member[x] = false; } for(int j = first; j < i; ++j){ if(member[j] && i + j < max){ member[i + j] = false; } } } } int num = 0; for(int i = first; i < max; ++i){ if(member[i]){ printf("%i, ", i); num += 1; } } printf(" num = %i ", num); }

CROSSREFS

Cf. A000040, A002858, A008320, A054016, A075573, A085947.

Sequence in context: A155141 A127944 A045324 * A045325 A094066 A161921

Adjacent sequences:  A140457 A140458 A140459 * A140461 A140462 A140463

KEYWORD

easy,nonn

AUTHOR

Russell Y. Webb (r.webb(AT)elec.canterbury.ac.nz), Jul 22 2008

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 17:46 EST 2012. Contains 205835 sequences.