A360573 Odd numbers with exactly three zeros in their binary expansion.
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
Offset: 1
Examples
35_10 = 100011_2, so 35 is a term.
Crossrefs
Programs
-
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 *)
-
PARI
isok(m) = (m%2) && #select(x->(x==0), binary(m)) == 3; \\ Michel Marcus, Feb 13 2023
-
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<
Michael S. Branicky, Feb 18 2023 -
Python
from math import comb, isqrt from sympy import integer_nthroot def A056557(n): return (k:=isqrt(r:=n+1-comb((m:=integer_nthroot(6*(n+1), 3)[0])-(n
A333516(n): return (r:=n-1-comb((m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3))+1, 3))-comb((k:=isqrt(m:=r+1<<1))+(m>k*(k+1)), 2)+1 def A360010(n): return (m:=integer_nthroot(6*n, 3)[0])+(n>comb(m+2, 3)) def A360573(n): a = (a2:=integer_nthroot(24*n, 4)[0])+(n>comb(a2+2, 4))+3 j = comb(a-1,4)-n b, c, d = A360010(j+1)+2, A056557(j)+2, A333516(j+1) return (1<Chai Wah Wu, Dec 18 2024
Formula
A023416(a(n)) = 3.
Let a = floor((24n)^(1/4))+4 if n>binomial(floor((24n)^(1/4))+2,4) and a = floor((24n)^(1/4))+3 otherwise. Let j = binomial(a-1,4)-n. Then a(n) = 2^a-1-2^(A360010(j+1)+2)-2^(A056557(j)+2)-2^(A333516(j+1)). - Chai Wah Wu, Dec 18 2024
Comments