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!)
A368428 Inverse permutation to A368427. 2
1, 2, 3, 5, 6, 4, 7, 12, 13, 10, 14, 8, 9, 11, 15, 27, 28, 24, 29, 21, 22, 25, 30, 17, 18, 16, 19, 20, 23, 26, 31, 58, 59, 54, 60, 50, 51, 55, 61, 44, 45, 42, 46, 48, 52, 56, 62, 36, 37, 34, 38, 32, 33, 35, 39, 40, 41, 43, 47, 49, 53, 57, 63, 121, 122, 116 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
Rémy Sigrist, PARI program
EXAMPLE
A368427(67) = 107, so a(107) = 67.
PROG
(PARI) See Links section.
(Python)
from itertools import islice
from functools import reduce
def uniq(r): return reduce(lambda u, e: u if e in u else u+[e], r, [])
def A368427gen(): # generator of terms of A368427
R = [["1"]]
while R:
r = R.pop(0)
yield from map(lambda b: int(b, 2), r)
if len(r) > 1: R.append(uniq([r[k]+"0" for k in range(1, len(r))]))
R.append(uniq([r[0]+"0", r[0]+"1"] + [r[k]+"1" for k in range(1, len(r))]))
def agen(): # generator of terms
adict, n = dict(), 1
for i, k in enumerate(A368427gen(), 1):
if k not in adict:
adict[k] = i
while n in adict: yield adict[n]; n += 1
print(list(islice(agen(), 66))) # Michael S. Branicky, Dec 24 2023
CROSSREFS
Cf. A368427.
Sequence in context: A297409 A335858 A137760 * A360600 A194863 A194833
KEYWORD
nonn,look,base
AUTHOR
Rémy Sigrist, Dec 24 2023
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 July 4 08:09 EDT 2024. Contains 373986 sequences. (Running on oeis4.)