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!)
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 A342735 A342750
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)