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.

A384189 Numbers whose number of zeros in their binary representation is not equal to 1.

Original entry on oeis.org

1, 3, 4, 7, 8, 9, 10, 12, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 28, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 53, 54, 56, 57, 58, 60, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82
Offset: 1

Views

Author

Chai Wah Wu, May 21 2025

Keywords

Comments

Numbers m such that A023416(m) != 1. Complement of A030130.

Examples

			15 is a term since its binary representation 1111 has no zeros.
53 is a term since its binary representation 110101 has two zeros.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100], DigitCount[#, 2, 0] != 1 &] (* Paolo Xausa, May 22 2025 *)
  • Python
    def A384189(n):
        def f(x):
            l, s = x.bit_length(), bin(x)[2:]
            if (m:=s.count('0'))>0: return n+s.find('0')+((m>1)^1)+(l*(l-3)>>1)
            return n+(l*(l-1)>>1)
        m, k = n, f(n)
        while m != k: m, k = k, f(k)
        return m