%I #17 Dec 24 2022 03:48:22
%S 1,2,3,4,7,6,5,8,9,14,13,12,11,10,21,16,19,18,17,28,15,26,23,24,49,22,
%T 27,20,31,42,29,32,39,38,35,36,37,34,33,56,43,30,41,52,63,46,47,48,25,
%U 98,57,44,53,54,91,40,51,62,61,84,59,58,45,64,77,78
%N Swap twin prime pairs >(3,5) in prime factorization of n.
%H Amiram Eldar, <a href="/A072026/b072026.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>.
%F a(a(n)) = n, a self-inverse permutation of natural numbers.
%F a(n) = n for single primes (A007510) and products of twin prime pairs (A037074).
%F Multiplicative with a(p) = (if p<=3 then p else (if p+2 is prime then p+2 else (if p-2 is prime then p-2 else p))), p prime.
%F Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p, q primes > 3, p = q+2} ((p^2-p)*(q^2-q)/((p^2-q)*(q^2-p))) = 0.53439004468579249988... . - _Amiram Eldar_, Dec 24 2022
%e a(143)=a(11*13)=a(11)*a(13)=13*11=143; a(77)=a(7*11)=a(7)*a(11)=5*13=65.
%t a[n_] := Product[{p, e} = pe; If[p <= 3, p, If[PrimeQ[p+2], p+2, If[PrimeQ[p-2], p-2, p]]]^e, {pe, FactorInteger[n]}];
%t Array[a, 100] (* _Jean-François Alcover_, Nov 20 2021 *)
%Y Cf. A007510, A037074, A072027, A001359, A006512, A072028, A072029, A061898, A064505.
%K nonn,mult
%O 1,2
%A _Reinhard Zumkeller_, Jun 07 2002
|