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.

Showing 1-2 of 2 results.

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

Original entry on oeis.org

2, 4, 5, 44, 50, 51, 52, 53, 55, 56, 57, 58, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 70, 400, 500, 4444, 5444, 44444, 45444, 444000, 500000, 500001, 500002, 500003, 500005, 500006, 500007, 500008, 500009, 500010, 500011, 500012, 500013, 500015, 500016
Offset: 1

Views

Author

M. F. Hasler, Nov 19 2009

Keywords

Comments

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.

Examples

			We cannot have a(1)=1 (since then there's no "4" in the first place), but a(1)=2 is possible.
Then a(2)=4 is the smallest possible choice.
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".
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.
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").
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.
The next term must have its second digit (digit # 40=a(4) of the sequence) equal to 3, so 63 is the smallest choice.
The terms a(5)=41, a(6)=42 leave 330 as the smallest possible choice for the next term.
The terms 44,45,46 and 47,48,49,50 and 51,52,53,54,55 lead to the subsequent terms 333, 3333, 33333.
		

Crossrefs

Programs

  • 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)) ])

A167455 Smallest sequence which lists the position of digits "5" in the sequence.

Original entry on oeis.org

2, 5, 6, 7, 55, 56, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 77, 78, 79, 80, 81, 82, 83, 84, 550, 605, 5555, 6555, 55555, 56555, 555555, 600000, 600001, 600002, 600003, 600004, 600006, 600007, 600008, 600009, 600010, 600011, 600012, 600013
Offset: 1

Views

Author

M. F. Hasler, Nov 19 2009

Keywords

Comments

The lexicographically earliest sequence such that a(1),a(2),a(3),... is the (increasing) list of the positions of digits "5" in the string obtained by concatenating all these terms, written in base 10.

Examples

			We cannot have a(1)=1 (since then there's no "5" in the first place), but a(1)=2 is possible.
Then a(2) must start with a digit "5", so a(2)=5 is the smallest possible choice.
This allows us to go on with a(3)=6, a(4)=6, but then must be follow 3 digits "5" (the 5th, 6th and 7th digit of the sequence), so a(5)=55 and a(6)=56 are the smallest possible choice.
The reasoning continues in analogy with A167452-A167454.
		

Crossrefs

Programs

  • PARI
    concat([ [2,5,6,7,55,56], vector((55-8)\2,i,60-(i<=5)+i+(i>=15)), [550, 605, 5555, 6555, 55 555, 56 555, 555 555], select(x->x%10-5 & x\10%10-5,vector((550-84)\6+10,i,600 000+i-1)) ])
Showing 1-2 of 2 results.