cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-6 of 6 results.

A004753 Numbers whose binary expansion contains 100.

Original entry on oeis.org

4, 8, 9, 12, 16, 17, 18, 19, 20, 24, 25, 28, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 44, 48, 49, 50, 51, 52, 56, 57, 60, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 88, 89, 92, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105
Offset: 1

Views

Author

Keywords

Crossrefs

Complement of A003754.
Subsequence of A247875.

Programs

  • Haskell
    a004753 n = a004753_list !! (n-1)
    a004753_list = filter f [0..] where
       f 0 = False; f x = x `mod` 4 == 0 || f (x `div` 2)
    -- Reinhard Zumkeller, Oct 27 2011
    
  • Mathematica
    Select[Range[110],MemberQ[Partition[IntegerDigits[#,2],3,1],{1,0,0}]&] (* Harvey P. Dale, Mar 14 2014 *)
  • PARI
    is(n)=n=binary(n);for(i=3,#n,if(n[i-2]&&!n[i]&&!n[i-1],return(1)));0 \\ Charles R Greathouse IV, Sep 24 2012
    
  • PARI
    is(n)=while(n>3, if(bitand(n,7)==4, return(1)); n>>=1); 0 \\ Charles R Greathouse IV, Feb 11 2017

Formula

a(n) ~ n. - Charles R Greathouse IV, Sep 24 2012

A004748 Binary expansion contains 101.

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Examples

			20 is in the sequence because 20 = 10100_2. '10100' has '101' as one of its substrings. - _Indranil Ghosh_, Feb 11 2017
		

Crossrefs

Programs

  • 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 *)
  • PARI
    is(n)=while(n>4,if(bitand(n,7)==5, return(1)); n>>=1); 0 \\ Charles R Greathouse IV, Feb 11 2017
  • 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
    

Formula

a(n) ~ n. - Charles R Greathouse IV, Oct 23 2015

Extensions

Offset corrected by Charles R Greathouse IV, Feb 11 2017

A004749 Numbers whose binary expansion contains the substring '110'.

Original entry on oeis.org

6, 12, 13, 14, 22, 24, 25, 26, 27, 28, 29, 30, 38, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 70, 76, 77, 78, 86, 88, 89, 90, 91, 92, 93, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113
Offset: 1

Views

Author

Keywords

Examples

			22 is in the sequence because 22 = 10110_2 and '10110' has '110' as one of its substrings. - _Indranil Ghosh_, Feb 11 2017
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200],SequenceCount[IntegerDigits[#,2],{1,1,0}]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 07 2017 *)
  • PARI
    is(n)=while(n>5,if(bitand(n,7)==6, return(1)); n>>=1); 0 \\ Charles R Greathouse IV, Feb 11 2017
  • Python
    i=j=0
    while j<=500:
        if "110" in bin(i)[2:]:
            print(str(j)+" "+str(i))
            j+=1
        i+=1 # Indranil Ghosh, Feb 11 2017
    

Formula

a(n) ~ n. - Charles R Greathouse IV, Oct 23 2015

Extensions

Offset corrected by Charles R Greathouse IV, Feb 11 2017

A004750 Numbers whose binary expansion contains the substring '011'.

Original entry on oeis.org

11, 19, 22, 23, 27, 35, 38, 39, 43, 44, 45, 46, 47, 51, 54, 55, 59, 67, 70, 71, 75, 76, 77, 78, 79, 83, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 99, 102, 103, 107, 108, 109, 110, 111, 115, 118, 119, 123, 131, 134, 135, 139, 140, 141, 142, 143, 147, 150
Offset: 1

Views

Author

Keywords

Examples

			19 is in the sequence because 19 = 10011_2 and '10011' has '011' as one of its substrings. - _Indranil Ghosh_, Feb 11 2017
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200],MemberQ[Partition[IntegerDigits[#,2],3,1],{0,1,1}]&] (* Harvey P. Dale, Apr 14 2014 *)
    Select[Range[200],SequenceCount[IntegerDigits[#,2],{0,1,1}]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 01 2021 *)
  • PARI
    is(n)=while(n>10, if(bitand(n, 7)==3, return(1)); n>>=1); 0 \\ Charles R Greathouse IV, Feb 11 2017
  • Python
    i=j=0
    while j<=100:
        if "011" in bin(i)[2:]:
            print(str(j)+" "+str(i))
            j+=1
        i+=1 # Indranil Ghosh, Feb 11 2017
    

Formula

a(n) ~ n. - Charles R Greathouse IV, Oct 23 2015

Extensions

Offset corrected by Charles R Greathouse IV, Feb 11 2017

A004751 Binary expansion contains 001.

Original entry on oeis.org

9, 17, 18, 19, 25, 33, 34, 35, 36, 37, 38, 39, 41, 49, 50, 51, 57, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 89, 97, 98, 99, 100, 101, 102, 103, 105, 113, 114, 115, 121, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139
Offset: 1

Views

Author

Keywords

Examples

			19 is in the sequence because 19 = 10011_2 and '10011' has '001' as one of its substrings. - _Indranil Ghosh_, Feb 11 2017
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 139, Length@ SequencePosition[IntegerDigits[#, 2], {0, 0, 1}] > 0 &] (* Version 10.1, or *)
    Select[Range@ 139, MemberQ[Partition[IntegerDigits[#, 2], 3, 1], {0, 0, 1}] &] (* Michael De Vlieger, Feb 11 2017 *)
    Select[Range[150],SequenceCount[IntegerDigits[#,2],{0,0,1}]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 15 2018 *)
  • PARI
    is(n)=while(n>8, if(bitand(n,7)==1, return(1)); n>>=1); 0 \\ Charles R Greathouse IV, Feb 11 2017
  • Python
    i=j=0
    while j<=100:
        if "001" in bin(i)[2:]:
            print(str(j)+" "+str(i))
            j+=1
        i+=1 # Indranil Ghosh, Feb 11 2017
    

Formula

a(n) ~ n. - Charles R Greathouse IV, Oct 23 2015

Extensions

Offset corrected by Charles R Greathouse IV, Feb 11 2017

A377169 Nonnegative integers containing isolated ones in their binary representation.

Original entry on oeis.org

1, 2, 4, 5, 8, 9, 10, 11, 13, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 29, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 52, 53, 57, 58, 61, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87
Offset: 1

Views

Author

Paolo Xausa, Oct 18 2024

Keywords

Comments

A 1 is isolated if it's not adjacent to another 1.

Examples

			19 is a term because 19 = 10011_2 contains one isolated 1.
74 is a term because all ones in 74 = 1001010_2 are isolated.
		

Crossrefs

Complement of A144795.

Programs

  • Mathematica
    Select[Range[150], MemberQ[Split[IntegerDigits[#, 2]], {1}] &]
Showing 1-6 of 6 results.