OFFSET
1,3
COMMENTS
The even nonnegative integers are present in their natural order. Some odd natural integers will never appear (19 for instance).
EXAMPLE
The first odd term is a(2) = 1 and there is indeed 1 odd digit so far in the sequence (1 itself);
The next odd term is a(8) = 3 and there are now 3 odd digits so far (1, 1 and 3);
The next odd term is a(10) = 5 and there are now 5 odd digits so far (1, 1, 3, 1 and 5);
...
The next odd term is a(18) = 17 and there are indeed 17 odd digits so far in the sequence (1, 1, 3, 1, 5, 1, 7, 1, 9, 1, 1, 1, 3, 1, 5, 1, 7); etc.
MATHEMATICA
Block[{a = {0}, c = 0}, Do[Block[{k = 1, s}, While[If[OddQ[k], Nand[FreeQ[a, k], k == c + Set[s, Total@ DigitCount[k, 10, {1, 3, 5, 7, 9}]]], ! FreeQ[a, k]], k++]; If[OddQ[k], c += s, c += Total@ DigitCount[k, 10, {1, 3, 5, 7, 9}]]; AppendTo[a, k]], {i, 79}]; a] (* Michael De Vlieger, Nov 06 2020 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Carole Dubois, Nov 06 2020
STATUS
approved