OFFSET
1,1
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
LINKS
FORMULA
a(n) ~ n.
a(n+1) <= a(n) + 16.
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 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Charles R Greathouse IV, Oct 22 2021
STATUS
approved