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!)
A360573 Odd numbers with exactly three zeros in their binary expansion. 2
17, 35, 37, 41, 49, 71, 75, 77, 83, 85, 89, 99, 101, 105, 113, 143, 151, 155, 157, 167, 171, 173, 179, 181, 185, 199, 203, 205, 211, 213, 217, 227, 229, 233, 241, 287, 303, 311, 315, 317, 335, 343, 347, 349, 359, 363, 365, 371, 373, 377, 399, 407, 411, 413 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
If m is a term then 2*m+1 is another term, since if M is the binary expansion of m, then M.1 where . stands for concatenation is the binary expansion of 2*m+1.
A052996 \ {1,3,8} is a subsequence, since for m >= 3, A052996(m) = 9*2^(m-2) - 1 has 100011..11 with m-2 trailing 1 for binary expansion.
A171389 \ {20} is a subsequence, since for m >= 1, A171389(m) = 21*2^m - 1 has 1010011..11 with m trailing 1 for binary expansion.
A198276 \ {18} is a subsequence, since for m >= 1, A198276(m) = 19*2^m - 1 has 1001011..11 with m trailing 1 for binary expansion.
Binary expansion of a(n) is A360574(n).
{8*a(n), n>0} form a subsequence of A353654 (numbers with three trailing 0 bits and three other 0 bits).
Numbers of the form 2^(a+1) - 2^b - 2^c - 2^d - 1 where a > b > c > d > 0. - Robert Israel, Feb 13 2023
LINKS
FORMULA
A023416(a(n)) = 3.
EXAMPLE
35_10 = 100011_2, so 35 is a term.
MAPLE
q:= n-> n::odd and add(1-i, i=Bits[Split](n))=3:
select(q, [$1..575])[]; # Alois P. Heinz, Feb 12 2023
# Alternative:
[seq(seq(seq(seq(2^(a+1) - 2^b - 2^c - 2^d - 1, d = c-1..1, -1), c=b-1..2, -1), b=a-1..3, -1), a=4..12)]; # Robert Israel, Feb 13 2023
MATHEMATICA
Select[Range[1, 500, 2], DigitCount[#, 2, 0] == 3 &] (* Amiram Eldar, Feb 12 2023 *)
PROG
(Python)
def ok(n): return n&1 and bin(n)[2:].count("0") == 3
print([k for k in range(414) if ok(k)]) # Michael S. Branicky, Feb 12 2023
(Python)
from itertools import count, islice
from sympy.utilities.iterables import multiset_permutations
def A360573_gen(): # generator of terms
yield from (int('1'+''.join(d)+'1', 2) for l in count(0) for d in multiset_permutations('000'+'1'*l))
A360573_list = list(islice(A360573_gen(), 54)) # Chai Wah Wu, Feb 18 2023
(Python)
from itertools import combinations, count, islice
def agen(): yield from ((1<<m)-(1<<i)-(1<<j)-(1<<k)-1 for m in count(5) for i, j, k in combinations(range(m-2, 0, -1), 3))
print(list(islice(agen(), 54))) # Michael S. Branicky, Feb 18 2023
(PARI) isok(m) = (m%2) && #select(x->(x==0), binary(m)) == 3; \\ Michel Marcus, Feb 13 2023
CROSSREFS
Subsequences: A052996 \ {1,3,8}, A171389 \ {20}, A198276 \ {18}.
Odd numbers with k zeros in their binary expansion: A000225 (k=0), A190620 (k=1), A357773 (k=2), this sequence (k=3).
Sequence in context: A033899 A110287 A102813 * A271536 A041568 A042305
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Feb 12 2023
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 May 1 03:54 EDT 2024. Contains 372148 sequences. (Running on oeis4.)