Is there a known function $f:\mathbb{R}\to\mathbb{R}$, such that:

  • The definition of $f$ does not contain the $!$ operator
  • The definition of $f$ does not contain the $\sum$ operator
  • The definition of $f$ does not contain the $\prod$ operator
  • The definition of $f$ does not contain a continued fraction
  • $\forall n\in\mathbb{N}:f(n) = P_n$, where $P_n$ denotes the $n$th prime number
  • Needless to say, the definition of $f$ does not make an explicit use of $P_n$

If no such function is known, then is there any known proof that no such function exists?

  • 2
    $\begingroup$ Sure there is. Let $f(x) = P_{\lfloor x \rfloor}$. I don't believe you are actually asking for a function, but rather an "elementary" function, and you need to define what you mean by that. $\endgroup$ – 6005 May 24 '14 at 18:15
  • 3
    $\begingroup$ this has been an area of research for years. en.wikipedia.org/wiki/Formula_for_primes $\endgroup$ – f00d May 24 '14 at 18:16
  • $\begingroup$ @Goos: Thank you for pointing that out; I revised the question accordingly. $\endgroup$ – barak manos May 24 '14 at 18:32
  • $\begingroup$ "Does not make an explicit use" is too vague. If you can mathematically precise restrictions on what type of function you want $f$ to be, then this is answerable. Otherwise it's a duplicate. $\endgroup$ – Jack M May 24 '14 at 21:31

Your question seems to reflect a misunderstanding of what a function is. Here are some examples of functions:

\begin{align*} f(x) &= \text{the number of primes less than or equal to } x \\ f(x) &= 1 \text{ if the third digit of } x \text{ is even, otherwise } 2 \\ f(x) &= 1 \text{ if } x \text{ is rational, otherwise } 2 \end{align*} A function simply means you take in an input and send out an output. A function does not have to have a simple "formula" like $x^2$ or $e^x$. In particular, it is extremely easy to make a function such that $f(n) = P_n$. Just define $f(x)$ to be the $x$th prime if $x$ is an integer, and then define it arbitrarily elsewhere.

  • Needless to say, the definition of $f$ does not make an explicit use of $P_n$

This and all your other constraints don't really make mathematical sense. I can define $f(x)$ equals the product of all positive integers less than or equal to $x$. This results essentially in the factorial function, but I am not using the $!$ symbol. Or, I can define $f(x) = \int_0^{\infty} e^{-t} t^n \; dt$, and again I have defined factorials without really using factorials.

There are ways to make your idea of a "function" precise, but it's a lot harder than you think. For example, you can ask if there is an Elementary function satisfying $f(n) = P_n$. But it sounds like you want a broader scope than just exponentials, $n$th roots, and polynomials.

Some related references:

Can insight be derived from direct formulae for prime numbers?

Prime number formulas

What would be the immediate implications of a formula for prime numbers?

  • 1
    $\begingroup$ I don't think the OP is misunderstanding what a function is... rather, he just wants, as you noted, an "elementary enough" function. $\endgroup$ – Pedro Tamaroff May 24 '14 at 21:28
  • $\begingroup$ @PedroTamaroff Perhaps, but then it is one of those questions where the OP does not know how to define what he wants and expects the answerer to both make the question rigorous, and answer it as well. $\endgroup$ – 6005 May 24 '14 at 21:31
  • $\begingroup$ @Goos, I think the OP understands perfectly what a function is. He's just asking for an elementary function that's perfectly explicit and generates the nth prime. $\endgroup$ – recursive recursion May 24 '14 at 21:34
  • $\begingroup$ @recursiverecursion That is well and good, but then what does he/she mean by "elementary"? What I am trying to say in this answer is that the OP's question is not well-defined. $\endgroup$ – 6005 May 24 '14 at 21:41
  • $\begingroup$ @recursiverecursion: Thanks. I had some doubts on how to phrase the question in such manner that would enclose my interest, yet keep it purely mathematical. Obviously, I didn't do such a good job on that :) ... Perhaps I should have simply asked for a formula/function with a constant computation complexity (i.e., not dependent on the value of $n$), but I opted to avoid "computer science" terminology. Alternatively, I could have asked for a function which does not make use of any "repeating operator", but that would have seemed pretty far from any standard mathematical notation. Thanks again :) $\endgroup$ – barak manos May 25 '14 at 3:45

Sure. Define $f(n)$ for positive integer $n$ as follows:

$$ f(n)=n\chi _{{{\mathbb {P}}}}(n), $$

where $\mathbb{P}$ denotes the set of prime numbers $\chi_\mathbb{P}$ is the characteristic function of the primes, i.e., the function such that for positive integer $n$:

$$ {\displaystyle \chi_\mathbb{P}(n):={\begin{cases}1&{\text{if }}x\in \mathbb{P},\\0&{\text{if }}x\notin \mathbb{P}.\end{cases}}} $$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.