1,2

a(a(n))=n, self-inverse permutation of natural numbers; a(n)=n for single primes (A007510) and products of twin prime pairs (A037074).

Table of n, a(n) for n=1..65.

Index entries for sequences that are permutations of the natural numbers

Multiplicative with a(p) = (if p<=3 then 5-p else (if p+2 is prime then p+2 else (if p-2 is prime then p-2 else p))), p prime.

a(143)=a(11*13)=a(11)*a(13)=13*11=143; a(77)=a(7*11)=a(7)*a(11)=5*13=65.

Cf. A072026, A001359, A006512, A072028, A072029, A061898, A064505.

Sequence in context: A011323 A227630 A286251 * A061898 A021756 A274925

Adjacent sequences: A072024 A072025 A072026 * A072028 A072029 A072030

nonn,mult

Reinhard Zumkeller, Jun 07 2002

approved