A038461 Sums of 10 distinct powers of 2.
1023, 1535, 1791, 1919, 1983, 2015, 2031, 2039, 2043, 2045, 2046, 2559, 2815, 2943, 3007, 3039, 3055, 3063, 3067, 3069, 3070, 3327, 3455, 3519, 3551, 3567, 3575, 3579, 3581, 3582, 3711, 3775, 3807, 3823, 3831, 3835, 3837, 3838, 3903
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[4000], DigitCount[#, 2, 1] == 10 &] (* Amiram Eldar, Feb 14 2022 *)
-
PARI
isok(n) = hammingweight(n) == 10; \\ Michel Marcus, Feb 29 2016
-
Python
from itertools import islice def A038461_gen(): # generator of terms yield (n:=1023) while True: yield (n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b) A038461_list = list(islice(A038461_gen(),20)) # Chai Wah Wu, Mar 10 2025
Formula
Sum_{n>=1} 1/a(n) = 1.386312271262110321181505974797071257205562524228381227122302929089588534920... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022
Extensions
Offset changed to 1 by Ivan Neretin, Feb 28 2016