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!)
A269386 Permutation of nonnegative integers: a(1) = 0, a(2) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A269380(2n+1)). 6

%I #7 Mar 03 2016 22:51:29

%S 0,1,3,2,7,6,15,4,5,14,31,12,63,30,13,8,127,10,11,28,9,62,255,24,511,

%T 126,29,60,1023,26,23,16,25,254,27,20,2047,22,61,56,4095,18,8191,124,

%U 17,510,16383,48,19,1022,21,252,32767,58,47,120,57,2046,55,52,65535,46,125,32,59,50,131071,508,49,54,262143,40,95,4094,253,44

%N Permutation of nonnegative integers: a(1) = 0, a(2) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A269380(2n+1)).

%C Note the indexing: Domain starts from 1, range from 0.

%H Antti Karttunen, <a href="/A269386/b269386.txt">Table of n, a(n) for n = 1..1024</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%F a(1) = 0, a(2) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A269380(2n+1)).

%F As a composition of related permutations:

%F a(n) = A252756(A269172(n)).

%F a(n) = A269376(A260742(n)).

%o (Scheme, with memoization-macro definec)

%o (definec (A269386 n) (cond ((<= n 2) (- n 1)) ((even? n) (* 2 (A269386 (/ n 2)))) (else (+ 1 (* 2 (A269386 (A269380 n)))))))

%Y Inverse: A269385.

%Y Cf. A269380.

%Y Related permutations: A260742, A269172, A269388.

%Y Cf. also A252756, A269376.

%Y Differs from A243071 and A252756 for the first time at n=19, which here a(19) = 11, instead of 255.

%K nonn

%O 1,3

%A _Antti Karttunen_, Mar 01 2016

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 24 00:30 EDT 2024. Contains 371917 sequences. (Running on oeis4.)