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!)
 A082554 Primes whose base-2 representation is a block of 1's, followed by a block of 0's, followed by a block of 1's. 0
 5, 11, 13, 17, 19, 23, 29, 47, 59, 61, 67, 71, 79, 97, 103, 113, 131, 191, 193, 199, 223, 227, 239, 241, 251, 257, 263, 271, 383, 449, 463, 479, 487, 499, 503, 509, 769, 911, 967, 991, 1009, 1019, 1021, 1031, 1039, 1087, 1151, 1279, 1543, 1567, 1663, 1823 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 COMMENTS The n-th prime is a term iff A100714(n) = 3. - Joseph Biberstine (jrbibers(AT)indiana.edu), Dec 11 2004 LINKS Eric Weisstein's World of Mathematics, "Run-Length Encoding." EXAMPLE 1987 = 11111000011_2, which is a block of 5 1's, followed by a block of 4 0's, followed by a block of 2 1's, so 1987 is a term. a(3)=17 is a term because it is the 3rd prime whose binary representation splits into exactly three runs: 17_10 = 10001_2 splits into {{1}, {0,0,0}, {1}}. MATHEMATICA Select[Table[Prime[k], {k, 1, 500}], Length[Split[IntegerDigits[ #, 2]]] == 3 &] PROG (PARI) decomp(s)=if(s%2==0, return(1), ); k=1; while(k==1, k=s%2; s=floor(s/2)); if(s==0, return(1), ); while(k==0, k=s%2; s=floor(s/2)); while(k==1, k=s%2; s=floor(s/2)); return(s) forprime(i=1, 2000, if(decomp(i)==0, print1(i, ", "))) CROSSREFS Cf. A100714, A000040. Sequence in context: A172988 A020604 A268476 * A141246 A288445 A087759 Adjacent sequences:  A082551 A082552 A082553 * A082555 A082556 A082557 KEYWORD nonn AUTHOR Randy L. Ekl, May 03 2003 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 September 23 05:22 EDT 2021. Contains 347609 sequences. (Running on oeis4.)