Function generating primes.

75 Views Asked by At

Is there any non-identity monotonically increasing one-one univariate function that takes prime number as input and generates prime number as output ?

The asymptotic complexity to calculate output must me $O(1)$ (assume exponentiation is $O(1)$ operaton).

Output prime must be greater than input prime for all input primes.

1

There are 1 best solutions below

10
On BEST ANSWER

$f(n)$ $=$ $\lfloor$$A^{3^n}$$\rfloor$, where A is OEIS A051021 (~1.3).

https://en.wikipedia.org/wiki/Mills'_constant

https://oeis.org/A051021

(Though, it sounds like you're using this for a practical application, and I'm pretty sure this isn't practical.)