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.

This page as a plain text file.
%I A384189 #14 May 22 2025 05:23:06
%S A384189 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,
%T A384189 36,37,38,39,40,41,42,43,44,45,46,48,49,50,51,52,53,54,56,57,58,60,63,
%U A384189 64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82
%N A384189 Numbers whose number of zeros in their binary representation is not equal to 1.
%C A384189 Numbers m such that A023416(m) != 1. Complement of A030130.
%H A384189 Paolo Xausa, <a href="/A384189/b384189.txt">Table of n, a(n) for n = 1..10000</a>
%e A384189 15 is a term since its binary representation 1111 has no zeros.
%e A384189 53 is a term since its binary representation 110101 has two zeros.
%t A384189 Select[Range[100], DigitCount[#, 2, 0] != 1 &] (* _Paolo Xausa_, May 22 2025 *)
%o A384189 (Python)
%o A384189 def A384189(n):
%o A384189     def f(x):
%o A384189         l, s = x.bit_length(), bin(x)[2:]
%o A384189         if (m:=s.count('0'))>0: return n+s.find('0')+((m>1)^1)+(l*(l-3)>>1)
%o A384189         return n+(l*(l-1)>>1)
%o A384189     m, k = n, f(n)
%o A384189     while m != k: m, k = k, f(k)
%o A384189     return m
%Y A384189 Cf. A023416, A030130, A164874.
%K A384189 nonn,base
%O A384189 1,2
%A A384189 _Chai Wah Wu_, May 21 2025