%I #8 Jan 29 2014 08:33:12
%S 1,15,2,17,37,3,19,39,59,4,21,41,61,81,5,23,43,63,83,103,6,25,45,65,
%T 85,105,125,7,27,47,67,87,107,127,147,8,9,29,49,69,89,109,129,149,169,
%U 10,195,12,13,14,33,1,16,53,18,73,20,93,22,113,24,133,26,153
%N a(n) = position of first occurrence of n-th "early bird" number (cf. A116700) in the string 1234567891011121314151617181920212223242526272... .
%H Reinhard Zumkeller, <a href="/A220376/b220376.txt">Table of n, a(n) for n = 1..10000</a>
%e . 1 5 10 15 20 25 30 35 40 45 50 55 60
%e . ....v....x....v....x....v....x....v....x....v....x....v....x....
%e . 12345678910111213141516171819202122232425262728293031323334353...
%e . ||| | | | | |
%e . ||| | | | | |
%e . ||| | | | | +--- A116700(8) = 42
%e . ||| | | | | -> a(8) = 39
%e . ||| | | | |
%e . ||| | | | +--- A116700(5) = 32
%e . ||| | | | -> a(5) = 37
%e . ||| | | |
%e . ||| | | + --- A116700(7) = 41 -> a(7) = 19
%e . ||| | |
%e . ||| | +--- A116700(4) = 31 -> a(4) = 17
%e . ||| |
%e . ||| +--- A116700(2) = 21 -> a(2) = 15
%e . |||
%e . ||+--- A116700(6) = 34 -> a(6) = 3
%e . ||
%e . |+--- A116700(3) = 23 -> a(3) = 2
%e . |
%e . +--- A116700(1) = 12 -> a(1) = 1, see also A007908.
%o (Haskell)
%o import Data.List (isPrefixOf, find)
%o import Data.Maybe (fromJust)
%o a220376 n = a220376_list !! (n-1)
%o a220376_list = at 1 where
%o at z | (reverse (show (z - 1)) `isPrefixOf` fst bird) = at (z + 1)
%o | otherwise = (length $ fst bird) : at (z + 1)
%o where bird = fromJust $ find ((show z `isPrefixOf`) . snd) xys
%o xys = iterate (\(us, v : vs) -> (v : us, vs))
%o ([], concatMap show [0 ..])
%Y Cf. A117804.
%K nonn,base,look
%O 1,2
%A _Reinhard Zumkeller_, Dec 13 2012