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.

A348556 Binary expansion contains 4 adjacent 1's.

Original entry on oeis.org

15, 30, 31, 47, 60, 61, 62, 63, 79, 94, 95, 111, 120, 121, 122, 123, 124, 125, 126, 127, 143, 158, 159, 175, 188, 189, 190, 191, 207, 222, 223, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254, 255, 271, 286, 287, 303, 316, 317, 318
Offset: 1

Views

Author

Keywords

Comments

For k > 0, each term m = 2^(k+3) - 1 is the end of a run of A083593(k-1) consecutive terms. For k = 4, from a(13) = 120 up to a(20) = 2^7-1 = 127, there are A083593(3) = 8 consecutive terms corresponding to 1111000, 1111001, 1111010, 1111011, 1111100, 1111101, 111110 and 1111111. - Bernard Schott, Feb 20 2022

Crossrefs

Binary expansion contains k adjacent 1s: A000027 (1), A004780 (2), A004781 (3), this sequence (4).
Subsequences: A110286, A195744.

Programs

  • Maple
    q:= n-> verify([1$4], Bits[Split](n), 'sublist'):
    select(q, [$0..400])[];  # Alois P. Heinz, Oct 22 2021
  • Mathematica
    Select[Range[300], StringContainsQ[IntegerString[#, 2], "1111"] &] (* Amiram Eldar, Oct 22 2021 *)
  • PARI
    is(n)=n=bitand(n,n<<2); !!bitand(n,n<<1);
    
  • Python
    def ok(n): return "1111" in bin(n)
    print([k for k in range(319) if ok(k)]) # Michael S. Branicky, Oct 22 2021

Formula

a(n) ~ n.
a(n+1) <= a(n) + 16.