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).

This page as a plain text file.
%I A337227 #32 Feb 18 2022 19:13:07
%S A337227 11,9,13,14,15,16,17,18,19,20,180,1,19,37,55,73,91,109,127,145,221,
%T A337227 166,1,19,37,55,73,91,109,127,231,149,233,1,19,37,55,73,91,109,241,
%U A337227 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
%N 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).
%C A337227 Consider the infinite string
%C A337227    01234567891011121314151617181920... (cf. A033307)
%C A337227 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).
%H A337227 Scott R. Shannon, <a href="/A337227/a337227_1.png">Image of the first 100000 terms</a>.
%e A337227 The infinite string corresponding to the concatenation of all decimal digits >=0 starts "012345678910111213141516171819202122232425....".
%e A337227 a(0) = 11 because '0' appears at positions 1 and 12.
%e A337227 a(1) = 9 because '1' appears at positions 2 and 11.
%e A337227 a(10) = 180 because '10' appears starting at positions 11 and 191.
%e A337227 a(11) = 1 because '11' appears starting at positions 13 and 14.
%o A337227 (Python)
%o A337227 from itertools import count
%o A337227 def A337227(n):
%o A337227     s1 = tuple(int(d) for d in str(n))
%o A337227     s2 = s1
%o A337227     for i, s in enumerate(int(d) for k in count(n+1) for d in str(k)):
%o A337227         s2 = s2[1:]+(s,)
%o A337227         if s2 == s1:
%o A337227             return i+1 # _Chai Wah Wu_, Feb 18 2022
%Y A337227 Cf. A007376, A331162, A033307.
%Y A337227 Cf. A342162.
%K A337227 nonn,base,look
%O A337227 0,1
%A A337227 _Scott R. Shannon_ and _N. J. A. Sloane_, Aug 19 2020