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!)
A346306 Position in A076478 of the binary complement of the n-th word in A076478. 2

%I

%S 2,1,6,5,4,3,14,13,12,11,10,9,8,7,30,29,28,27,26,25,24,23,22,21,20,19,

%T 18,17,16,15,62,61,60,59,58,57,56,55,54,53,52,51,50,49,48,47,46,45,44,

%U 43,42,41,40,39,38,37,36,35,34,33,32,31,126,125,124,123

%N Position in A076478 of the binary complement of the n-th word in A076478.

%H Michael S. Branicky, <a href="/A346306/b346306.txt">Table of n, a(n) for n = 1..16382</a> (for all words with length <= 13)

%F a(n) = 3*(2^d - 1) - n, where 2^d - 1 <= n <= 2^(d+1) - 2. - _Michael S. Branicky_, Sep 03 2021

%e The first fourteen words w(n) are 0, 1, 00, 01, 10, 11, 000, 001, 010, 011, 100, 101, 110, 111, so that a(3) = 6.

%t (See A007931.)

%o (Python)

%o from itertools import product

%o def comp(s): z, o = ord('0'), ord('1'); return s.translate({z:o, o:z})

%o def wgen(maxdigits):

%o for digits in range(1, maxdigits+1):

%o for b in product("01", repeat=digits):

%o yield "".join(b)

%o def auptod(maxdigits):

%o w = [None] + [wn for wn in wgen(maxdigits)]

%o return [w.index(comp(w[n])) for n in range(1, 2**(maxdigits+1) - 1)]

%o print(auptod(6)) # _Michael S. Branicky_, Sep 03 2021

%Y Cf. A007931, A076478, A171757, A346303, A346304.

%K nonn,base

%O 1,1

%A _Clark Kimberling_, Aug 16 2021

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 August 8 14:39 EDT 2022. Contains 356009 sequences. (Running on oeis4.)