OFFSET
1,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Robert Baillie and Thomas Schmelzer, Summing Kempner's Curious (Slowly-Convergent) Series, Mathematica Notebook kempnerSums.nb, Wolfram Library Archive, 2008.
FORMULA
Sum_{n>=2} 1/a(n) = 7.338340181978485860731253930056466995425939377143636935044890325770833657631... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 13 2022
MATHEMATICA
Select[Range[0, 110], SequenceCount[IntegerDigits[#, 2], {0, 1, 0}]==0&] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Oct 19 2015 *)
PROG
(PARI) is(n)=n=binary(n); for(i=4, #n, if(!n[i]&&n[i-1]&&!n[i-2], return(0))); 1 \\ Charles R Greathouse IV, Mar 29 2013
(PARI) is(n)=while(n>9, if(bitand(n, 7)==2, return(0)); n>>=1); 1 \\ Charles R Greathouse IV, Feb 11 2017
(Haskell)
a004746 n = a004746_list !! (n-1)
a004746_list = filter f [0..] where
f x = x < 4 || x `mod` 8 /= 2 && f (x `div` 2)
-- Reinhard Zumkeller, Jul 01 2013
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved