login
A190619
Binary expansions of odd numbers with a single zero in their binary expansion.
4
101, 1011, 1101, 10111, 11011, 11101, 101111, 110111, 111011, 111101, 1011111, 1101111, 1110111, 1111011, 1111101, 10111111, 11011111, 11101111, 11110111, 11111011, 11111101, 101111111, 110111111, 111011111, 111101111, 111110111, 111111011, 111111101, 1011111111, 1101111111, 1110111111, 1111011111, 1111101111, 1111110111, 1111111011, 1111111101
OFFSET
1,1
COMMENTS
a(n) = A007088(A190620(n)). [Reinhard Zumkeller, May 14 2011]
LINKS
MAPLE
f:=k->(10^k-1)/9; for n from 3 to 12 do for i from n-2 by -1 to 1 do j:=f(n)-10^i; lprint(j); od; od;
PROG
(Haskell)
a190619 n = a190619_list !! (n-1)
a190619_list = map read $ f 2 1 :: [Integer] where
f m k
| k < m - 1 = ((take k ones) ++ "0" ++ (take (m-k) ones)) : f m (k+1)
| otherwise = ((take k ones) ++ "01") : f (m + 1) 1
ones = repeat '1'
-- Reinhard Zumkeller, May 15 2011
(Python)
from itertools import count, islice
def agen():
for d in count(3):
b = (10**d - 1)//9
for i in range(2, d):
yield b - 10**(d-i)
print(list(islice(agen(), 50))) # Michael S. Branicky, Oct 13 2022
CROSSREFS
Sequence in context: A290193 A289462 A289578 * A290197 A171823 A289528
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, May 14 2011
STATUS
approved