OFFSET
1,1
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.
EXAMPLE
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.
PROG
(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)) ])
CROSSREFS
KEYWORD
base,nonn
AUTHOR
M. F. Hasler, Nov 19 2009
STATUS
approved