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.
%I A043570 #38 Apr 12 2023 20:05:31 %S A043570 5,9,11,13,17,19,23,25,27,29,33,35,39,47,49,51,55,57,59,61,65,67,71, %T A043570 79,95,97,99,103,111,113,115,119,121,123,125,129,131,135,143,159,191, %U A043570 193,195,199,207,223,225,227,231,239,241,243,247 %N A043570 Numbers whose base-2 representation has exactly 3 runs. %C A043570 Numbers of the form 2^n - 2^m + 2^k - 1 for n > m > k > 0. - _Robert Israel_, Jan 11 2018 %C A043570 A000051 \ {2, 3} is a subsequence, since the base-2 representation of a number of the form 2^k+1 > 3 consists of a single 1, followed by a block of k-1 0's, followed by a last single 1. Also, A000215 \ {3} is another subsequence, since the base-2 representation of a Fermat number 2^(2^k)+1 > 3 consists of a single 1, followed by a block of 2^k-1 0's, followed by a last single 1. - _Bernard Schott_, Mar 09 2023 %C A043570 Numbers k such that A005811(k) = 3. - _Michel Marcus_, Mar 10 2023 %H A043570 Robert Israel, <a href="/A043570/b043570.txt">Table of n, a(n) for n = 1..10000</a> %e A043570 115 = 1110011_2, which is a block of three 1's, followed by a block of two 0's, followed by a block of two 1's, so 115 is a term. %p A043570 seq(seq(seq(2^n-2^m+2^k-1, k=1..m-1),m=n-1..2,-1),n=2..10); # _Robert Israel_, Jan 11 2018 %o A043570 (Python) %o A043570 from itertools import count, islice %o A043570 def agen(): yield from ((1<<k)-(1<<j)+(1<<i)-1 for k in count(1) for j in range(k-1, 1, -1) for i in range(1, j)) %o A043570 print(list(islice(agen(), 53))) # _Michael S. Branicky_, Feb 25 2023 %Y A043570 Cf. A005811. %Y A043570 Cf. A000051, A000215. %Y A043570 Cf. A082554 (subsequence of primes). %K A043570 nonn,base %O A043570 1,1 %A A043570 _Clark Kimberling_