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.
David Garth and Adam Gouge, Affinely Self-Generating Sets and Morphisms, Journal of Integer Sequences, Vol. 10 (2007), Article 07.1.5.
Chai Wah Wu, Record values in appending and prepending bitstrings to runs of binary digits, arXiv:1810.02293 [math.NT], 2018.
FORMULA
Sum_{n>=2} 1/a(n) = 9.829256652701616366441622119246549956902006567009112470631751387637507184399... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 13 2022
MATHEMATICA
Select[Range[0, 100], SequenceCount[IntegerDigits[#, 2], {0, 0, 0}]==0&] (* The program uses the SequenceCount function from Mathematica version 10 *) (* Harvey P. Dale, Sep 12 2015 *)
PROG
(Haskell)
a003796 n = a003796_list !! (n-1)
a003796_list = filter f [0..] where
f x = x < 4 || x `mod` 8 /= 0 && f (x `div` 2)
-- Reinhard Zumkeller, Jul 01 2013
(PARI) is(n)=while(n>7, if(bitand(n, 7)==0, return(0)); n>>=1); 1 \\ Charles R Greathouse IV, Feb 11 2017
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
STATUS
approved