A function about prime numbers

43 Views Asked by At

Is there a function defined like this? $p(x)=1$ if $x$ is a prime, $p(x)=0$ if $x$ isn't a prime. If there is, what is the symbol of it?

1

There are 1 best solutions below

2
On BEST ANSWER

The characteristic function of primes:

$$ \chi_{\rm prime}(n) \equiv \pi(n) - \pi(n-1) \, $$ where $\pi(n) \, $is the prime counting function.

I forgot where but I also have seen some calling it $\nu(n)$.