login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A004748 Binary expansion contains 101. 6
5, 10, 11, 13, 20, 21, 22, 23, 26, 27, 29, 37, 40, 41, 42, 43, 44, 45, 46, 47, 52, 53, 54, 55, 58, 59, 61, 69, 74, 75, 77, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 101, 104, 105, 106, 107, 108, 109, 110, 111, 116, 117, 118, 119, 122 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

LINKS

Indranil Ghosh, Table of n, a(n) for n = 1..50000

Index entries for 2-automatic sequences.

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<=50000:

....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

Cf. A004749, A004750, A004751, A004752, A004753.

Sequence in context: A173901 A016084 A007618 * A038030 A094016 A116033

Adjacent sequences:  A004745 A004746 A004747 * A004749 A004750 A004751

KEYWORD

nonn,base,easy

AUTHOR

N. J. A. Sloane

EXTENSIONS

Offset corrected by Charles R Greathouse IV, Feb 11 2017

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 27 22:36 EDT 2020. Contains 337388 sequences. (Running on oeis4.)