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.

A210415 List the positions of all digits 1 in the concatenation of all terms, not necessarily in order. This is the lexicographically earliest such sequence.

This page as a plain text file.
%I A210415 #40 Apr 18 2021 02:15:15
%S A210415 1,3,10,6,11,7,21,13,15,17,19,101,24,100,29,102,34,103,39,104,44,105,
%T A210415 49,106,54,107,59,108,64,109,69,110,70,76,111,77,78,85,112,86,91,94,
%U A210415 113,95,211,1111,11111,1110,115,116,118,119,121,122,124,125,127,129
%N A210415 List the positions of all digits 1 in the concatenation of all terms, not necessarily in order. This is the lexicographically earliest such sequence.
%C A210415 Original name: "A self-describing sequence: The a(n) say the positions of the digits 1 inside the sequence when it is read as a string of digits."
%C A210415 For each n, the digit in position a(n) is equal to 1. At each step, choose the minimum integer not yet present in the sequence and not leading to a contradiction.
%C A210415 This sequence had been mentioned by Wasserman in 2008, cf. A098645, a variant of this sequence with additional restriction a(n+1) > a(n). - _M. F. Hasler_, Oct 08 2013
%H A210415 Danny Rorabaugh, <a href="/A210415/b210415.txt">Table of n, a(n) for n = 1..1000</a>
%H A210415 <a href="/index/Se#self-referencing_sequences">Index to the OEIS: Entries related to self-referencing sequences</a>.
%e A210415 The sequence starts with 1: the first digit is equal to 1. In the second position we cannot write 2 because the second digit would not be 1 but 2. Then we write 3. The third digit must be 1 and the minimum number starting with 1 is 10. And so on.
%o A210415 (Sage) #Returns the first n terms of this sequence for digit d
%o A210415 def dig_loc(d,n):
%o A210415   L, S = [], ""
%o A210415   while len(L)<n:
%o A210415     ext, new, lenS = 0, 0, len(S)
%o A210415     while new==0:
%o A210415       ext += 1
%o A210415       while d==0 and (lenS+ext+1 in L): ext += 1
%o A210415       d_s = [i for i in range(ext) if (lenS+i+1 in L)]
%o A210415       need = ext - len(d_s)
%o A210415       for i in range(10^(need-1)*(0 not in d_s), 10^(need)):
%o A210415         a = [str(0)]*(need - len(str(i))) + list(str(i))
%o A210415         for j in d_s: a.insert(j,d)
%o A210415         new = sum([int(a[ext-1-j])*10^j for j in range(ext)])
%o A210415         if ( new not in L ) and ( new>lenS or S[new-1]==str(d) ) and ( (new-lenS-1 not in range(ext)) or a[new-lenS-1]==str(d) ) and ( d!=0 or lenS+ext+1!=new ):
%o A210415           L.append(new)
%o A210415           S += str(new)
%o A210415           break
%o A210415         else: new = 0
%o A210415   return L
%o A210415 dig_loc(1,58) # _Danny Rorabaugh_, Nov 27 2015
%Y A210415 This construction for other decimal digits is A210414, A210416, A210417, A210418, A210419, A210420, A210421, A210422, A210423.
%Y A210415 Variants of this sequence include A098645, A098670, A114134, A167519.
%K A210415 nonn,base,nice
%O A210415 1,2
%A A210415 _Paolo P. Lava_, Mar 26 2012
%E A210415 Edited by _M. F. Hasler_, Oct 10 2013