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!)
A117303 Self-inverse permutation of the natural numbers based on the bijection (2*x-1)*2^(y-1) <--> (2*y-1)*2^(x-1). 9
1, 3, 2, 5, 4, 6, 8, 7, 16, 12, 32, 10, 64, 24, 128, 9, 256, 48, 512, 20, 1024, 96, 2048, 14, 4096, 192, 8192, 40, 16384, 384, 32768, 11, 65536, 768, 131072, 80, 262144, 1536, 524288, 28, 1048576, 3072, 2097152, 160, 4194304, 6144, 8388608, 18, 16777216 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
a(a(n)) = n; fixed points A014480: a(A014480(n)) = A014480(n). - Reinhard Zumkeller, Apr 27 2006
LINKS
FORMULA
a(n) = (2*A001511(n) - 1) * 2^(A003602(n) - 1).
MAPLE
a:= n-> (j-> (2*j+1)*2^((n/2^j-1)/2))(padic[ordp](n, 2)):
seq(a(n), n=1..50); # Alois P. Heinz, Jan 23 2019
MATHEMATICA
a[n_] := (2 IntegerExponent[2 n, 2] - 1)*2^((n/2^IntegerExponent[n, 2] + 1)/2 - 1); Array[a, 50] (* Jean-François Alcover, Mar 12 2019 *)
PROG
(Python)
def A117303(n): return (((m:=(n&-n).bit_length())<<1)-1)*(1<<(n>>m)) # Chai Wah Wu, Jul 14 2022
CROSSREFS
Sequence in context: A273876 A273865 A286294 * A194904 A194876 A194837
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Apr 24 2006
EXTENSIONS
Spelling corrected by Jason G. Wurtzel, Aug 23 2010
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 April 23 14:49 EDT 2024. Contains 371914 sequences. (Running on oeis4.)