Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #9 Feb 03 2016 17:02:34
%S 1,2,3,4,6,5,7,8,10,11,13,9,12,14,16,15,18,19,24,20,25,23,29,17,21,22,
%T 26,27,30,31,35,28,33,34,40,36,42,46,53,38,44,47,55,43,51,54,62,32,37,
%U 39,45,41,50,48,57,49,59,56,65,58,66,67,74,52,60,63,70,64,71,76,82,69,77,83,87,91,98,101,112,73,79
%N Permutation of natural numbers: a(1) = 1, a(2n) = A080148(a(n)), a(2n+1) = A080147(a(n)).
%C This sequence can be represented as a binary tree. Each left hand child is produced as A080148(n), and each right hand child as A080147(n), when the parent node contains n:
%C |
%C ...................1...................
%C 2 3
%C 4......../ \........6 5......../ \........7
%C / \ / \ / \ / \
%C / \ / \ / \ / \
%C / \ / \ / \ / \
%C 8 10 11 13 9 12 14 16
%C 15 18 19 24 20 25 23 29 17 21 22 26 27 30 31 35
%C etc.
%H Antti Karttunen, <a href="/A267106/b267106.txt">Table of n, a(n) for n = 1..16383</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F a(1) = 1, after which, a(2n) = A080148(a(n)), a(2n+1) = A080147(a(n)).
%o (Scheme, with memoization-macro definec)
%o (definec (A267106 n) (cond ((<= n 1) n) ((odd? n) (A080147 (A267106 (/ (- n 1) 2)))) (else (A080148 (A267106 (/ n 2))))))
%Y Inverse: A267105.
%Y Cf. A000040, A002144, A002145, A080147, A080148.
%Y Cf. also A267107.
%K nonn,tabf
%O 1,2
%A _Antti Karttunen_, Feb 01 2016