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 A235201 #21 Mar 07 2017 06:18:01 %S A235201 0,1,2,4,3,7,8,5,6,16,14,17,12,19,10,28,9,11,32,13,21,20,34,53,24,49, %T A235201 38,64,15,43,56,59,18,68,22,35,48,37,26,76,42,67,40,29,51,112,106,107, %U A235201 36,25,98,44,57,23,128,119,30,52,86,31,84,131,118,80,27,133,136,41,33 %N A235201 Self-inverse and multiplicative permutation of integers: a(0)=0, a(1)=1, a(2)=2, a(3)=4 and a(4)=3, a(p_i) = p_{a(i)} for primes with index i > 2, and for composites > 4, a(u * v) = a(u) * a(v) for u, v > 0. %C A235201 The permutation satisfies A000040(a(n)) = a(A000040(n)) for all positive n except n=2, and is self-inverse. It swaps 3 & 4, maps any prime p_i with index i > 2 to p_{a(i)}, and lets the multiplicativity take care of the rest. %C A235201 This can be viewed also as a "signature-permutation" for a bijection on non-oriented rooted trees, mapped through the Matula-Goebel numbers (cf. A061773). This bijection will swap the subtrees encoded by numbers 3 and 4, wherever they occur as the terminal configurations anywhere in the tree: %C A235201 .................... %C A235201 .o.................. %C A235201 .|.................. %C A235201 .o.............o...o %C A235201 .|..............\./. %C A235201 .x.....<--->.....x.. %C A235201 .3...............4.. %C A235201 That is, the last two edges of any branch which ends with at least in two edges long unbranched stem, will be changed to a V-branch (two single edges in parallel). Vice versa, any terminal configuration in the tree that consists of more than one single edges next to each other (in "parallel") will be transformed so that maximal even number (2k) of those single edges will be combined to k unbranching stems of two edges, and an extra odd edge, if present, will stay as it is. %C A235201 This permutation commutes with A235199, i.e. a(A235199(n)) = A235199(a(n)) for all n. This can be easily seen, when comparing the above bijection to the one described in A235199. Composition A235199 o A235201 works as a "difference" of these two bijections, swapping the above subconfigurations only when they do not occur alone at the tips of singular edges. (Which cases are encoded by Matula-Goebel numbers 5 and 7, the third and fourth prime respectively). %C A235201 Permutation fixes n! for n=0, 1, 2, 4, 7. %C A235201 Note that a(5!) = a(120) = 168 = 120+(2*4!) and a(8!) = a(40320) = 30240 = 40320-(2*7!). %H A235201 Antti Karttunen, <a href="/A235201/b235201.txt">Table of n, a(n) for n = 0..10080</a> %H A235201 <a href="/index/Mat#matula">Index entries for sequences related to Matula-Goebel numbers</a> %H A235201 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A235201 Multiplicative with a(3^k) = 2^(2k), a(2^(2k)) = 3^k, a(2^(2k+1)) = 2*3^k, a(p_i) = p_{a(i)} for primes with index i > 2, and for composites > 4, a(u * v) = a(u) * a(v) for u, v > 0. %o A235201 (Scheme, with _Antti Karttunen_'s IntSeq-library) %o A235201 (definec (A235201 n) (cond ((< n 3) n) ((= n 3) 4) ((zero? (modulo n 4)) (* 3 (A235201 (/ n 4)))) ((= 1 (A010051 n)) (A000040 (A235201 (A000720 n)))) (else (reduce * 1 (map A235201 (ifactor n)))))) %Y A235201 Composition with A235487 gives A235485/A235486, composition with A235489 gives A235493/A235494. %Y A235201 List below gives similarly constructed permutations, which all force a swap of two small numbers, with (the rest of) primes permuted with the sequence itself and the new positions of composite numbers defined by the multiplicative property: %Y A235201 A234840 (swaps 2 & 3, conjugates A008578 back to itself). %Y A235201 A235200 (swaps 3 & 5, conjugates A065091 back to itself). %Y A235201 A235199 (swaps 5 & 7, conjugates A000040 back to itself). %Y A235201 A235487 (swaps 7 & 8, conjugates A000040 back to itself). %Y A235201 A235489 (swaps 8 & 9, conjugates A000040 back to itself). %Y A235201 Cf. also A000040, A010051, A000720, A091204/A091205, A072026, A061773. %K A235201 nonn,mult %O A235201 0,3 %A A235201 _Antti Karttunen_, Jan 11 2014