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.

A220376 a(n) = position of first occurrence of n-th "early bird" number (cf. A116700) in the string 1234567891011121314151617181920212223242526272... .

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