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 A266401 #19 Jan 09 2016 14:27:14 %S A266401 1,2,5,4,3,10,17,8,13,6,11,20,9,34,71,16,7,26,19,12,23,22,21,40,41,18, %T A266401 227,68,31,142,29,32,53,14,67,52,61,38,107,24,25,46,59,44,65,42,73,80, %U A266401 49,82,197,36,33,454,55,136,137,62,43,284,37,58,571,64,45,106,35,28,89,134,15,104,47 %N A266401 Self-inverse permutation of natural numbers: a(n) = A064989(A263273(A003961(n))). %C A266401 Shift primes in the prime factorization of n one step towards larger primes (A003961), then apply the bijective base-3 reverse (A263273) to the resulting odd number, which yields another (or same) odd number, then shift primes in the prime factorization of that second odd number one step back towards smaller primes (A064989). %H A266401 Antti Karttunen, <a href="/A266401/b266401.txt">Table of n, a(n) for n = 1..6560</a> %H A266401 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %F A266401 a(n) = A064989(A263273(A003961(n))). %F A266401 As a composition of related permutations: %F A266401 a(n) = A064216(A264996(A048673(n))). %F A266401 Other identities. For all n >= 0: %F A266401 A000035(a(n)) = A000035(n). [This permutation preserves the parity of n.] %t A266401 f[n_] := Block[{g, h}, g[x_] := x/3^IntegerExponent[x, 3]; h[x_] := x/g@ x; If[n == 0, 0, FromDigits[Reverse@ IntegerDigits[#, 3], 3] &@ g[n] h[n]]]; g[p_?PrimeQ] := g[p] = Prime[PrimePi@ p + 1]; g[1] = 1; g[n_] := g[n] = Times @@ (g[First@ #]^Last@ # &) /@ FactorInteger@ n; h[n_] := Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n; Table[h@ f@ g@ n, {n, 82}] (* _Michael De Vlieger_, Jan 04 2016, after _Jean-François Alcover_ at A003961 and A263273 *) %o A266401 (PARI) %o A266401 A030102(n) = { my(r=[n%3]); while(0<n\=3, r=concat(n%3, r)); subst(Polrev(r),x,3); } \\ After _M. F. Hasler_'s Nov 04 2011 code in A030102. %o A266401 A263273 = n -> if(!n,n,A030102(n/(3^valuation(n,3))) * (3^valuation(n, 3))); \\ Taking of the quotient probably unnecessary. %o A266401 A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus %o A266401 A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)}; %o A266401 A266401 = n -> A064989(A263273(A003961(n))); %o A266401 for(n=1, 6560, write("b266401.txt", n, " ", A266401(n))); %o A266401 (Scheme) (define (A266401 n) (A064989 (A263273 (A003961 n)))) %Y A266401 Cf. A000035, A003961, A064989, A263273. %Y A266401 Cf. A265369, A265904, A266190, A266403 (other conjugates or similar sequences derived from A263273). %Y A266401 Cf. also A048673, A064216, A264996, A266402, A266407, A266408. %K A266401 nonn,base %O A266401 1,2 %A A266401 _Antti Karttunen_, Jan 02 2016