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-10 of 158 results. Next

A337227 a(n) = difference between the starting positions of the first two occurrences of n in the Champernowne string (starting at 0) 01234567891011121314151617181920... (cf. A033307).

Original entry on oeis.org

11, 9, 13, 14, 15, 16, 17, 18, 19, 20, 180, 1, 19, 37, 55, 73, 91, 109, 127, 145, 221, 166, 1, 19, 37, 55, 73, 91, 109, 127, 231, 149, 233, 1, 19, 37, 55, 73, 91, 109, 241, 132, 243, 244, 1, 19, 37, 55, 73, 91, 251, 115, 253, 254, 255, 1, 19, 37, 55, 73, 261, 98, 263, 264, 265, 266, 1, 19
Offset: 0

Views

Author

Keywords

Comments

Consider the infinite string
01234567891011121314151617181920... (cf. A033307)
formed by the concatenation of all decimal digits of all nonnegative numbers. From the position of the first digit of the first occurrence of the number n find the number of digits one has to move forward to get to the start of the second occurrence of n. This is a(n).

Examples

			The infinite string corresponding to the concatenation of all decimal digits >=0 starts "012345678910111213141516171819202122232425....".
a(0) = 11 because '0' appears at positions 1 and 12.
a(1) = 9 because '1' appears at positions 2 and 11.
a(10) = 180 because '10' appears starting at positions 11 and 191.
a(11) = 1 because '11' appears starting at positions 13 and 14.
		

Crossrefs

Programs

  • Python
    from itertools import count
    def A337227(n):
        s1 = tuple(int(d) for d in str(n))
        s2 = s1
        for i, s in enumerate(int(d) for k in count(n+1) for d in str(k)):
            s2 = s2[1:]+(s,)
            if s2 == s1:
                return i+1 # Chai Wah Wu, Feb 18 2022

A065648 a(0) = 1 and for n > 0: a(n) = number of indices 0 <= i <= n with A033307(i)=A033307(n), where A033307 is the sequence of decimal digits of Champernowne's constant 0.123456789101112131415...

Original entry on oeis.org

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

Views

Author

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

Keywords

Crossrefs

Programs

  • Haskell
    a065648 n = a065648_list !! n
    a065648_list = f (0 : a033307_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

Extensions

Definition and offset adjusted to follow a later change of A033307. - Reinhard Zumkeller, Aug 13 2015

A071620 Integer lengths of the Champernowne primes (concatenation of first a(n) entries (digits) of A033307 is prime).

Original entry on oeis.org

10, 14, 24, 235, 2804, 4347, 37735
Offset: 1

Views

Author

Robert G. Wilson v, Jun 21 2002

Keywords

Comments

Next term has n > 113821. - Eric W. Weisstein, Nov 04 2015
Also: concatenation of A007376(1 .. a(n)) is prime. - M. F. Hasler, Oct 23 2019

Crossrefs

Cf. A007376 (infinite Barbier word = almost-natural numbers: write n in base 10 and juxtapose digits).
Cf. A033307 (decimal expansion of Champernowne constant), A176942 (the corresponding primes of length a(n)), A265043.
Cf. A072125.

Programs

  • Mathematica
    f[0] = 0; f[n_Integer] := 10^(Floor[Log[10, n]] + 1)*f[n - 1] + n; Do[If[PrimeQ[FromDigits[Take[IntegerDigits[f[n]], n]]], Print[n]], {n, 1, 3000}]
    Cases[FromDigits /@ Rest[FoldList[Append, {}, RealDigits[N[ChampernowneNumber[], 1000]][[1]]]],  p_?PrimeQ :> IntegerLength[p]] (* Eric W. Weisstein, Nov 04 2015 *)
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A071620_gen(): # generator of terms
        c, l = 0, 0
        for n in count(1):
            for d in str(n):
                c = 10*c+int(d)
                l += 1
                if isprime(c):
                    yield l
    A071620_list = list(islice(A071620_gen(),5)) # Chai Wah Wu, Feb 27 2023

Extensions

Edited by Charles R Greathouse IV, Apr 28 2010
a(6) = 4347 from Eric W. Weisstein, Jul 14 2013
a(7) = 37735 from Eric W. Weisstein, Jul 15 2013

A086044 Position of first occurrence of n in concatenated numbers (A033307, Champernowne constant).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 2, 17, 19, 21, 23, 25, 27, 29, 31, 16, 35, 3, 39, 41, 43, 45, 47, 49, 51, 18, 38, 57, 4, 61, 63, 65, 67, 69, 71, 20, 40, 60, 79, 5, 83, 85, 87, 89, 91, 22, 42, 62, 82, 101, 6, 105, 107, 109, 111, 24, 44, 64, 84, 104, 123, 7, 127
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 07 2003

Keywords

Comments

A033307(a(n)) = A000030(n).

Crossrefs

Programs

  • Mathematica
    With[{ch=Flatten[IntegerDigits/@Range[0,500]]},Table[ SequencePosition[ ch,IntegerDigits[n],1][[1]],{n,0,70}]][[All,1]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Sep 07 2020 *)

A252043 a(n) is the concatenation of first n terms of A033307.

Original entry on oeis.org

1, 12, 123, 1234, 12345, 123456, 1234567, 12345678, 123456789, 1234567891, 12345678910, 123456789101, 1234567891011, 12345678910111, 123456789101112, 1234567891011121, 12345678910111213, 123456789101112131, 1234567891011121314
Offset: 1

Views

Author

Keywords

Examples

			a(3)=123.
		

Crossrefs

Cf. A007908 (concatenate 1 through n), A033307.

Programs

  • Maple
    a[0]:= 0;
    count:= 0:
    for x from 1 to 30 do
      L:= convert(x,base,10);
      for i from 1 to nops(L) do
        count:= count+1;
        a[count]:= a[count-1]*10+L[-i];
      od
    od:
    seq(a[i],i=1..count); # Robert Israel, Jan 11 2015
  • Mathematica
    b[1] = 1
    b[n_] := b[n - 1]*10^(Floor[Log[10, 10n]]) + n
    Table[Floor[b[n] /10^(n)], {n, 10, 200}]
    Module[{nn=20,ch},ch=RealDigits[ChampernowneNumber[],10,nn][[1]];Table[ FromDigits[ Take[ch,n]],{n,nn}]] (* Harvey P. Dale, Aug 31 2015 *)
  • Python
    from itertools import islice
    def bgen(): yield from (c for n in count(1) for c in str(n) )
    def agen():
        s, g = "", bgen()
        while True:
            s += next(g); yield int(s)
    print(list(islice(agen(), 20))) # Michael S. Branicky, Oct 25 2022

Formula

a(n) = floor(C*10^n) with C the Champernowne constant, 0.123456789101112131415..., A033307.
a(n) = floor(A007908(n)/10^n) For n>=10.

Extensions

Definition corrected by Zak Seidov, Jan 18 2015

A058068 Denominators of convergents to Champernowne constant (A033307).

Original entry on oeis.org

1, 8, 73, 81, 12075796, 12075877, 24151673, 36227550, 169061873, 205289423, 374351296, 579640719, 2113273453, 9032734531, 11146007984, 20178742515, 31324750499, 490050000000
Offset: 0

Views

Author

N. J. A. Sloane, Nov 24 2000

Keywords

Comments

a(18) has 178 digits and is too large to include here. - Lucas A. Brown, Oct 22 2022

Crossrefs

Programs

  • Maple
    Digits := 100: E := A033307; convert(evalf(E),confrac,50,'cvgts'): cvgts;

Extensions

More terms from Robert Israel, Jan 06 2019

A058069 Numerators of convergents to Champernowne constant (A033307).

Original entry on oeis.org

0, 1, 9, 10, 1490839, 1490849, 2981688, 4472537, 20871836, 25344373, 46216209, 71560582, 260897955, 1115152402, 1376050357, 2491202759, 3867253116, 60499999499
Offset: 0

Views

Author

N. J. A. Sloane, Nov 24 2000

Keywords

Comments

a(18) has 177 digits and is too large to include here. - Lucas A. Brown, Sep 02 2022

Crossrefs

Programs

  • Maple
    Digits := 100: E := A033307; convert(evalf(E),confrac,50,'cvgts'): cvgts;
  • Mathematica
    Module[{champ=FromDigits[Flatten[IntegerDigits/@Range[20]]]}, Numerator[ Convergents[ champ/10^IntegerLength[champ]]]] (* Harvey P. Dale, Dec 17 2014 *)

Extensions

a(17) from Lucas A. Brown, Sep 02 2022

A086045 Position of second occurrence of n in concatenated numbers (A033307, Champernowne constant).

Original entry on oeis.org

12, 11, 16, 18, 20, 22, 24, 26, 28, 30, 191, 14, 15, 54, 74, 94, 114, 134, 154, 174, 252, 33, 36, 37, 76, 96, 116, 136, 156, 176, 282, 53, 55, 58, 59, 98, 118, 138, 158, 178, 312, 73, 75, 77, 80, 81, 120, 140, 160, 180, 342, 93, 95, 97, 99, 102, 103, 142
Offset: 0

Views

Author

Reinhard Zumkeller, Jul 07 2003

Keywords

Comments

A033307(a(n)) = A000030(n); a(n)>A086044(n);
A033307(a(n)+i) = A033307(A086044(n)+i), 0<=i < A055642(n).

Programs

  • Mathematica
    Join[{12},Module[{nn=350,cno},cno=Flatten[IntegerDigits/@Range[nn]];Table[ SequencePosition[ cno,IntegerDigits[n],2][[2,1]],{n,60}]]+1] (* Harvey P. Dale, Dec 09 2022 *)

A098732 Consider the sequence {b(n), n >= 1} of digits of the integers: 0 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... (A033307); a(n) = n - b(n).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 12, 12, 13, 14, 14, 16, 15, 18, 16, 20, 17, 22, 18, 24, 19, 26, 20, 28, 21, 29, 32, 31, 33, 33, 34, 35, 35, 37, 36, 39, 37, 41, 38, 43, 39, 45, 40, 47, 41, 48, 52, 50, 53, 52, 54, 54, 55, 56, 56, 58, 57, 60, 58, 62, 59, 64, 60, 66, 61, 67, 72, 69
Offset: 1

Views

Author

Alexandre Wajnberg, Sep 30 2004

Keywords

Crossrefs

Cf. A098727, etc.

Programs

  • Mathematica
    First[#]-Last[#]&/@Module[{ch=Flatten[IntegerDigits/@Range[ 0,50]]},Thread[ {Range[Length[ch]],ch}]] (* Harvey P. Dale, Oct 15 2014 *)

Extensions

More terms from Joshua Zucker, May 18 2006

A228584 Start with decimal expansion of Champernowne constant (A033307) and repeatedly remove the first digit between two neighbors (after the decimal point) having the same parity.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, Aug 26 2013

Keywords

Comments

Parity of digits is 1, 1, 0, 0, ... = A133872.

Examples

			Start with A033307 (decimal expansion of Champernowne's constant): 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,...
Now erase a digit when it is placed between two digits having the same parity -- and do this repeatedly.
Example:
1,2,3,... erase 2
You get now:
1,3,4,5,... erase 4
You get now: 1,3,5,... erase 3
You get now: 1,5,6,7,... erase 6
You get now: 1,5,7,... erase 5 etc.
The surviving digits are this sequence:
1,9,2,2,9,9,4,4,9,9,6,6,9,9,8,8,9,1,0,0,1,1,0,...
and the original "untouched" positive integers, A228585:
1, 29, 49, 69, 89, 219, 239, 259, 279, 419, 439, ...
We obtain a new constant,
0.1922994499669988910011003100510071...
		

Crossrefs

Cf. A033307, A133872, A228585 (untouched numbers in the removal process).
Showing 1-10 of 158 results. Next