login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A043570 Numbers whose base-2 representation has exactly 3 runs. 4
5, 9, 11, 13, 17, 19, 23, 25, 27, 29, 33, 35, 39, 47, 49, 51, 55, 57, 59, 61, 65, 67, 71, 79, 95, 97, 99, 103, 111, 113, 115, 119, 121, 123, 125, 129, 131, 135, 143, 159, 191, 193, 195, 199, 207, 223, 225, 227, 231, 239, 241, 243, 247 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Numbers of the form 2^n - 2^m + 2^k - 1 for n > m > k > 0. - Robert Israel, Jan 11 2018
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
Numbers k such that A005811(k) = 3. - Michel Marcus, Mar 10 2023
LINKS
EXAMPLE
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.
MAPLE
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
PROG
(Python)
from itertools import count, islice
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))
print(list(islice(agen(), 53))) # Michael S. Branicky, Feb 25 2023
CROSSREFS
Cf. A005811.
Cf. A082554 (subsequence of primes).
Sequence in context: A043721 A043727 A043731 * A043736 A043742 A043749
KEYWORD
nonn,base
AUTHOR
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)