Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #16 Jul 25 2021 02:37:16
%S 2,4,5,44,50,51,52,53,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,
%T 400,500,4444,5444,44444,45444,444000,500000,500001,500002,500003,
%U 500005,500006,500007,500008,500009,500010,500011,500012,500013,500015,500016
%N Smallest sequence which lists the position of digits "4" in the sequence.
%C The lexicographically earliest sequence such that a(1),a(2),a(3),... is the (increasing) list of the positions of digits "4" in the string obtained by concatenating all these terms, written in base 10.
%e We cannot have a(1)=1 (since then there's no "4" in the first place), but a(1)=2 is possible.
%e Then a(2)=4 is the smallest possible choice.
%e This allows us to take a(3)=5, but this must be followed by two digits "4" (the 4th and 5th of the sequence), thus a(4)=44. Terms a(5) through a(5+(44-6)/2) are now to be filled with 50,51,..., omitting terms with a digit "4".
%e The last term of this sequence is 70, which must be followed by 400 (whose first digit is the 44th digit of the sequence), 500, and then 4444 (digits 50-53), 5444 (digits 54-57), 44444 (digits 58-62), 45444 (digits 63-67), 444000 (digits 68-73). This "predicts" that a(3) starts with a digit "3", so a(3)=30 is the smallest possible choice.
%e The next digit "3" must not appear until the 30th digit of the sequence, so we fill in terms 40,41,42,44,45... (omitting 43 which has a digit "3").
%e Now it happens that the term 53 would correspond to digits # 29 and 30=a(3) of the sequence, so we can simply continue with this and 4 more terms, up to 57.
%e The next term must have its second digit (digit # 40=a(4) of the sequence) equal to 3, so 63 is the smallest choice.
%e The terms a(5)=41, a(6)=42 leave 330 as the smallest possible choice for the next term.
%e The terms 44,45,46 and 47,48,49,50 and 51,52,53,54,55 lead to the subsequent terms 333, 3333, 33333.
%o (PARI) concat([[2,4,5,44],vector((44-6)/2,i,50-(i<=4)+i+(i>=14)),[400,500,4444,5444,44 444,45 444, 444000], select(x->x%10-4 & x\10%10-4,vector((400-70)\6+10,i,500 000+i-1)) ])
%Y Cf. A098645, A167519, A167520, A167452, A167453.
%K base,nonn
%O 1,1
%A _M. F. Hasler_, Nov 19 2009