TITLE: Would such a function be of any importance (primality test)?
QUESTION [5 upvotes]: While experimenting with some Maths, I came up with a really cool function.
Let's call this function  $\space \beta \space$. Which is a function of a real variable $\space r \space $.
Here is the function:
$$\beta (r) = \tan \Bigg({\pi \over 2 } - {{4 \pi \Gamma(r)} \over r} \Bigg)$$
Where $\space \Gamma(r) \space $ is the Gamma Function.
Here is why this function is cool.
Let's take $\space \beta (z) \space$ where $\space z \space$ is a positive integer.
Well, $\space \beta (z) \space$ is only well defined IF AND ONLY IF $\space z \space$ is a prime GREATER than $\space 2$ (I have a proof for this, I didn't just assume it).
So when $\space z \space$ is not prime, $\space \beta (z) \space$ is undefined.
Would this serve ANY importance at all? Is it worth mentioning?
Either way, I found it pretty cool and I hope you do too :).

REPLY [3 votes]: If the question is about the usefulness of this function as a primality test (as I assumed in the comments and the OP appeared to agree with me), then it's probably even less useful than the Wilson's theorem on its own.
The primality tests are only needed for really big numbers. First, this one involves computing the factorial of large numbers. And second, for large numbers the function becomes larger (in absolute value), which makes it harder to distinguish the finite case from the infinite one.
It's more convenient to use the reciprocal function:
$$\frac{1}{\beta(r)}=\cot \left(\frac{\pi}{2}-\frac{4\pi \Gamma(r)}{r} \right)=\tan \left(\frac{4\pi \Gamma(r)}{r} \right)$$
Then it will be zero for every integer $r$ unless $r$ is prime.
But! Its absolute value will steadily decrease with increasing $r$, thus making it harder and harder to determine if a particular large number is prime. See the list plot up to $r=100$: