14
2
Definitions
A bijection from a set
Sto a setTis a function fromStoTsuch that one element inTis mapped by exactly one element inS.A bijection within a set
Sis a bijection fromStoS.The natural numbers are the integers which are greater than or equal to
0.A subset of a set
Sis a set such that every element in the set is also inS.A proper subset of a set
Sis a set that is a subset ofSwhich 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.
original CMC (also by me) – Leaky Nun – 2017-06-08T15:04:13.950