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.

A101082 Numbers n such that binary representation contains bit strings "10" and "01" (possibly overlapping).

This page as a plain text file.
%I A101082 #39 Jun 08 2025 19:47:57
%S A101082 5,9,10,11,13,17,18,19,20,21,22,23,25,26,27,29,33,34,35,36,37,38,39,
%T A101082 40,41,42,43,44,45,46,47,49,50,51,52,53,54,55,57,58,59,61,65,66,67,68,
%U A101082 69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92
%N A101082 Numbers n such that binary representation contains bit strings "10" and "01" (possibly overlapping).
%C A101082 Subsequence of A062289; set difference A062289 minus A043569.
%C A101082 Complement of A023758. Also numbers not the sum of consecutive powers of 2. - _Omar E. Pol_, Mar 04 2013
%C A101082 Equivalently, numbers not the difference of two powers of two. - _Charles R Greathouse IV_, Mar 07 2013
%C A101082 The terms >=9 are bases in which a power of 2 exists, which does not contain a digit that is a power of 2. In base 10, 2^16 = 65536 is such a number, as it does not contain any one-digit power of 2, which in base 10 are 1, 2, 4 and 8. - _Patrick Wienhöft_, Jul 28 2016
%H A101082 Reinhard Zumkeller, <a href="/A101082/b101082.txt">Table of n, a(n) for n = 1..10000</a>
%H A101082 Patrick Wienhöft, <a href="http://pastebin.com/QqSq72Cy">Python program</a>
%H A101082 <a href="/index/Ar#2-automatic">Index entries for 2-automatic sequences</a>.
%F A101082 a(n) ~ n. In particular a(n) = n + (log_2 n)^2/2 + O(log n). - _Charles R Greathouse IV_, Mar 07 2013
%F A101082 A049502(a(n)) > 0. - _Reinhard Zumkeller_, Jun 17 2015
%e A101082 29 = 11101_2 is a term, "10" and "01" are contained (here overlapping).
%t A101082 Select[Range@ 120, Function[d, Times @@ Total@ Map[Map[Function[k, Boole@ MatchQ[#, k]], {{1, 0}, {0, 1}}] &, Partition[d, 2, 1]] > 0]@ IntegerDigits[#, 2] &] (* _Michael De Vlieger_, Dec 23 2016 *)
%t A101082 Select[Range[100],With[{c=IntegerDigits[#,2]},SequenceCount[c,{1,0}]>0&&SequenceCount[c,{0,1}]>0]&] (* _Harvey P. Dale_, Jun 08 2025 *)
%o A101082 (PARI) is(n)=n>>=valuation(n,2);n+1!=1<<valuation(n+1,2) \\ _Charles R Greathouse IV_, Mar 07 2013
%o A101082 (Haskell)
%o A101082 a101082 n = a101082_list !! (n-1)
%o A101082 a101082_list = filter ((> 0) . a049502) [0..]
%o A101082 -- _Reinhard Zumkeller_, Jun 17 2015
%o A101082 (Python)
%o A101082 def A101082(n):
%o A101082     def f(x): return n+((k:=x.bit_length())*(k-1)>>1)+sum(1 for i in range(k) if (1<<k)-(1<<i)<=x)
%o A101082     m, k = n, f(n)
%o A101082     while m != k: m, k = k, f(k)
%o A101082     return m # _Chai Wah Wu_, Feb 23 2025
%Y A101082 Complement: A023758.
%Y A101082 Cf. A043569, A062289, A049502.
%K A101082 nonn,easy
%O A101082 1,1
%A A101082 _Rick L. Shepherd_, Nov 29 2004