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.

A158582 Numbers with at least two zeros in their binary representation.

This page as a plain text file.
%I A158582 #16 Dec 24 2024 22:12:22
%S A158582 4,8,9,10,12,16,17,18,19,20,21,22,24,25,26,28,32,33,34,35,36,37,38,39,
%T A158582 40,41,42,43,44,45,46,48,49,50,51,52,53,54,56,57,58,60,64,65,66,67,68,
%U A158582 69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91
%N A158582 Numbers with at least two zeros in their binary representation.
%C A158582 Subsequence of A158581; complement of A089633; A023416(a(n))>1.
%C A158582 A265705(a(n),k) != A265705(a(n),a(n)-k) for at least one k <= a(n). - _Reinhard Zumkeller_, Dec 15 2015
%H A158582 R. Zumkeller, <a href="/A158582/b158582.txt">Table of n, a(n) for n = 1..10000</a>
%t A158582 Select[Range[100],DigitCount[#,2,0]>1&] (* _Harvey P. Dale_, Jan 19 2015 *)
%o A158582 (Haskell)
%o A158582 a158582 n = a158582_list !! (n-1)
%o A158582 a158582_list = [x | x <- [0..], a023416 x > 1]
%o A158582 -- _Reinhard Zumkeller_, Mar 31 2015
%o A158582 (Python)
%o A158582 def A158582(n):
%o A158582     def f(x):
%o A158582         c = n+(((l:=(x+1).bit_length())+1)*(l-2)>>1)
%o A158582         m = bin(x+1)[2:].find('0')
%o A158582         c += m if m>-1 else l
%o A158582         return c
%o A158582     m, k = n, f(n)
%o A158582     while m != k: m, k = k, f(k)
%o A158582     return m # _Chai Wah Wu_, Dec 24 2024
%Y A158582 Cf. A007088, A023416.
%Y A158582  Cf. A089633, A158581, A265705.
%K A158582 nonn
%O A158582 1,1
%A A158582 _Reinhard Zumkeller_, Apr 16 2009