Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #7 Mar 25 2016 07:47:46
%S 1,3,2,9,6,5,30,15,4,16,12,11,93,45,8,10,46,48,34,33,266,124,26,31,
%T 127,23,154,99,97,7,24,727,20,19,352,80,94,357,68,141,69,446,278,272,
%U 14,17,70,18,71,73,1902,54,61,52,946,232,267,957,197,408,53,199,1174,763,407,751,186,39,41,47,49,202,50,204,210,4724,164,192,182,36
%N Self-inverse permutation of natural numbers: a(1) = 1, a(A269389(1+n)) = A269399(a(n)), a(A269399(n)) = A269389(1+a(n)).
%H Antti Karttunen, <a href="/A270199/b270199.txt">Table of n, a(n) for n = 1..4786</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 > 1, if A137264(6+n) = 0 [when n is in A269399], a(n) = A269389(1+a(n-A269362(n))), otherwise a(n) = A269399(a(A269362(n)-1)).
%o (Scheme, with memoization-macro definec)
%o (definec (A270199 n) (cond ((= 1 n) n) ((not (zero? (A137264 (+ 6 n)))) (A269399 (A270199 (+ -1 (A269362 n))))) (else (A269389 (+ 1 (A270199 (- n (A269362 n))))))))
%Y Cf. A137264, A269362, A269389, A269399.
%Y Related or similar permutations: A267107, A270193, A270194.
%K nonn
%O 1,2
%A _Antti Karttunen_, Mar 16 2016