OFFSET
0,3
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
MATHEMATICA
a = {0}; Do[AppendTo[a, If[Count[a, # - 1] > # - 1, # + 1, # - 1]] &@ a[[n]], {n, 87}]; a (* Michael De Vlieger, Dec 07 2016 *)
PROG
(Haskell)
a116939 n = a116939_list !! n
a116939_list = 0 : f [0] where
f xs@(x : _) = ys ++ f ys where
ys = if odd x then (x + 1 : x : map (+ 1) xs) else map (+ 1) xs
-- Reinhard Zumkeller, Jun 28 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Feb 27 2006
STATUS
approved