OFFSET
1,1
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n) ~ n. - Charles R Greathouse IV, Sep 24 2012
MAPLE
q:= n-> verify([1$3], Bits[Split](n), 'sublist'):
select(q, [$0..200])[]; # Alois P. Heinz, Oct 22 2021
MATHEMATICA
Select[Range[200], MemberQ[Partition[IntegerDigits[#, 2], 3, 1], {1, 1, 1}]&] (* Harvey P. Dale, Mar 31 2011 *)
Select[Range[200], StringContainsQ[IntegerString[#, 2], "111"] &] (* Amiram Eldar, Oct 22 2021 *)
Select[Range[200], SequenceCount[IntegerDigits[#, 2], {1, 1, 1}]>0&] (* Harvey P. Dale, Dec 28 2021 *)
PROG
(Haskell)
a004781 n = a004781_list !! (n - 1)
a004781_list = filter f [0..] where
f x | x < 7 = False
| otherwise = (x `mod` 8) == 7 || f (x `div` 2)
-- Reinhard Zumkeller, Jun 03 2012
(PARI) is(n)=!!bitand(bitand(n, n<<1), n<<2) \\ Charles R Greathouse IV, Sep 24 2012
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
EXTENSIONS
Offset corrected by Reinhard Zumkeller, Jun 03 2012
STATUS
approved