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 A234840 #52 Nov 21 2021 12:34:42 %S A234840 0,1,3,2,9,19,6,61,27,4,57,11,18,281,183,38,81,101,12,5,171,122,33, %T A234840 263,54,361,843,8,549,29,114,59,243,22,303,1159,36,1811,15,562,513, %U A234840 1091,366,157,99,76,789,409,162,3721,1083,202,2529,541,24,209,1647,10,87,31 %N A234840 Self-inverse and multiplicative permutation of integers: a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 2, a(p_i) = p_{a(i+1)-1} for primes with index i > 2, and a(u * v) = a(u) * a(v) for u, v > 0. %C A234840 The permutation satisfies A008578(a(n)) = a(A008578(n)) for all n, and is self-inverse. %C A234840 The sequence of fixed points begins as 0, 1, 6, 11, 29, 36, 66, 95, 107, 121, 149, 174, 216, 313, 319, 396, 427, ... and is itself multiplicative in a sense that if a and b are fixed points, then also a*b is a fixed point. %C A234840 The records are 0, 1, 3, 9, 19, 61, 281, 361, 843, 1159, 1811, 3721, 5339, 5433, 17141, 78961, 110471, 236883, 325679, ... %C A234840 and they occur at positions 0, 1, 2, 4, 5, 7, 13, 25, 26, 35, 37, 49, 65, 74, 91, 169, 259, 338, 455, ... %C A234840 (Note how the permutations map squares to squares, and in general keep the prime signature the same.) %C A234840 Composition with similarly constructed A235199 gives the permutations A234743 & A234744 with more open cycle-structure. %C A234840 The result of applying a permutation of the prime numbers to the prime factors of n. - _Peter Munn_, Dec 15 2019 %H A234840 Antti Karttunen, <a href="/A234840/b234840.txt">Table of n, a(n) for n = 0..16384</a> %H A234840 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A234840 a(0) = 0, a(1) = 1, a(2) = 3, a(3) = 2, a(p_i) = p_{a(i+1)-1} for primes with index i > 2, and a(u * v) = a(u) * a(v) for u, v > 0. %F A234840 From _Peter Munn_, Dec 14 2019. These identities would hold also if a(n) applied any other permutation of the prime numbers to the prime factors of n: (Start) %F A234840 A000005(a(n)) = A000005(n). %F A234840 A001221(a(n)) = A001221(n). %F A234840 A001222(a(n)) = A001222(n). %F A234840 A051903(a(n)) = A051903(n). %F A234840 A101296(a(n)) = A101296(n). %F A234840 a(A007913(n)) = A007913(a(n)). %F A234840 a(A007947(n)) = A007947(a(n)). %F A234840 a(A019554(n)) = A019554(a(n)). %F A234840 a(A055231(n)) = A055231(a(n)). %F A234840 a(A059895(n,k)) = A059895(a(n), a(k)). %F A234840 a(A059896(n,k)) = A059896(a(n), a(k)). %F A234840 a(A059897(n,k)) = A059897(a(n), a(k)). %F A234840 (End) %e A234840 a(4) = a(2 * 2) = a(2)*a(2) = 3*3 = 9. %e A234840 a(5) = a(p_3) = p_{a(3+1)-1} = p_{9-1} = p_8 = 19. %e A234840 a(11) = a(p_5) = p_{a(5+1)-1} = p_{a(6)-1} = p_5 = 11. %t A234840 a[n_] := a[n] = Switch[n, 0, 0, 1, 1, 2, 3, 3, 2, _, Product[{p, e} = pe; Prime[a[PrimePi[p] + 1] - 1]^e, {pe, FactorInteger[n]}]]; %t A234840 Table[a[n], {n, 0, 100}] (* _Jean-François Alcover_, Nov 21 2021 *) %o A234840 (PARI) A234840(n) = if(n<=1,n,my(f = factor(n)); for(i=1, #f~, if(2==f[i,1], f[i,1]++, if(3==f[i,1], f[i,1]--, f[i,1] = prime(-1+A234840(1+primepi(f[i,1])))))); factorback(f)); \\ _Antti Karttunen_, Aug 23 2018 %Y A234840 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. Apart from the first one, all satisfy A000040(a(n)) = a(A000040(n)) except for a finite number of cases (with A235200, substitute A065091 for A000040): %Y A234840 A235200 (swaps 3 & 5). %Y A234840 A235199 (swaps 5 & 7). %Y A234840 A235201 (swaps 3 & 4). %Y A234840 A235487 (swaps 7 & 8). %Y A234840 A235489 (swaps 8 & 9). %Y A234840 Cf. A064614, A234743/A234744, A235485/A235486, A235493/A235494, also A317930. %Y A234840 Properties preserved by the sequence as a function: A000005, A001221, A001222, A051903, A101296. %Y A234840 A007913, A007947, A008578, A019554, A055231, A059895, A059896, A059897 are used to express relationships between terms of this sequence. %K A234840 nonn,mult %O A234840 0,3 %A A234840 _Antti Karttunen_, Dec 31 2013