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.

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

A065649 Permutation of nonnegative integers based on Champernowne's constant 0.123456789101112131415...

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10, 21, 31, 41, 12, 51, 13, 61, 14, 71, 15, 81, 16, 91, 17, 101, 18, 111, 19, 22, 20, 32, 121, 42, 52, 62, 23, 72, 24, 82, 25, 92, 26, 102, 27, 112, 28, 122, 29, 33, 30, 43, 131, 53, 132, 63, 73, 83, 34, 93, 35, 103, 36, 113, 37, 123, 38
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Nov 09 2001

Keywords

Comments

A261293(n) = a(a(n)). - Reinhard Zumkeller, Aug 14 2015

Crossrefs

Cf. A261279 (fixed points), A261293, A261333.

Programs

  • Haskell
    a065649 n = a065649_list !! n
    a065649_list = zipWith (+)
                   (map ((* 10) . subtract 1) a065648_list) (0 : a033307_list)
    -- Reinhard Zumkeller, Aug 13 2015

Formula

a(n) = if n = 0 then 0 else 10*(A065648(n)-1) + A033307(n-1).

Extensions

Offset and defining formula adjusted by Reinhard Zumkeller, Aug 13 2015

A065650 Inverse permutation to A065649.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 10, 15, 17, 19, 21, 23, 25, 27, 29, 31, 12, 30, 37, 39, 41, 43, 45, 47, 49, 51, 13, 32, 50, 59, 61, 63, 65, 67, 69, 71, 14, 34, 52, 70, 81, 83, 85, 87, 89, 91, 16, 35, 54, 72, 90, 103, 105, 107, 109, 111, 18, 36, 56, 74, 92, 110, 125, 127
Offset: 0

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Nov 09 2001

Keywords

Crossrefs

Cf. A261279 (fixed points), A261294.

Programs

  • Haskell
    import Data.List (elemIndex); import Data.Maybe (fromJust)
    a065650 = fromJust . (`elemIndex` a065649_list)
    -- Reinhard Zumkeller, Aug 13 2015

Extensions

Offset changed by Reinhard Zumkeller, Aug 13 2015

A256100 In S = A007376 (read as a sequence) the digit S(n) appears a(n) times in the sequence S(1), ..., S(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 3, 4, 5, 2, 6, 2, 7, 2, 8, 2, 9, 2, 10, 2, 11, 2, 12, 2, 3, 2, 4, 13, 5, 6, 7, 3, 8, 3, 9, 3, 10, 3, 11, 3, 12, 3, 13, 3, 4, 3, 5, 14, 6, 14, 7, 8, 9, 4, 10, 4, 11, 4, 12, 4, 13, 4, 14, 4, 5, 4, 6, 15, 7, 15, 8, 15, 9, 10, 11, 5, 12, 5, 13, 5, 14, 5, 15, 5, 6
Offset: 1

Views

Author

Wolfdieter Lang, Apr 08 2015

Keywords

Comments

The motivation to consider this sequence came from the proposal A256379 by Anthony Sand.
This sequence can also be read as an irregular triangle (array) in which a(n, k) is the number of appearances of the k-th digit of n in the digits of 1, ... ,n-1 and the first k digits of n. See the example for the head of this array. The row length is A055842(n), n >= 1.
This can also be described as the ordinal transform of A007376. - Franklin T. Adams-Watters, Oct 10 2015

Examples

			a(10) = 2 because A007376(10) = 1 and that sequence up to n=10 is 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, and 1 appears twice.
a(24) = 10 because A007376(24) = 1 and this is the tenth 1 in A007376 up to, and including, A007376(24).
Read as a tabf array a(n, k) with row length A055842(n) this begins:
   n\k  1  2  ...
   1:   1
   2:   1
   3:   1
   4:   1
   5:   1
   6:   1
   7:   1
   8:   1
   9:   1
  10:   2  1
  11:   3  4
  12:   5  2
  13:   6  2
  14:   7  2
  15:   8  2
  16:   9  2
  17:  10  2
  18:  11  2
  19:  12  2
  20:   3  2
  ...
		

Crossrefs

Programs

  • Haskell
    a256100 n = a256100_list !! (n-1)
    a256100_list = f a007376_list $ take 10 $ repeat 1 where
       f (d:ds) counts = y : f ds (xs ++ (y + 1) : ys) where
                               (xs, y:ys) = splitAt d counts
    -- Reinhard Zumkeller, Aug 13 2015
  • Mathematica
    lim = 120; s = Flatten[IntegerDigits /@ Range@ lim]; f[n_] := Block[{d = IntegerDigits /@ Take[s, n] // Flatten // FromDigits}, DigitCount[d][[If[ s[[n]] == 0, 10, s[[n]] ]] ] ]; Array[f, lim] (* Michael De Vlieger, Apr 08 2015, after Robert G. Wilson v at A007376 *)

Formula

a(n) gives the number of digits A007376(n) in the sequence starting with A007376(1) and ending with A007376(n).

A359663 a(1) = 1; for n > 1, a(n) is the smallest positive number which has not appeared that shares a factor with the sum of the first n terms of the Champernowne string starting from 1.

Original entry on oeis.org

1, 3, 2, 4, 5, 6, 7, 8, 9, 10, 12, 47, 14, 21, 15, 13, 11, 16, 18, 61, 20, 67, 73, 22, 24, 26, 25, 28, 30, 17, 27, 32, 33, 107, 109, 36, 19, 29, 34, 38, 127, 39, 35, 137, 40, 42, 44, 45, 48, 46, 49, 51, 43, 50, 54, 52, 57, 31, 55, 193, 56, 60, 23, 58, 62, 64, 63, 66, 65, 68, 70, 72, 69, 77, 75, 37
Offset: 1

Views

Author

Scott R. Shannon, Jan 10 2023

Keywords

Comments

For the Champernowne string starting from 1 see A033307. In the first 100000 terms there are 45 fixed points: 1, 4, 5, 6, 7, ..., 252, 264, 319. It is plausible no more exist. The sequence is conjectured to be a permutation of the positive integers.

Examples

			a(3) = 2 as the sum of the first 3 terms of the Champernowne string is 1 + 2 + 3 = 6, and 2 is the smallest unused number that shares a factor with 6.
a(10) = 10 as the sum of the first 10 terms of the Champernowne string is 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 1 = 46, and 10 is the smallest unused number that shares a factor with 46.
		

Crossrefs

Cf. A033307, A065648, A359114 (base-2), A027749.
Showing 1-5 of 5 results.