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.

A167454 Smallest sequence which lists the position of digits "4" in the sequence.

This page as a plain text file.
%I A167454 #16 Jul 25 2021 02:37:16
%S A167454 2,4,5,44,50,51,52,53,55,56,57,58,59,60,61,62,63,65,66,67,68,69,70,
%T A167454 400,500,4444,5444,44444,45444,444000,500000,500001,500002,500003,
%U A167454 500005,500006,500007,500008,500009,500010,500011,500012,500013,500015,500016
%N A167454 Smallest sequence which lists the position of digits "4" in the sequence.
%C A167454 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 A167454 We cannot have a(1)=1 (since then there's no "4" in the first place), but a(1)=2 is possible.
%e A167454 Then a(2)=4 is the smallest possible choice.
%e A167454 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 A167454 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 A167454 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 A167454 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 A167454 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 A167454 The terms a(5)=41, a(6)=42 leave 330 as the smallest possible choice for the next term.
%e A167454 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 A167454 (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 A167454 Cf. A098645, A167519, A167520, A167452, A167453.
%K A167454 base,nonn
%O A167454 1,1
%A A167454 _M. F. Hasler_, Nov 19 2009