OFFSET
0,3
COMMENTS
LINKS
FORMULA
Regular expression 0|(1000*)*10*.
MATHEMATICA
bin[n_] := FromDigits[IntegerDigits[n, 2]]; q[n_] := BitAnd[n, 6*n] == 0; bin /@ Select[Range[0, 250], q] (* Amiram Eldar, Jan 27 2022 *)
PROG
(Python)
def c(b): return not "11" in b and not "101" in b
def auptod(digits):
return [int(b) for b in (bin(k)[2:] for k in range(2**digits)) if c(b)]
print(auptod(9)) # Michael S. Branicky, Dec 20 2021
CROSSREFS
KEYWORD
nonn,base
AUTHOR
A.H.M. Smeets, Dec 19 2021
STATUS
approved