1,2

a(a(n))=n, a 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..66.

Index entries for sequences that are permutations of the natural numbers

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.

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. A072027, A001359, A006512, A072028, A072029, A061898, A064505.

Sequence in context: A092842 A072028 A269377 * A235199 A270426 A270425

Adjacent sequences: A072023 A072024 A072025 * A072027 A072028 A072029

nonn,mult

Reinhard Zumkeller, Jun 07 2002

approved