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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A140378 Lengths of runs of consecutive primes and nonprimes in A007775. 2
1, 12, 1, 6, 1, 3, 1, 6, 2, 2, 1, 2, 1, 3, 1, 2, 1, 3, 1, 4, 2, 1, 2, 6, 1, 1, 1, 1, 1, 6, 2, 1, 2, 4, 3, 2, 2, 4, 1, 1, 1, 1, 1, 3, 1, 2, 2, 1, 1, 2, 1, 2, 1, 3, 1, 4, 2, 1, 1, 2, 2, 3, 2, 2, 4, 2, 2, 1, 1, 4, 2, 1, 1, 4, 1, 3, 2, 1, 1, 3, 1, 3, 2, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 2, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Primes can be classified according to their remainder modulo 30: remainder 1 (A136066), 7 (A132231), 11 (A132232), 13 (A132233), 17 (A039949), 19 (A132234), 23 (A132235), or 29 (A132236). In the sequence A007775 of all numbers (prime or nonprime) in any of these remainder classes, we look for runs of numbers that are successively prime or nonprime and place the lengths of these runs in this sequence.

LINKS

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

EXAMPLE

Groups of runs in A007775 are (1), (7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47), (49), (53, 59, 61, 67, 71, 73), (77), (79, 83,...), which is 1 nonprime followed by 12 primes followed by 1 nonprime followed by 6 primes etc.

MAPLE

A007775 := proc(n) option remember ; local a; if n = 1 then 1; else for a from A007775(n-1)+1 do if a mod 2 <>0 and a mod 3 <>0 and a mod 5 <> 0 then RETURN(a) ; fi ; od: fi ; end: A := proc() local al, isp, n; al := 0: isp := false ; n := 1: while n< 300 do a := A007775(n) ; if isprime(a) <> isp then printf("%d, ", al) ; al := 1; isp := not isp ; else al := al+1 ; fi ; n := n+1: od: end: A() ; # R. J. Mathar, Jun 16 2008

CROSSREFS

Cf. A136066, A132231, A132232, A132233, A039919, A132234, A132235, A132236.

Sequence in context: A270004 A040151 A010213 * A085094 A010214 A318489

Adjacent sequences:  A140375 A140376 A140377 * A140379 A140380 A140381

KEYWORD

nonn

AUTHOR

Juri-Stepan Gerasimov, Jun 13 2008

EXTENSIONS

Edited by R. J. Mathar, Jun 16 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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 21 22:32 EDT 2019. Contains 326169 sequences. (Running on oeis4.)