login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 


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).
10
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,1
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).
EXAMPLE
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.
PROG
(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
CROSSREFS
KEYWORD
nonn,base,look
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 22 04:59 EDT 2024. Contains 376097 sequences. (Running on oeis4.)