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!)
A357774 Binary expansions of odd numbers with two zeros in their binary expansion. 2
1001, 10011, 10101, 11001, 100111, 101011, 101101, 110011, 110101, 111001, 1001111, 1010111, 1011011, 1011101, 1100111, 1101011, 1101101, 1110011, 1110101, 1111001, 10011111, 10101111, 10110111, 10111011, 10111101, 11001111, 11010111, 11011011, 11011101, 11100111, 11101011 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
For m >= 4, there are A000217(m-3) terms with m digits.
LINKS
FORMULA
a(n) = A007088(A357773(n)).
MATHEMATICA
FromDigits[IntegerDigits[#, 2]] & /@ Select[Range[1, 250, 2], DigitCount[#, 2, 0] == 2 &] (* Amiram Eldar, Oct 19 2022 *)
PROG
(Python)
from itertools import combinations, count, islice
def agen(): # generator of terms
for d in count(4):
b, c = 2**d - 1, 2**(d-1)
for i, j in combinations(range(1, d-1), 2):
yield int(bin(b - (c >> i) - (c >> j))[2:])
print(list(islice(agen(), 30))) # Michael S. Branicky, Oct 19 2022
(Python)
from itertools import count, islice
def A357774_gen(): # generator of terms
for l in count(2):
m = (10**(l+2)-1)//9
for i in range(l, 0, -1):
k = m-10**i
yield from (k-10**j for j in range(i-1, 0, -1))
A357774_list = list(islice(A357774_gen(), 30)) # Chai Wah Wu, Feb 19 2023
(PARI) isok(k) = (k%2) && (#binary(k) == hammingweight(k)+2); \\ A357773
f(n) = fromdigits(binary(n), 10); \\ A007088
lista(nn) = apply(f, select(isok, [1..nn])); \\ Michel Marcus, Oct 19 2022
CROSSREFS
A267524 \ {1, 10, 100} and A267705 \ {1, 10} are two subsequences.
Similar, but with k zeros in their binary expansion: A000042 (k=0), A190619 (k=1).
Sequence in context: A130600 A328947 A114387 * A204965 A192776 A218640
KEYWORD
nonn,base
AUTHOR
Bernard Schott, Oct 19 2022
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 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)