A023688 Numbers with exactly 6 ones in binary expansion.
63, 95, 111, 119, 123, 125, 126, 159, 175, 183, 187, 189, 190, 207, 215, 219, 221, 222, 231, 235, 237, 238, 243, 245, 246, 249, 250, 252, 287, 303, 311, 315, 317, 318, 335, 343, 347, 349, 350, 359, 363, 365, 366, 371, 373
Offset: 1
Links
- Ivan Neretin, 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.
Crossrefs
Programs
-
Mathematica
Select[ Range[ 63, 380 ], (Count[ IntegerDigits[ #, 2 ], 1 ]==6)& ]
-
PARI
is_A023688(n)=hammingweight(n)==6 \\ M. F. Hasler, Aug 27 2014
-
PARI
print1(t=2^6-1); for(i=2, 50, print1(", "t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
-
Python
from itertools import islice def A023688_gen(): # generator of terms yield (n:=63) while True: yield (n:=((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b) A023688_list = list(islice(A023688_gen(),30)) # Chai Wah Wu, Mar 06 2025
Formula
a(n+1) = A057168(a(n)). - M. F. Hasler, Aug 27 2014
Sum_{n>=1} 1/a(n) = 1.387753111935705074750004158584017188750706394077047633137401652680870607884... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022
Comments