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
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, 18, 17, 16, 15, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 126, 125, 124, 123 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Permutation of the positive integers obtained by reversing their order within successive subsets of length 2, 4, 8, 16, ... - Paolo Xausa, Mar 09 2023
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..16382 (for all words with length <= 13)
FORMULA
a(n) = 3*(2^d - 1) - n, where 2^d - 1 <= n <= 2^(d+1) - 2. - Michael S. Branicky, Sep 03 2021
EXAMPLE
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.
From Paolo Xausa, Mar 09 2023: (Start)
Written as an irregular triangle, where row r >= 1 has length 2^r and row sum is A103897(r), the sequence begins:
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, 18, 17, 16, 15;
... (End)
MATHEMATICA
(See A007931.)
A346306[rowmax_]:=Table[Range[2^(r+1)-2, 2^r-1, -1], {r, rowmax}]; A346306[6] (* Paolo Xausa, Mar 09 2023 *)
PROG
(Python)
from itertools import product
def comp(s): z, o = ord('0'), ord('1'); return s.translate({z:o, o:z})
def wgen(maxdigits):
for digits in range(1, maxdigits+1):
for b in product("01", repeat=digits):
yield "".join(b)
def auptod(maxdigits):
w = [None] + [wn for wn in wgen(maxdigits)]
return [w.index(comp(w[n])) for n in range(1, 2**(maxdigits+1) - 1)]
print(auptod(6)) # Michael S. Branicky, Sep 03 2021
CROSSREFS
Sequence in context: A347952 A361198 A359806 * A021826 A331435 A159927
KEYWORD
nonn,tabf,base
AUTHOR
Clark Kimberling, Aug 16 2021
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 June 30 08:10 EDT 2024. Contains 373861 sequences. (Running on oeis4.)