%I #63 Feb 24 2022 12:07:02
%S 15,30,31,47,60,61,62,63,79,94,95,111,120,121,122,123,124,125,126,127,
%T 143,158,159,175,188,189,190,191,207,222,223,239,240,241,242,243,244,
%U 245,246,247,248,249,250,251,252,253,254,255,271,286,287,303,316,317,318
%N Binary expansion contains 4 adjacent 1's.
%C 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
%H Michel Marcus, <a href="/A348556/b348556.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>.
%F a(n) ~ n.
%F a(n+1) <= a(n) + 16.
%p q:= n-> verify([1$4], Bits[Split](n), 'sublist'):
%p select(q, [$0..400])[]; # _Alois P. Heinz_, Oct 22 2021
%t Select[Range[300], StringContainsQ[IntegerString[#, 2], "1111"] &] (* _Amiram Eldar_, Oct 22 2021 *)
%o (PARI) is(n)=n=bitand(n,n<<2); !!bitand(n,n<<1);
%o (Python)
%o def ok(n): return "1111" in bin(n)
%o print([k for k in range(319) if ok(k)]) # _Michael S. Branicky_, Oct 22 2021
%Y Binary expansion contains k adjacent 1s: A000027 (1), A004780 (2), A004781 (3), this sequence (4).
%Y Cf. A006520, A083593.
%Y Subsequences: A110286, A195744.
%K nonn,base,easy
%O 1,1
%A _Charles R Greathouse IV_, Oct 22 2021