login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A116700 "Early bird" numbers: write the natural numbers in a string 12345678910111213.... Sequence gives numbers that occur in the string ahead of their natural place, sorted into increasing order (cf. A117804). 29
12, 21, 23, 31, 32, 34, 41, 42, 43, 45, 51, 52, 53, 54, 56, 61, 62, 63, 64, 65, 67, 71, 72, 73, 74, 75, 76, 78, 81, 82, 83, 84, 85, 86, 87, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 110, 111, 112, 121, 122, 123, 131, 132, 141, 142, 151, 152, 161, 162, 171 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Based on an idea by Argentinian puzzle creator Jaime Poniachik, these numbers were introduced by Martin Gardner in 2005 in the magazine Math. Horizons, published by the MAA.
A048992 is a similar sequence, but is different because it does not contain 21, etc. - see comments in A048992.
A220376(n) = position of a(n) in 1234567891011121314151617181... . - Reinhard Zumkeller, Dec 13 2012
REFERENCES
Martin Gardner, Transcendentals and early birds, Math. Horizons, XIII(2) (2005), pp. 5, 34 (published by Math. Assoc. America).
LINKS
Joshua Zucker and R. Zumkeller, Table of n, a(n) for n = 1..10000 (first 675 terms from Joshua Zucker)
S. W. Golomb, Early Bird Numbers, Puzzle Column in IEEE Inform. Soc. Newsletter, 52(4) (2002), p. 10.
S. W. Golomb, Early Bird Numbers: Solutions, IEEE Inform. Soc. Newsletter, 53(1) (2003), p. 30.
FORMULA
Asymptotically, the early bird numbers have density 1 [Golomb].
EXAMPLE
"12" appears at the start of the string, ahead of its position after "11", so is a member.
So are 123, 23, 1234, 234, 34, ... and sorting these into increasing order we get 12, 21, 23, 31, ... - N. J. A. Sloane, Aug 28 2019
MATHEMATICA
s = ""; Reap[For[n=1, n <= 200, n++, sn = ToString[n]; If[StringPosition[s, sn, 1] =!= {}, Sow[n]]; s = s <> sn]][[2, 1]] (* Jean-François Alcover, Nov 04 2016, after Klaus Brockhaus *)
PROG
(ARIBAS) s:= ""; for n:=1 to 200 do sn:=itoa(n);
if substr_index(s, sn) >= 0 then write(n, ", "); end;
s:=concat(s, sn); end; (* Klaus Brockhaus, Jul 23 2007 *)
(UBASIC)
10 X=""
20 for N=1 to 396
30 A=cutspc(str(N))
40 if instr(X, A)>0 then print N;
50 X+=A
60 next N
# Warut Roonguthai, Jul 23 2007
(Haskell)
import Data.List (isPrefixOf, find)
import Data.Maybe (fromJust)
a116700 n = a116700_list !! (n-1)
a116700_list = filter early [1 ..] where
early z = not (reverse (show (z - 1)) `isPrefixOf` fst bird) where
bird = fromJust $ find ((show z `isPrefixOf`) . snd) xys
xys = iterate (\(us, v : vs) -> (v : us, vs))
([], concatMap show [0 ..])
-- Reinhard Zumkeller, Dec 13 2012
(Python)
def aupto(limit):
s, alst = "", []
for k in range(1, limit+1):
sk = str(k)
if sk in s: alst.append(k)
s += sk
return alst
print(aupto(171)) # Michael S. Branicky, Dec 21 2021
CROSSREFS
Cf. A117804. A131881 gives complement.
Cf. A048991 and A048992 (Rollman numbers).
Cf. A007908 (subsequence, apart from initial 1).
Sequence in context: A082799 A089320 A227073 * A132132 A248378 A349649
KEYWORD
nonn,base,nice,look
AUTHOR
Bernardo Recamán, Jul 22 2007
EXTENSIONS
More terms from Warut Roonguthai and Klaus Brockhaus, Jul 23 2007
Golomb links from Jeremy Gardiner, Jul 23 2007
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 20:33 EDT 2024. Contains 371916 sequences. (Running on oeis4.)