cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A023691 Numbers with exactly 9 ones in binary expansion.

Original entry on oeis.org

511, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1022, 1279, 1407, 1471, 1503, 1519, 1527, 1531, 1533, 1534, 1663, 1727, 1759, 1775, 1783, 1787, 1789, 1790, 1855, 1887, 1903, 1911, 1915, 1917, 1918, 1951, 1967, 1975
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A000079, A018900, A014311, A014312, A014313, A023688, A023689, A023690 (Hamming weight = 1, 2, ..., 8), A057168.

Programs

  • Mathematica
    Select[ Range[ 511, 2048 ], (Count[ IntegerDigits[ #, 2 ], 1 ]==9)& ]
  • PARI
    is_A023691(n)=hammingweight(n)==9 \\ M. F. Hasler, Aug 27 2014
    
  • PARI
    print1(t=2^9-1); for(i=2, 50, print1(", "t=A057168(t))) \\ M. F. Hasler, Aug 27 2014
    
  • Python
    from itertools import islice
    def A023691_gen(): # generator of terms
        yield (n:=511)
        while True: yield (n:=((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b)
    A023691_list = list(islice(A023691_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.386348105265697723853732153017686670695581836109569165990080192653647019078... (calculated using Baillie's irwinSums.m, see Links). - Amiram Eldar, Feb 14 2022