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
KEYWORD
easy,nonn,base
AUTHOR
Dominick Cancilla, Sep 02 2010
EXTENSIONS
Name edited by Michel Marcus, Apr 16 2023
STATUS
approved