cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A003607 Location of 0's when natural numbers are listed in binary.

Original entry on oeis.org

0, 3, 7, 8, 10, 14, 19, 20, 21, 23, 24, 27, 29, 31, 36, 37, 40, 45, 51, 52, 53, 54, 56, 57, 58, 61, 62, 64, 66, 67, 71, 73, 74, 76, 78, 81, 84, 86, 92, 93, 94, 97, 98, 102, 104, 107, 113, 114, 118, 124, 131, 132, 133, 134, 135, 137, 138, 139, 140, 143, 144
Offset: 0

Views

Author

Keywords

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a003607 n = a003607_list !! n
    a003607_list = elemIndices 0 a030190_list
    -- Reinhard Zumkeller, Dec 11 2011
    
  • Mathematica
    Position[IntegerDigits[Range[0, 100], 2] // Flatten, 0] - 1 // Flatten (* Jean-François Alcover, Oct 06 2016 *)
  • Python
    from itertools import count, islice
    def A003607_gen(): # generator of terms
        return (i for i, s in enumerate(d for n in count(0) for d in bin(n)[2:]) if s == '0')
    A003607_list = list(islice(A003607_gen(),30)) # Chai Wah Wu, Feb 18 2022

Formula

A030190(a(n)) = 0. [Reinhard Zumkeller, Dec 11 2011]

A056062 Run lengths in infinite binary Champernowne string (A030190) formed by concatenation of 0, 1, 2 ... in base 2.

Original entry on oeis.org

1, 2, 1, 3, 2, 1, 1, 3, 1, 4, 3, 1, 2, 2, 1, 1, 1, 1, 1, 4, 2, 2, 1, 4, 1, 5, 4, 1, 3, 2, 2, 1, 1, 1, 2, 3, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 5, 3, 2, 2, 3, 1, 1, 1, 2, 1, 5, 2, 3, 1, 5, 1, 6, 5, 1, 4, 2, 3, 1, 1, 1, 3, 3, 2, 1, 2, 1, 2, 1, 1, 2, 2, 2, 1, 1, 2, 4, 1, 1, 3, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 0

Views

Author

Helge Robitzsch (hrobi(AT)math.uni-goettingen.de), Jul 27 2000

Keywords

Examples

			The string starts with 011011100101110111... (concatenation of 0, 1, 10, 11, 100, 101, 110, 111, ...) so initial runs are 1, 2, 1, 3, ...
		

Crossrefs

Programs

  • Haskell
    import Data.List (group)
    a056062 n = a056062_list !! n
    a056062_list = map length $ group a030190_list
    -- Reinhard Zumkeller, Mar 26 2013
  • Mathematica
    Length /@ (Split@(Join @@ Table[ IntegerDigits[i, 2], {i, 0, 100}]))  (*  Olivier Gérard, Mar 27 2011 *)
    Length/@Split[Flatten[IntegerDigits[Range[0,50],2]]] (* Harvey P. Dale, May 24 2015 *)

Extensions

Edited by Charles R Greathouse IV, Apr 26 2010
Data corrected for n > 44 by Reinhard Zumkeller, Mar 26 2013
Showing 1-2 of 2 results.