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!)
A190620 Odd numbers with a single zero in their binary expansion. 5
5, 11, 13, 23, 27, 29, 47, 55, 59, 61, 95, 111, 119, 123, 125, 191, 223, 239, 247, 251, 253, 383, 447, 479, 495, 503, 507, 509, 767, 895, 959, 991, 1007, 1015, 1019, 1021, 1535, 1791, 1919, 1983, 2015, 2031, 2039, 2043, 2045, 3071, 3583, 3839, 3967, 4031 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Odd numbers such that the binary weight is one less than the number of significant digits. Except for the initial 0, A129868 is a subsequence of this sequence. - Alonso del Arte, May 14 2011
From Bernard Schott, Oct 20 2022: (Start)
A036563 \ {-2, -1, 1} is a subsequence, since for m >= 3, A036563(m) = 2^m - 3 has 11..1101 with (m-2) starting 1's for binary expansion.
A083329 \ {1, 2} is a subsequence, since for m >= 2, A083329(m) = 3*2^(m-1) - 1 has 1011..11 with (m-1) trailing 1's for binary expansion.
A129868 \ {0} is a subsequence, since for m >= 1, A129868(m) = 2*4^m - 2^m - 1 is a binary cyclops number that has 11..11011..11 with m starting 1's and m trailing 1's for binary expansion.
The 0-bit position in binary expansion of a(n) is at rank A004736(n) + 1 from the right.
For k >= 2, there are (k-1) terms between 2^k and 2^(k+1), or equivalently (k-1) terms with (k+1) bits.
{2*a(n), n>0} form a subsequence of A353654 (numbers with one trailing 0 bit and one other 0 bit). (End)
LINKS
FORMULA
A190619(n) = A007088(a(n));
A023416(a(n)) = 1.
From Bernard Schott, Oct 21 2022: (Start)
a((n-1)*(n-2)/2 - (i-1)) = 2^n - 2^i - 1 for n >= 3 and 1 <= i <= n-2 (after Robert Israel in A357773).
a(n) = A000225(A002024(n)+2) - A000079(A004736(n)).
a(n) = 4*2^k(n) - 2^(1 - n + (k(n) + k(n)^2)/2) - 1, where k is the Kruskal-Macaulay function A123578.
A070939(a(n)) = A002024(n) + 2. (End)
MAPLE
isA := proc(n) convert(n, base, 2): %[1] = nops(%) - add(%) end:
select(isA, [$1..4031]); # Peter Luschny, Oct 27 2022
# Alternatively, using a formula of Bernard Schott and A123578:
A190620 := proc(n) A123578(n); 4*2^% - 2^(1 - n + (% + %^2)/2) - 1 end:
seq(A190620(n), n = 1..50); # Peter Luschny, Oct 28 2022
MATHEMATICA
Select[Range[1, 5001, 2], DigitCount[#, 2, 0]==1&] (* Harvey P. Dale, Jul 12 2018 *)
PROG
(Haskell)
import Data.List (elemIndices)
a190620 n = a190620_list !! (n-1)
a190620_list = filter odd $ elemIndices 1 a023416_list
-- A more efficient version, inspired by the Maple program in A190619:
a190620_list' = g 8 2 where
g m 2 = (m - 3) : g (2*m) (m `div` 2)
g m k = (m - k - 1) : g m (k `div` 2)
(Python)
from itertools import count, islice
def agen():
for d in count(3):
b = 1 << d
for i in range(2, d):
yield b - (b >> i) - 1
print(list(islice(agen(), 50))) # Michael S. Branicky, Oct 13 2022
CROSSREFS
A036563 \ {-2, -1, 1}, A083329 \ {1, 2}, A129868 are subsequences.
Odd numbers with k zeros in their binary expansion: A000225 (k=0), A357773 (k=2).
Sequence in context: A296859 A313992 A346304 * A079732 A309158 A161540
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, May 14 2011
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 March 28 05:02 EDT 2024. Contains 371235 sequences. (Running on oeis4.)