OFFSET
1,2
COMMENTS
A variant of A093848.
LINKS
Dominic McCarty, Table of n, a(n) for n = 1..1000
EXAMPLE
(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.
PROG
(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
CROSSREFS
KEYWORD
base,easy,nonn
AUTHOR
Eric Angelini, Feb 02 2006
EXTENSIONS
Name edited, a(40) and on corrected by Dominic McCarty, Mar 18 2025
STATUS
approved
