Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #14 Mar 25 2016 23:01:52
%S 1,2,3,4,7,6,5,8,9,14,19,12,13,10,21,16,25,18,11,28,63,38,23,24,17,26,
%T 27,20,15,42,37,32,57,50,73,36,31,22,39,56,33,126,91,76,117,46,61,48,
%U 43,34,75,52,79,54,29,40,67,30,49,84,157,74,45,64,147,114,41,100,183,146,77,72,35,62,51,44,55,78,53,112,193,66
%N Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A265341(a(n)).
%C This sequence can be represented as a binary tree. Each left hand child will contain 2n, and each right hand child will contain A265341(n), when the parent node contains n:
%C 1
%C ................../ \..................
%C 2 3
%C 4......../ \........7 6......../ \........5
%C / \ / \ / \ / \
%C / \ / \ / \ / \
%C / \ / \ / \ / \
%C 8 9 14 19 12 13 10 21
%C 16 25 18 11 28 63 38 23 24 17 26 27 20 15 42 37
%C etc.
%H Antti Karttunen, <a href="/A270426/b270426.txt">Table of n, a(n) for n = 1..8192</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) = A265341(a(n)).
%o (Scheme, with memoization-macro definec)
%o (definec (A270426 n) (cond ((= 1 n) n) ((even? n) (* 2 (A270426 (/ n 2)))) (else (A265341 (A270426 (/ (- n 1) 2))))))
%Y Inverse: A270425.
%Y Cf. A265341.
%K nonn,base,less,tabf
%O 1,2
%A _Antti Karttunen_, Mar 17 2016