|
|
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
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
|
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) = 4*2^k(n) - 2^(1 - n + (k(n) + k(n)^2)/2) - 1, where k is the Kruskal-Macaulay function A123578.
|
|
MAPLE
|
isA := proc(n) convert(n, base, 2): %[1] = nops(%) - add(%) end:
A190620 := proc(n) A123578(n); 4*2^% - 2^(1 - n + (% + %^2)/2) - 1 end:
|
|
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
|
|
CROSSREFS
|
Odd numbers with k zeros in their binary expansion: A000225 (k=0), A357773 (k=2).
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|