Definitions
A bijection from a set
S
to a setT
is a function fromS
toT
such that one element inT
is mapped by exactly one element inS
.A bijection within a set
S
is a bijection fromS
toS
.The natural numbers are the integers which are greater than or equal to
0
.A subset of a set
S
is a set such that every element in the set is also inS
.A proper subset of a set
S
is a set that is a subset ofS
which is not equal toS
.
Task
Write a program/function that takes a natural number as input and outputs a natural number. It must be a bijection, and the image of the primes under the program/function, {f(p) : p ∈ ℙ}
, must be a proper subset of ℙ
, where ℙ
is the prime numbers.
Scoring
This is code-golf. Shortest answer in bytes wins. Standard loopholes apply.