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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A114147 Self-describing sequence : 1 prime between two nonprimes, then 2 primes between two nonprimes, then 4 primes, then 5, then 7, etc. The quantity of primes in each run is given by the sequence itself. (Sequence is strictly increasing and the smallest next available nonprime is used when needed). 0
1, 2, 4, 5, 7, 8, 11, 13, 17, 19, 20, 23, 29, 31, 37, 41, 42, 43, 47, 53, 59, 61, 67, 71, 72, 73, 79, 83, 89, 97, 101, 103, 107, 108, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 168, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 240, 241 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

LINKS

Table of n, a(n) for n=1..61.

EXAMPLE

Runs of primes are between brackets:

1,(2),4,(5,7),8,(11,13,17,19),20,(23,29,31,37,41),42,(43,47,53,59,61,67,71)

.^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^

1 prime 2 pr. 4 primes 5 primes 7 primes (etc.) = the sequence itself

PROG

(PARI) {m=10; k=1; v=[k]; for(j=1, m, for(count=1, v[j], k=nextprime(k+1); v=concat(v, k)); while(isprime(k), k++); v=concat(v, k)); for(n=1, #v, print1(v[n], ", "))} \\ Klaus Brockhaus

CROSSREFS

Sequence in context: A076697 A001606 A014554 * A281276 A025516 A191174

Adjacent sequences:  A114144 A114145 A114146 * A114148 A114149 A114150

KEYWORD

base,easy,nonn,changed

AUTHOR

Eric Angelini and Alexandre Wajnberg

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 23 05:11 EDT 2021. Contains 345395 sequences. (Running on oeis4.)