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
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
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) = 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:
select(isA, [$1..4031]); # Peter Luschny, Oct 27 2022
# Alternatively, using a formula of Bernard Schott and A123578:
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
(Python)
from math import isqrt, comb
def A190620(n): return (1<<(a:=(isqrt(n<<3)+1>>1)+1)+1)-(1<<comb(a, 2)-n+1)-1 # Chai Wah Wu, Dec 18 2024
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, May 14 2011
STATUS
approved