How can I find an elementary function producing the first $100$ primes?

146 Views Asked by At

The object is to find an elementary function $f(x)$ , which is handy enough to calculate if with a table calculator (not too high degree, not too large (or small) coefficients) with the following property :

For $n=1,\cdots,100$ , the value $f(n)$ , correct rounded to the next integer, should be the $n-th$ prime.

At first sight, this is easy, because we only need an accuracy of about $0.5$, but I did not succeed with Tchebycheff-approximation.

I also tried to divide $n$ by $100$ and $f(n)$ by $541$ to have values between $0$ and $1$. But in this case, I need a much higher accuracy, because $f(x)$ must be muliplied with $541$.

The main problem is to find a suitable function such as $(a+bx)\ln(cx+d)$ before optimizing the parameters.

Is there any possibility to find out what kind of elementary function could do the job ?

Particular nice would be a method that could be extended to, lets say, the first $1000$ primes.

1

There are 1 best solutions below

1
On BEST ANSWER

I'd say that what you try is impossible. Note that although $f$ is increasing, $f'$ should have many ups and downs. This leaves an $f''$ with a lot of zeros, far from equally spaced.

Consider the primes between $89$ and $131$, for example. Substracting each prime from the next yields:

$$8,4,2,4,2,4,14,4$$