Вот все варианты решения
значения идут по порядку
"0001110101"
"0001111101"
"0010101101"
"0010110101"
"0010111101"
"0011010101"
"0011011101"
"0011101101"
"0011110101"
"0011111101"
"0101010101"
"0101011101"
"0101101101"
"0101110101"
"0101111101"
"0110101101"
"0110110101"
"0110111101"
"0111010101"
"0111011101"
"0111101101"
"0111110101"
"0111111101"
"1010101101"
"1010110101"
"1010111101"
"1011010101"
"1011011101"
"1011101101"
"1011110101"
"1011111101"
"1101010101"
"1101011101"
"1101101101"
"1101110101"
"1101111101"
"1110101101"
"1110110101"
"1110111101"
"1111010101"
"1111011101"
"1111101101"
"1111110101"
"1111111101"
//Ruby 22
for i in 0..2**10-1
s = ("000000000000000000000000000000" + i.to_s(2))[-10..-1]
next if s[-2]=="1"
a=[]
s.each_char { |c| a<<(c=="1") }<br>
f = true
for k in 0..a.size-3
f = (f and (not a[k] or a[k+1] or a[k+2]))
end
p s if f
end