The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A180412 Shortest sequence of numbers with all odd digits alternating with numbers with all even digits. 1
 1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 31, 40, 51, 60, 71, 80, 91, 200, 311, 400, 511, 600, 711, 800, 911, 2000, 3111 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,2 LINKS Harvey P. Dale, Table of n, a(n) for n = 1..1000 EXAMPLE 11 is all odd digits. The next number in which all of the digits are even is 20. The next number in which all of the digits are odd is 31. MATHEMATICA nxt[n_]:=Module[{fidn=First[IntegerDigits[n]], len=IntegerLength[n]}, Which[fidn==9, 2*10^len, EvenQ[ fidn], FromDigits[PadRight[{fidn+1}, len, 1]], OddQ[fidn], FromDigits[PadRight[ {fidn+ 1}, len, 0]]]]; NestList[nxt, 1, 50] (* Harvey P. Dale, Nov 26 2013 *) CROSSREFS Sequence in context: A098779 A276822 A326106 * A290951 A114800 A079170 Adjacent sequences:  A180409 A180410 A180411 * A180413 A180414 A180415 KEYWORD easy,nonn,base AUTHOR Dominick Cancilla, Sep 02 2010 STATUS approved

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

Last modified June 12 10:58 EDT 2021. Contains 344947 sequences. (Running on oeis4.)