OFFSET
1,2
COMMENTS
The sequence starts with a(1) = 1 and is always extended with the smallest positive integer not yet present that does not lead to a contradiction.
This is the lexicographically first sequence with this property.
Amazingly, after 2000 terms, the sequence is strictly increasing except on four occasions: ..., 6, 3, ... / ..., 20, 9, ... / ..., 27, 26, ... / ..., 83, 82, ...
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..2019
EXAMPLE
a(1) = 1 and the cumulative sum of the 1st digit is indeed odd (1 = 1);
a(2) = 2 and the cumulative sum of the first 2 digits is odd, too (1+2 = 3);
a(3) cannot be 3 as the cumul. sum of the first 3 digits would be even (1+2+3 = 6);
a(3) = 4 works: the cumul. sum of the first 4 digits is odd (1+2+4+6 = 13);
a(4) cannot be 3 o 5 as those cumul. sums would be even (1+2+4+3 = 10) and (1+2+4+5 = 12);
a(4) = 6 works: the cumul. sum of the first 6 digits is odd (1+2+4+6+3+7 = 23);
a(5) = 3 as the cumul. sum of the first 3 digits is now odd (1+2+4 = 7);
...
a(8) = 20 and the cumul. sum of the first 20 digits is odd (1+2+4+6+3+7+8+2+0+9+1+1+1+3+1+5+1+7+2+1 = 65);
a(9) = 9 and the cumul. sum of the first 9 digits is odd (1+2+4+6+3+7+8+2+0 = 33);
etc.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Nov 22 2016
STATUS
approved