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 A300955 #18 Jan 30 2025 05:33:54 %S A300955 1,3,2,27,5,6,7,9,8,15,11,54,13,21,10,7625597484987,17,24,19,135,14, %T A300955 33,23,18,125,39,4,189,29,30,31,243,22,51,35,216,37,57,26,45,41,42,43, %U A300955 297,40,69,47,15251194969974,343,375,34,351,53,12,55,63,38,87,59 %N A300955 In the prime tower factorization of n, replace 2's with 3's and 3's with 2's. %C A300955 The prime tower factorization of a number is defined in A182318. %C A300955 This sequence is a self-inverse multiplicative permutation of the natural numbers. %C A300955 This sequence has infinitely many fixed points (A300957); for any k > 0, at least one of k or 2^k * 3^a(k) is a fixed point. %C A300955 This sequence is a recursive version of A182318. %C A300955 This sequence has connections with A300948. %H A300955 Rémy Sigrist, <a href="/A300955/b300955.txt">Table of n, a(n) for n = 1..10000</a> %H A300955 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A300955 Multiplicative with a(p^k) = A064614(p)^a(k). %F A300955 a(a(n)) = n. %e A300955 a(6) = a(2 * 3) = 3 * 2 = 6. %e A300955 a(16) = a(2 ^ 2 ^ 2) = 3 ^ 3 ^ 3 = 7625597484987. %p A300955 a:= n-> `if`(n=1, 1, mul(`if`(i[1]=2, 3, `if`(i[1]=3, %p A300955 2, i[1]))^a(i[2]), i=ifactors(n)[2])): %p A300955 seq(a(n), n=1..60); # _Alois P. Heinz_, Mar 17 2018 %t A300955 a[n_] := If[n == 1, 1, Product[If[i[[1]] == 2, 3, If[i[[1]] == 3, %t A300955 2, i[[1]]]]^a[i[[2]]], {i, FactorInteger[n]}]]; %t A300955 Table[a[n], {n, 1, 60}] (* _Jean-François Alcover_, Jan 30 2025, after _Alois P. Heinz_ *) %o A300955 (PARI) a(n) = my (f=factor(n)); prod(i=1, #f~, my (p=f[i,1]); if (p==2, 3, p==3, 2, p)^a(f[i,2])) %Y A300955 Cf. A064614, A182318, A300948, A300957 (fixed points). %K A300955 nonn,mult %O A300955 1,2 %A A300955 _Rémy Sigrist_, Mar 17 2018