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!)
A316472 Inverse permutation to A316385. 2
1, 3, 2, 5, 7, 6, 4, 9, 11, 13, 15, 10, 14, 12, 8, 17, 19, 21, 23, 25, 27, 29, 31, 18, 22, 26, 30, 20, 28, 24, 16, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 34, 38, 42, 46, 50, 54, 58, 62, 36, 44, 52, 60, 40, 56, 48, 32, 65, 67, 69, 71 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = (2*b(n) + 1)*2^(L(n) - L(b(n)) - 1) where b(n) = A053645(A153142(n)) and where L(n) = A000523(n) for n > 0 with L(0) = -1. - Mikhail Kurkov, Sep 09 2023
EXAMPLE
A316385(42) = 50 hence a(50) = 42.
PROG
(PARI) b1(n) = my(b=binary(n)); fromdigits(concat(b[1], Vecrev(vector(#b-1, k, b[k+1]))), 2); \\ A059893
b2(n) = if(n < 2, n, if((n + 1) == 2^logint(n + 1, 2), (n + 1) / 2, n + 1)) \\ A153152
a(n) = my(A = 2^logint(n, 2), B = b1(b2(b1(n))) - A); (2 * B + 1) * A / 2 ^ (if(B == 0, -1, logint(B, 2)) + 1) \\ Mikhail Kurkov, Sep 09 2023
CROSSREFS
Sequence in context: A222209 A118320 A108918 * A360959 A341910 A341915
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Jul 04 2018
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 March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)