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