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.

A054634 Champernowne sequence: write n in base 8 and juxtapose.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Apr 16 2000

Keywords

Comments

Apart from the initial term, identical to A031035.
Should not be merged with A031035 because there are many sequences which depend on the latter starting with a 1. - N. J. A. Sloane, Jan 30 2010
An irregular table in which the n-th row lists the base-8 digits of n. - Jason Kimberley, Dec 07 2012
The base-8 Champernowne constant: it is normal in base 8. - Jason Kimberley, Dec 07 2012

Crossrefs

Tables in which the n-th row lists the base b digits of n: A030190 and A030302 (b=2), A003137 and A054635 (b=3), A030373 (b=4), A031219 (b=5), A030548 (b=6), A030998 (b=7), A031035 and this sequence (b=8), A031076 (b=9), A007376 and A033307 (b=10). - Jason Kimberley, Dec 06 2012

Programs

  • Magma
    [0]cat &cat[Reverse(IntegerToSequence(n,8)):n in[1..31]]; // Jason Kimberley, Dec 07 2012
    
  • Mathematica
    Flatten[ IntegerDigits[ Range[0, 40], 8]] (* or *)
    almostNatural[n_, b_] := Block[{m = 0, d = n, i = 1, l, p}, While[m <= d, l = m; m = (b - 1) i*b^(i - 1) + l; i++]; i--; p = Mod[d - l, i]; q = Floor[(d - l)/i] + b^(i - 1); If[p != 0, IntegerDigits[q, b][[p]], Mod[q - 1, b]]]; Array[ almostNatural[#, 8] &, 105, 0] (* Robert G. Wilson v, Jun 29 2014 *)
  • Python
    from itertools import count, chain, islice
    from sympy.ntheory.factor_ import digits
    def A054634_gen(): return chain.from_iterable(digits(m, 8)[1:] for m in count(0))
    A054634_list = list(islice(A054634_gen(), 30)) # Chai Wah Wu, Jan 07 2022