0
Regex (EcmaScript), 53 bytes ^((?=x(x*?)(\2(?!((xx)+x)\4*$)(x+)\6{3}))\3(?=\6)x)*$ Try it online! I use a more direct approach than the other regex answers. (Although the golfing make this less clear). My method is to just remove the first and last 1 from the binary representation of the numb...