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.

A023690 Numbers with exactly 8 ones in binary expansion.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

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

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