TITLE: Created a function with roots at primes and only primes, are there useful applications?
QUESTION [7 upvotes]: Here's the function I created (I have a very long proof too):
$$(-1)^{\dfrac{4\Gamma(
(x-1)(1-(\lceil x\rceil-\lfloor x\rfloor)+1)
)+4}{(x-1)(1-(\lceil x\rceil-\lfloor x\rfloor))+1}}-1,\quad x>1$$
Is there any use for this? As far as I know it's the first of its kind. Wolfram Alpha link.

REPLY [47 votes]: Your function simplifies to
$$(-1)^{4((x-1)!+1)/x}-1$$
and is just a restatement of Wilson's theorem: $(n-1)!\equiv-1\bmod n$ iff $n$ is prime.
If $x$ is prime, $((x-1)!+1)/x=k$ is an integer and $(-1)^{4k}-1$ evaluates to zero. If $x$ is composite and $\ge6$, $k=n+\frac1x$ where $n$ is an integer, so $(-1)^{4k}-1$ does not evaluate to zero. The function evaluated at $x=4$ gives $k=7/4$, which makes $(-1)^{4k}-1=-2\ne0$.