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.

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