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.

A340490 a(n) is the number of digits after the n-th digit of the Champernowne constant A033307 until the next appearance of that digit.

This page as a plain text file.
%I A340490 #48 Sep 13 2021 08:52:36
%S A340490 9,13,14,15,16,17,18,19,20,2,20,1,1,2,15,2,20,2,20,2,20,2,20,2,20,2,
%T A340490 20,5,20,2,20,2,20,1,1,2,13,2,20,2,20,2,20,2,20,2,20,7,20,2,20,2,20,2,
%U A340490 20,1,1,2,11,2,20,2,20,2,20,2,20,9,20,2,20,2,20,2
%N A340490 a(n) is the number of digits after the n-th digit of the Champernowne constant A033307 until the next appearance of that digit.
%C A340490 In typing the positive integers without leaving spaces between them, it is interesting to see how many places later we press the same number key on the keyboard. This sequence answers that question.
%H A340490 Md. Towhidul Islam, <a href="/A340490/b340490.txt">Table of n, a(n) for n = 1..31968</a>
%F A340490 A033307(n - 1 + a(n)) = A033307(n - 1).
%e A340490 In concatenating the positive integers, we get 1 first. The next occurrence of 1 is in 10. So 1 occurs 9 places later, which gives a(1)=9. The second digit 2 occurs again in writing 12. So 2 occurs 13 places later and a(2) is 13.
%o A340490 (PARI) C(nn) = {my(list = List()); for (n=1, nn, my(d=digits(n)); for (k=1, #d, listput(list, d[k]););); list;} \\ A033307
%o A340490 posi(list, i) = {for (j=i+1, #list, if (list[i] == list[j], return (j-i)););}
%o A340490 lista(nn) = {my(list = C(nn)); my(listp = List()); for (i=1, #list, my(pos = posi(list, i)); if (! pos, break); listput(listp, pos);); Vec(listp);} \\ _Michel Marcus_, Jan 11 2021
%o A340490 (Python)
%o A340490 def aupton(terms):
%o A340490     alst, chapnk, k = [], [1], 1
%o A340490     for n in range(1, terms+1):
%o A340490         chapn = chapnk.pop(0)
%o A340490         while chapn not in chapnk:
%o A340490             k += 1
%o A340490             chapnk.extend(list(map(int, str(k))))
%o A340490         alst.append(chapnk.index(chapn) + 1)
%o A340490     return alst
%o A340490 print(aupton(74)) # _Michael S. Branicky_, Sep 13 2021
%Y A340490 Cf. A033307 (the parent sequence).
%K A340490 nonn,base
%O A340490 1,1
%A A340490 _Md. Towhidul Islam_, Jan 10 2021