OFFSET
1,1
COMMENTS
The sequence starts with a(1) = 2 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, for the first 1500 terms, the sequence is strictly increasing except on four occasions: ..., 4, 1, ... / ..., 20, 11, ... / ..., 22, 21, ... / ..., 21, 19, ...
LINKS
Jean-Marc Falcoz, Table of n, a(n) for n = 1..1514
EXAMPLE
a(1) = 2 and the cumulative sum of the first 2 digits is indeed even (2+4 = 6).
a(2) = 4 and the cumulative sum of the first 4 digits is even (2+4+1+5).
a(3) = 1 and the cumulative sum of the 1st digit is of course even (2=2).
a(4) cannot be 3 as the cumul. sum of the first 3 digits would be odd (2+4+3 = 9).
a(4) = 5 works and the cumul. sum of the first 5 digits is indeed even (2+4+1+5+6 = 18).
a(5) = 6 works and the cumul. sum of the first 6 digits is indeed even (2+4+1+5+6+8= 26).
...
a(8) = 10 and the cumul. sum of the first 10 digits is even (2+4+1+5+6+8+9+1+0+2 = 38).
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Eric Angelini and Jean-Marc Falcoz, Nov 22 2016
STATUS
approved