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

%I #4 Apr 04 2015 21:34:04

%S 2,5,6,7,55,56,60,61,62,63,64,66,67,68,69,70,71,72,73,74,76,77,78,79,

%T 80,81,82,83,84,550,605,5555,6555,55555,56555,555555,600000,600001,

%U 600002,600003,600004,600006,600007,600008,600009,600010,600011,600012,600013

%N Smallest sequence which lists the position of digits "5" 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 "5" 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 "5" in the first place), but a(1)=2 is possible.

%e Then a(2) must start with a digit "5", so a(2)=5 is the smallest possible choice.

%e 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.

%e The reasoning continues in analogy with A167452-A167454.

%o (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)) ])

%Y Cf. A098645, A167519, A167520, A167452, A167453, A167454.

%K base,nonn

%O 1,1

%A _M. F. Hasler_, Nov 19 2009