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.

A033307 Decimal expansion of Champernowne constant (or Mahler's number), formed by concatenating the positive integers.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This number is known to be normal in base 10.
Named after David Gawen Champernowne (July 9, 1912 - August 19, 2000). - Robert G. Wilson v, Jun 29 2014

Examples

			0.12345678910111213141516171819202122232425262728293031323334353637383940414243...
		

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 6.9, p. 442.
  • G. Harman, One hundred years of normal numbers, in M. A. Bennett et al., eds., Number Theory for the Millennium, II (Urbana, IL, 2000), 149-166, A K Peters, Natick, MA, 2002.
  • C. A. Pickover, The Math Book, Sterling, NY, 2009; see p. 364.
  • H. M. Stark, An Introduction to Number Theory. Markham, Chicago, 1970, p. 172.

Crossrefs

See A030167 for the continued fraction expansion of this number.
A007376 is the same sequence but with a different interpretation.
Cf. A007908, A000027, A001191 (concatenate squares).
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 A054634 (b = 8), A031076 (b = 9), A007376 and this sequence (b = 10). - Jason Kimberley, Dec 06 2012
Cf. A065648.
Cf. A365237 (reciprocal).

Programs

  • Haskell
    a033307 n = a033307_list !! n
    a033307_list = concatMap (map (read . return) . show) [1..] :: [Int]
    -- Reinhard Zumkeller, Aug 27 2013, Mar 28 2011
    
  • Magma
    &cat[Reverse(IntegerToSequence(n)):n in[1..50]]; // Jason Kimberley, Dec 07 2012
    
  • Mathematica
    Flatten[IntegerDigits/@Range[0, 57]] (* 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[#, 10] &, 105] (* Robert G. Wilson v, Jul 23 2012 and modified Jul 04 2014 *)
    intermediate[n_] := Ceiling[FullSimplify[ProductLog[Log[10]/10^(1/9) (n - 1/9)] / Log[10] + 1/9]]; champerDigit[n_] := Mod[Floor[10^(Mod[n + (10^intermediate[n] - 10)/9, intermediate[n]] - intermediate[n] + 1) Ceiling[(9n + 10^intermediate[n] - 1)/(9intermediate[n]) - 1]], 10]; (* David W. Cantrell, Feb 18 2007 *)
    First[RealDigits[ChampernowneNumber[], 10, 100]] (* Paolo Xausa, May 02 2024 *)
  • PARI
    { default(realprecision, 20080); x=0; y=1; d=10.0; e=1.0; n=0; while (y!=x, y=x; n++; if (n==d, d=d*10); e=e*d; x=x+n/e; ); d=0; for (n=0, 20000, x=(x-d)*10; d=floor(x); write("b033307.txt", n, " ", d)); } \\ Harry J. Smith, Apr 20 2009
    
  • Python
    from itertools import count
    def agen():
        for k in count(1): yield from list(map(int, str(k)))
    a = agen()
    print([next(a) for i in range(104)]) # Michael S. Branicky, Sep 13 2021
  • Scala
    val numerStr = (1 to 100).map(Integer.toString()).toList.reduce( + _)
    numerStr.split("").map(Integer.parseInt()).toList // _Alonso del Arte, Nov 04 2019
    

Formula

Let "index" i = ceiling( W(log(10)/10^(1/9) (n - 1/9))/log(10) + 1/9 ) where W denotes the principal branch of the Lambert W function. Then a(n) = (10^((n + (10^i - 10)/9) mod i - i + 1) * ceiling((9n + 10^i - 1)/(9i) - 1)) mod 10. See also Mathematica code. - David W. Cantrell, Feb 18 2007