Displaying 1-7 of 7 results found.
page
1
List the positions of all digits 9 in the concatenation of all terms, not necessarily in order. This is the lexicographically earliest such sequence.
+10
14
2, 9, 4, 90, 7, 91, 92, 13, 93, 17, 94, 21, 95, 25, 96, 29, 97, 28, 35, 98, 39, 99, 38, 40, 47, 900, 52, 901, 57, 902, 62, 903, 67, 904, 72, 905, 77, 906, 82, 907, 87, 908, 999, 9999, 9990, 104, 909, 106, 113, 910, 119, 911, 118, 128, 912, 134, 913, 139, 143
COMMENTS
See A210415 for comments, links, and code.
EXAMPLE
The sequence cannot start with 1 because the first digit is not 9. Let us start with 2: the second digit is equal to 9. The third digit cannot be 3 because the third digit is not 9. So let it be 4. In the next position we now have 90 because it is the minimum number greater than 8 and starting with the digit 9. And so on.
List the positions of all digits 1 in the concatenation of all terms, not necessarily in order. This is the lexicographically earliest such sequence.
+10
13
1, 3, 10, 6, 11, 7, 21, 13, 15, 17, 19, 101, 24, 100, 29, 102, 34, 103, 39, 104, 44, 105, 49, 106, 54, 107, 59, 108, 64, 109, 69, 110, 70, 76, 111, 77, 78, 85, 112, 86, 91, 94, 113, 95, 211, 1111, 11111, 1110, 115, 116, 118, 119, 121, 122, 124, 125, 127, 129
COMMENTS
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."
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.
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
EXAMPLE
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.
PROG
(Sage) #Returns the first n terms of this sequence for digit d
def dig_loc(d, n):
L, S = [], ""
while len(L)<n:
ext, new, lenS = 0, 0, len(S)
while new==0:
ext += 1
while d==0 and (lenS+ext+1 in L): ext += 1
d_s = [i for i in range(ext) if (lenS+i+1 in L)]
need = ext - len(d_s)
for i in range(10^(need-1)*(0 not in d_s), 10^(need)):
a = [str(0)]*(need - len(str(i))) + list(str(i))
for j in d_s: a.insert(j, d)
new = sum([int(a[ext-1-j])*10^j for j in range(ext)])
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 ):
L.append(new)
S += str(new)
break
else: new = 0
return L
List the positions of all digits 4 in the concatenation of all terms, not necessarily in order. This is the lexicographically earliest such sequence.
+10
8
2, 4, 5, 44, 7, 40, 11, 41, 14, 17, 42, 21, 43, 24, 27, 45, 31, 46, 34, 37, 47, 54, 444, 4444, 48, 52, 404, 57, 400, 62, 401, 67, 402, 72, 403, 77, 405, 82, 406, 87, 407, 92, 408, 97, 409, 103, 410, 109, 411, 114, 118, 412, 124, 413, 123, 133, 414, 135, 140
COMMENTS
See A210415 for comments, links, and code.
EXAMPLE
The sequence cannot start with 1 because the first digit is not 4. Let us start with 2: the second digit is 4. So in the second position we have 4. The third digit cannot be 3 because the third digit is not 4. So let it be 5. In the next position we now have 44. And so on.
List the positions of all digits 5 in the concatenation of all terms, not necessarily in order. This is the lexicographically earliest such sequence.
+10
8
2, 5, 4, 55, 7, 50, 11, 51, 15, 52, 14, 21, 53, 25, 54, 24, 31, 56, 35, 57, 34, 41, 58, 45, 59, 44, 65, 555, 5555, 550, 63, 505, 68, 500, 73, 501, 78, 502, 83, 503, 88, 504, 93, 506, 98, 507, 104, 508, 110, 509, 115, 119, 510, 125, 511, 124, 134, 512, 140, 513
COMMENTS
See A210415 for comments, links, and code.
EXAMPLE
The sequence cannot start with 1 because the first digit is not 5. Let us start with 2: the second digit is equal to 5. The third digit cannot be 3 because the third digit is not 5. So let it be 4. The next term must begin with a 5 because 4 is already in the sequence. Since 5 is also a previous term, it must be 55. With 2,4,5 already used, and 1,3,6 pointing at digits that are not 5, the next term must be 7.
List the positions of all digits 6 in the concatenation of all terms, not necessarily in order. This is the lexicographically earliest such sequence.
+10
8
2, 6, 4, 60, 61, 9, 62, 13, 63, 16, 19, 64, 23, 65, 26, 29, 66, 30, 35, 67, 39, 68, 43, 69, 46, 49, 600, 54, 601, 59, 666, 6666, 66660, 73, 602, 78, 603, 83, 604, 88, 605, 93, 606, 95, 101, 607, 106, 110, 608, 116, 609, 115, 125, 610, 131, 611, 136, 140, 612
COMMENTS
See A210415 for comments, links, and code.
EXAMPLE
The sequence cannot start with 1 because the first digit is not 6. Let us start with 2: the second digit is equal to 6. The third digit cannot be 3 because the third digit is not 6. So let it be 4. In the next position we now have 60 because it is the minimum number greater than 6 and starting with the digit 6. And so on.
List the positions of all digits 7 in the concatenation of all terms, not necessarily in order. This is the lexicographically earliest such sequence.
+10
8
2, 7, 4, 70, 8, 77, 11, 71, 15, 72, 19, 73, 23, 74, 27, 75, 26, 33, 76, 37, 78, 36, 43, 79, 47, 700, 46, 54, 701, 59, 702, 64, 703, 69, 777, 7777, 77770, 83, 704, 87, 90, 705, 95, 706, 101, 707, 103, 110, 708, 116, 709, 122, 710, 127, 131, 711, 137, 712, 136
COMMENTS
See A210415 for comments, links, and code.
EXAMPLE
The sequence cannot start with 1 because the first digit is not 7. Let us start with 2: the second digit is equal to 7. The third digit cannot be 3 because the third digit is not 7. So let it be 4. In the next position we now have 70 because it is the minimum number greater than 7 and starting with the digit 7. And so on.
List the positions of all digits 8 in the concatenation of all terms, not necessarily in order. This is the lexicographically earliest such sequence.
+10
8
2, 8, 4, 80, 7, 88, 11, 81, 15, 82, 18, 21, 83, 25, 84, 28, 31, 85, 35, 86, 38, 41, 87, 45, 89, 48, 51, 800, 56, 801, 61, 802, 66, 803, 71, 804, 76, 805, 98, 888, 8888, 880, 93, 806, 99, 881, 104, 807, 110, 808, 112, 118, 122, 809, 128, 810, 127, 137, 811
COMMENTS
See A210415 for comments, links, and code.
EXAMPLE
The sequence cannot start with 1 because the first digit is not 8. Let us start with 2: the second digit is equal to 8. The third digit cannot be 3 because the third digit is not 8. So let it be 4. In the next position we now have 80 because it is the minimum number greater than 8 and starting with the digit 8. And so on.
Search completed in 0.010 seconds
|