

A072029


Swap twin prime pairs of form (4*k+3,4*(k+1)+1) in prime factorization of n.


4



1, 2, 5, 4, 3, 10, 7, 8, 25, 6, 13, 20, 11, 14, 15, 16, 17, 50, 19, 12, 35, 26, 23, 40, 9, 22, 125, 28, 29, 30, 31, 32, 65, 34, 21, 100, 37, 38, 55, 24, 41, 70, 43, 52, 75, 46, 47, 80, 49, 18, 85, 44, 53, 250, 39, 56, 95, 58, 61, 60, 59, 62, 175, 64, 33
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

a(a(n))=n, a selfinverse permutation of natural numbers.


LINKS

Table of n, a(n) for n=1..65.
Index entries for sequences that are permutations of the natural numbers


FORMULA

Multiplicative with a(p) = (if p mod 4 = 3 and p+2 is prime then p+2 else (if p mod 4 = 1 and p2 is prime then p2 else p)), p prime.


EXAMPLE

a(42) = a(2*3*7) = a(2)*a(3)*a(7) = a(2)*a(4*0+3)*a(7) = 2*(4*1+1)*7 = 2*5*7 = 70.


MATHEMATICA

a[n_] := Product[{p, e} = pe; Which[
Mod[p, 4] == 3 && PrimeQ[p + 2], p + 2,
Mod[p, 4] == 1 && PrimeQ[p  2], p  2,
True, p]^e, {pe, FactorInteger[n]}];
Array[a, 100] (* JeanFrançois Alcover, Nov 21 2021 *)


CROSSREFS

Cf. A072028, A071698, A071699, A072026, A072027, A061898, A064505.
Sequence in context: A266403 A266415 A132664 * A309734 A309668 A238758
Adjacent sequences: A072026 A072027 A072028 * A072030 A072031 A072032


KEYWORD

nonn,mult


AUTHOR

Reinhard Zumkeller, Jun 07 2002


STATUS

approved



