OFFSET
1,1
LINKS
Indranil Ghosh, Table of n, a(n) for n = 1..50000
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Oct 23 2015
EXAMPLE
20 is in the sequence because 20 = 10100_2. '10100' has '101' as one of its substrings. - Indranil Ghosh, Feb 11 2017
MATHEMATICA
Select[Range[200], MemberQ[Partition[IntegerDigits[#, 2], 3, 1], {1, 0, 1}] &] (* Vincenzo Librandi, Feb 17 2018 *)
Select[Range[200], SequenceCount[IntegerDigits[#, 2], {1, 0, 1}]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 01 2020 *)
PROG
(Python)
i=j=0
while j<=100:
if "101" in bin(i)[2:]:
print(str(j)+" "+str(i))
j+=1
i+=1 # Indranil Ghosh, Feb 11 2017
(PARI) is(n)=while(n>4, if(bitand(n, 7)==5, return(1)); n>>=1); 0 \\ Charles R Greathouse IV, Feb 11 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
Offset corrected by Charles R Greathouse IV, Feb 11 2017
STATUS
approved