This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A235200 #13 Jan 18 2014 15:50:34 %S A235200 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 A235200 14,125,52,101,30,17,32,55,62,39,100,37,86,35,24,73,130,19,44,75,46, %U A235200 103,80,169,18,155,28,53,250,33,104,215,202,59,60,131,34,325,64 %N A235200 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 A235200 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 A235200 Antti Karttunen, <a href="/A235200/b235200.txt">Table of n, a(n) for n = 0..5520</a> %H A235200 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A235200 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 A235200 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 A235200 (Scheme, with _Antti Karttunen_'s IntSeq-library) %o A235200 (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 A235200 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 A235200 A234840 (swaps 2 & 3). %Y A235200 A235199 (swaps 5 & 7). %Y A235200 A235201 (swaps 3 & 4). %Y A235200 A235487 (swaps 7 & 8). %Y A235200 A235489 (swaps 8 & 9). %Y A235200 Cf. also A072029, A181351, A234743/A234744. %K A235200 nonn,mult %O A235200 0,3 %A A235200 _Antti Karttunen_, Jan 04 2014