A023690 Numbers with exactly 8 ones in binary expansion.
255, 383, 447, 479, 495, 503, 507, 509, 510, 639, 703, 735, 751, 759, 763, 765, 766, 831, 863, 879, 887, 891, 893, 894, 927, 943, 951, 955, 957, 958, 975, 983, 987, 989, 990, 999, 1003, 1005, 1006, 1011, 1013, 1014, 1017
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[ 255, 1024 ], (Count[ IntegerDigits[ #, 2 ], 1 ]==8)& ]
-
PARI
is_A023690(n)=hammingweight(n)==8 \\ M. F. Hasler, Aug 27 2014
-
PARI
print1(t=2^8-1); for(i=2, 50, print1(", "t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
-
Python
from itertools import count, islice def A023690_gen(): # generator of terms n = 255 while True: yield n n = ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b A023690_list = list(islice(A023690_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.386455689748809038407077281583569975813437283445124123432573411446506561062... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022