The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A120797 a(0) = 1. a(n) = n + (largest noncomposite {1 or prime} occurring earlier in the sequence). 0
 1, 2, 4, 5, 9, 10, 11, 18, 19, 28, 29, 40, 41, 54, 55, 56, 57, 58, 59, 78, 79, 100, 101, 124, 125, 126, 127, 154, 155, 156, 157, 188, 189, 190, 191, 226, 227, 264, 265, 266, 267, 268, 269, 312, 313, 358, 359, 406, 407, 408, 409, 460, 461, 514, 515, 516, 517, 518 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 LINKS EXAMPLE Among terms a(0) through a(9), a(8) = 19 is the largest noncomposite. So a(10) = 10 + 19 = 29. PROG (PARI) {m=58; print1(a=1, ", "); v=[a]; for(n=1, m, v=vecsort(v); j=#v; a=0; while(a<1, k=v[j]; if(isprime(k)||k==1, print1(a=n+k, ", "); v=concat(v, a), j--)))} - (Klaus Brockhaus, Aug 17 2006) CROSSREFS Sequence in context: A072795 A189099 A189658 * A284389 A047613 A036795 Adjacent sequences:  A120794 A120795 A120796 * A120798 A120799 A120800 KEYWORD nonn AUTHOR Leroy Quet, Jul 05 2006 EXTENSIONS More terms from Klaus Brockhaus, Aug 17 2006 STATUS approved

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

Last modified February 23 12:38 EST 2020. Contains 332159 sequences. (Running on oeis4.)