OFFSET
0,2
COMMENTS
The inverse permutation is given in A249279. - M. F. Hasler, Oct 24 2014
A000030(a(n+1)) mod 2 = a(n) mod 2. - Reinhard Zumkeller, Oct 27 2014
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
Éric Angelini, Commas squeezed between two same parity digits, SeqFan mailing list, Oct 24 2014
PROG
(PARI) a(n, a=0, u=0)=for(n=1, n, for(k=0, 9e9, !bittest(u, k)&&k\10^(#Str(k)-1)==Mod(a, 2)&&!print1(a=k", ")&&break); u+=1<<a); a \\ M. F. Hasler, Oct 24 2014
(Haskell)
a249278 n = a249278_list !! n
a249278_list = 0 : f 0 [1..] where
f u vs = g vs where
g (x:xs) = if (a000030 x) `mod` 2 == u `mod` 2
then x : f x (delete x vs) else g xs
-- Reinhard Zumkeller, Oct 27 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini, Oct 24 2014
STATUS
approved