OFFSET
1,1
COMMENTS
Appears to give all n such that 4096 is the highest power of 2 dividing A005148(n). - Benoit Cloitre, Jun 22 2002
LINKS
T. D. Noe, Table of n, a(n) for n = 1..10000
Robert Baillie, Summing the curious series of Kempner and Irwin, arXiv:0806.4410 [math.CA], 2008-2015. See p. 18 for Mathematica code irwinSums.m.
FORMULA
a(n+1) = A057168(a(n)). - M. F. Hasler, Aug 27 2014
Sum_{n>=1} 1/a(n) = 1.390704528210321982529622080740025763242354253694629591331835888395977392151... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022
MATHEMATICA
Select[ Range[31, 240], Total[IntegerDigits[#, 2]] == 5&]
PROG
(PARI) sum_of_bits(n) = if(n<1, 0, sum_of_bits(floor(n/2))+n%2)
isA014313(n) = (sum_of_bits(n) == 5); \\ Michael B. Porter, Oct 21 2009
(PARI) is(n)=hammingweight(n)==5 \\ Charles R Greathouse IV, Nov 17 2013
(PARI) print1(t=2^5-1); for(i=2, 50, print1(", "t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
(Haskell)
a014313 = f . a038447 where
f x = if x == 0 then 0 else 2 * f x' + b where (x', b) = divMod x 10
-- Reinhard Zumkeller, Jan 06 2015
(Python)
from itertools import islice
def A014313_gen(): # generator of terms
yield (n:=31)
while True: yield (n:=((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
CROSSREFS
KEYWORD
nonn,base,easy,changed
AUTHOR
Al Black (gblack(AT)nol.net)
EXTENSIONS
Extension and program by Olivier Gérard
STATUS
approved