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-5 of 5 results.

A030190 Binary Champernowne sequence (or word): write the numbers 0,1,2,3,4,... in base 2 and juxtapose.

Original entry on oeis.org

0, 1, 1, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0
Offset: 0

Views

Author

Keywords

Comments

a(A003607(n)) = 0 and for n > 0: a(A030303(n)) = 1. - Reinhard Zumkeller, Dec 11 2011
An irregular table in which the n-th row lists the bits of n (see the example section). - Jason Kimberley, Dec 07 2012
The binary Champernowne constant: it is normal in base 2. - Jason Kimberley, Dec 07 2012
This is the characteristic function of A030303, which gives the indices of 1's in this sequence and has first differences given by A066099. - M. F. Hasler, Oct 12 2020

Examples

			As an array, this begins:
0,
1,
1, 0,
1, 1,
1, 0, 0,
1, 0, 1,
1, 1, 0,
1, 1, 1,
1, 0, 0, 0,
1, 0, 0, 1,
1, 0, 1, 0,
1, 0, 1, 1,
1, 1, 0, 0,
1, 1, 0, 1,
1, 1, 1, 0,
1, 1, 1, 1,
1, 0, 0, 0, 0,
1, 0, 0, 0, 1,
...
		

References

  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.

Crossrefs

Cf. A007376, A003137, A030308. Same as and more fundamental than A030302, but I have left A030302 in the OEIS because there are several sequences that are based on it (A030303 etc.). - N. J. A. Sloane.
a(n) = T(A030530(n), A083652(A030530(n))-n-1), T as defined in A083651, a(A083652(k))=1.
Tables in which the n-th row lists the base b digits of n: this sequence and A030302 (b=2), A003137 and A054635 (b=3), A030373 (b=4), A031219 (b=5), A030548 (b=6), A030998 (b=7), A031035 and A054634 (b=8), A031076 (b=9), A007376 and A033307 (b=10). - Jason Kimberley, Dec 06 2012
A076478 is a similar sequence.
For run lengths see A056062; see also A318924.
See also A066099 for (run lengths of 0s) + 1 = first difference of positions of 1s given by A030303.

Programs

  • Haskell
    import Data.List (unfoldr)
    a030190 n = a030190_list !! n
    a030190_list = concatMap reverse a030308_tabf
    -- Reinhard Zumkeller, Jun 16 2012, Dec 11 2011
    
  • Magma
    [0]cat &cat[Reverse(IntegerToSequence(n,2)):n in[1..31]]; // Jason Kimberley, Dec 07 2012
    
  • Mathematica
    Flatten[ Table[ IntegerDigits[n, 2], {n, 0, 26}]] (* Robert G. Wilson v, Mar 08 2005 *)
    First[RealDigits[ChampernowneNumber[2], 2, 100, 0]] (* Paolo Xausa, Jun 16 2024 *)
  • PARI
    A030190_row(n)=if(n,binary(n),[0]) \\ M. F. Hasler, Oct 12 2020
    
  • Python
    from itertools import count, islice
    def A030190_gen(): return (int(d) for m in count(0) for d in bin(m)[2:])
    A030190_list = list(islice(A030190_gen(),30)) # Chai Wah Wu, Jan 07 2022

A030303 Position of n-th 1 in A030302.

Original entry on oeis.org

1, 2, 4, 5, 6, 9, 11, 12, 13, 15, 16, 17, 18, 22, 25, 26, 28, 30, 32, 33, 34, 35, 38, 39, 41, 42, 43, 44, 46, 47, 48, 49, 50, 55, 59, 60, 63, 65, 68, 69, 70, 72, 75, 77, 79, 80, 82, 83, 85, 87, 88, 89, 90, 91, 95, 96, 99, 100, 101, 103, 105, 106, 108, 109, 110, 111, 112, 115, 116, 117, 119, 120
Offset: 1

Views

Author

Keywords

Comments

Partial sums of A066099; also positions of 1's in the Champernowne word A030190 which therefore is the characteristic function of this sequence seen as a set. The graph of this sequence has a self-similar shape with increasingly important "cusps" at indices given by A005183, which also indexes records in A066099. - M. F. Hasler, Oct 12 2020

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndices)
    a030303 n = a030303_list !! n
    a030303_list = elemIndices 1 a030190_list
    -- Reinhard Zumkeller, Dec 11 2011
    
  • Mathematica
    Flatten[Position[Flatten[IntegerDigits[Range[30],2]],1]] (* Harvey P. Dale, Jan 04 2015 *)
  • PARI
    select(t->t,concat([binary(n)|n<-[1..30]]),1) \\ M. F. Hasler, Oct 10 2020
    
  • Python
    from itertools import count, islice
    def A030303_gen(): # generator of terms
        return (i + 1 for i, s in enumerate(d for n in count(1) for d in bin(n)[2:]) if s == '1')
    A030303_list = list(islice(A030303_gen(),30)) # Chai Wah Wu, Feb 18 2022

Formula

A030190(a(n)) = 1. - Reinhard Zumkeller, Dec 11 2011
a(n) = Sum_{k=1..n} A066099(k). - M. F. Hasler, Oct 12 2020

Extensions

More terms from M. F. Hasler, Oct 12 2020

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

A030306 Length of n-th run of 1's in A030302.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

A379036 Indices of zeros in binary concatenation of primes.

Original entry on oeis.org

1, 5, 11, 16, 19, 20, 21, 24, 25, 29, 36, 44, 45, 47, 50, 52, 53, 56, 58, 62, 69, 71, 76, 83, 86, 87, 88, 89, 93, 94, 95, 100, 101, 103, 104, 107, 108, 114, 116, 117, 121, 124, 125, 129, 130, 131, 132, 136, 137, 139, 143, 144, 150, 152, 157, 160, 165, 166, 167
Offset: 1

Views

Author

Alexandre Herrera, Dec 14 2024

Keywords

Comments

The initial bit is labeled as bit 0.

Examples

			The primes, their binary expansions, and positions of successive zero bits, begin
   prime    2  3   5   7   11 ...
   binary  10 11 101 111 1011 ...
   zeros    ^     ^       ^
   a(n) =   1     5      11   ...
		

Crossrefs

Programs

  • Mathematica
    seq[lim_] := -1 + Position[Flatten@ IntegerDigits[Prime[Range[lim]], 2], 0] // Flatten; seq[30] (* Amiram Eldar, Dec 31 2024 *)
  • Python
    import sympy
    l = []
    bin_primes = ""
    for i in range(1,27):
        bin_primes += bin(sympy.prime(i))[2:]
    for i in range(len(bin_primes)):
        if bin_primes[i] == '0':
            l.append(i)
    print(l)
Showing 1-5 of 5 results.