Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #12 Mar 25 2016 23:01:42
%S 1,2,3,4,7,6,5,8,9,14,19,12,13,10,29,16,25,18,11,28,15,38,23,24,17,26,
%T 27,20,55,58,37,32,41,50,73,36,31,22,39,56,67,30,49,76,63,46,117,48,
%U 59,34,75,52,79,54,77,40,33,110,129,116,47,74,21,64,155,82,57,100,93,146,221,72,35,62,51,44,71,78,53,112,113,134,227,60
%N Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A265354(n)).
%H Antti Karttunen, <a href="/A270425/b270425.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F a(1) = 1, a(2n) = 2*a(n), a(2n+1) = 1 + 2*a(A265354(n)).
%o (Scheme, with memoization-macro definec)
%o (definec (A270425 n) (cond ((= 1 n) n) ((even? n) (* 2 (A270425 (/ n 2)))) (else (+ 1 (* 2 (A270425 (A265354 (/ (- n 1) 2))))))))
%Y Inverse: A270426.
%Y Cf. A265354.
%K nonn,base,less
%O 1,2
%A _Antti Karttunen_, Mar 17 2016