A114055 Lexicographically earliest strictly increasing sequence such that the run lengths of digits with equal parity in the sequence's digit stream yield the sequence itself.
1, 2, 4, 5, 7, 9, 10, 20, 22, 31, 33, 35, 36, 40, 42, 44, 46, 51, 53, 55, 57, 59, 60, 62, 64, 66, 68, 80, 82, 84, 86, 88, 91, 93, 95, 97, 99, 111, 113, 115, 117, 200, 202, 204, 206, 208, 220, 222, 224, 226, 228, 231, 311, 313, 315, 317, 319, 331, 333, 335, 337
Offset: 1
Examples
(1),(2,4),(5,7,9,1)(0,20,22),(31,33,35,3)(6,40,42,44,46),(51,53,55,57,59),(60,62,64,66,68,80,82,84,86,88)... Those runs of equal parity digits are of length 1,2,4,5,7,9,10,20... which is the sequence itself.
Links
- Dominic McCarty, Table of n, a(n) for n = 1..1000
Programs
-
Python
from itertools import groupby from itertools import count a = [1,2] while len(a)<100:a.append(next(k for k in count(a[-1]+1)if (b := [len(list(g))for _,g in(groupby(list(map(lambda d:int(d)%2,"".join(map(str,a))+str(k)))))])and all(b[i]==a[i]for i in range(len(b)-1))and not b[-1]>a[len(b)-1])) print(a) # Dominic McCarty, Mar 18 2025
Extensions
Name edited, a(40) and on corrected by Dominic McCarty, Mar 18 2025
Comments