Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #6 Mar 15 2016 00:17:05
%S 1,3,2,5,4,7,6,11,14,19,8,17,22,9,34,29,12,21,10,53,18,13,28,47,106,
%T 81,42,23,16,123,94,83,246,15,44,59,166,39,38,155,68,27,118,35,162,
%U 103,24,137,54,375,274,239,20,49,70,65,78,61,36,365,58,333,750,245,56,403,666,41,806,55,212,173,82,585,346,113,84,57,1170,461,26,73,32
%N Self-inverse permutation of natural numbers: a(1) = 1, for n even, a(n) = A269369(1+a(n/2)), for n odd, a(n) = 2*a(A269370(n)-1).
%H Antti Karttunen, <a href="/A270197/b270197.txt">Table of n, a(n) for n = 1..2211</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F a(1) = 1, for n even, a(n) = A269369(1+a(n/2)), for n odd, a(n) = 2*a(A269370(n)-1).
%o (Scheme, with memoization-macro definec)
%o (definec (A270197 n) (cond ((<= n 1) n) ((even? n) (A269369 (+ 1 (A270197 (/ n 2))))) (else (* 2 (A270197 (- (A269370 n) 1))))))
%Y Cf. A269369, A269370.
%Y Similar or related permutations A270195, A270196, A269867.
%K nonn
%O 1,2
%A _Antti Karttunen_, Mar 13 2016