%I #13 Jan 18 2014 15:50:34
%S 0,1,2,5,4,3,10,13,8,25,6,11,20,7,26,15,16,31,50,43,12,65,22,23,40,9,
%T 14,125,52,101,30,17,32,55,62,39,100,37,86,35,24,73,130,19,44,75,46,
%U 103,80,169,18,155,28,53,250,33,104,215,202,59,60,131,34,325,64
%N Self-inverse and multiplicative permutation of integers: a(0)=0, a(1)=1, a(2)=2, a(3)=5 and a(5)=3, a(p_i) = p_{a(i-1)+1} for primes with index i > 3, and a(u * v) = a(u) * a(v) for u, v > 0.
%C The permutation satisfies A065091(a(n)) = a(A065091(n)) for all n >= 3, and is self-inverse: It swaps 3 & 5, maps all larger primes p_i (with index i > 3) to p_{a(i-1)+1}, and lets the multiplicativity take care of the rest.
%H Antti Karttunen, <a href="/A235200/b235200.txt">Table of n, a(n) for n = 0..5520</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F For n < 3, a(n)=n, a(3)=5 and a(5)=3, a(p_i) = p_{a(i-1)+1} for primes with index i > 3, and a(u * v) = a(u) * a(v) for u, v > 0.
%F A000035(a(n)) = A000035(n) = (n mod 2) for all n. [Even terms occur only on even indices and odd terms only on odd indices, respectively]
%o (Scheme, with _Antti Karttunen_'s IntSeq-library)
%o (definec (A235200 n) (cond ((< n 2) n) ((= n 3) 5) ((= n 5) 3) ((= 1 (A010051 n)) (A000040 (+ 1 (A235200 (- (A000720 n) 1))))) (else (reduce * 1 (map A235200 (ifactor n))))))
%Y List below gives similarly constructed permutations, which all force a swap of two small numbers, with the composite numbers defined by the multiplicative property and the fact that (the rest of) primes are permuted with the sequence itself. Apart from the first one, all satisfy A000040(a(n)) = a(A000040(n)) except for a finite number of cases (with A234840, substitute A008578 for A000040):
%Y A234840 (swaps 2 & 3).
%Y A235199 (swaps 5 & 7).
%Y A235201 (swaps 3 & 4).
%Y A235487 (swaps 7 & 8).
%Y A235489 (swaps 8 & 9).
%Y Cf. also A072029, A181351, A234743/A234744.
%K nonn,mult
%O 0,3
%A _Antti Karttunen_, Jan 04 2014