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.
2026-03-25 06:05:03.1774418703
On
Created a function with roots at primes and only primes, are there useful applications?
1.9k Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
There are 2 best solutions below
2
On
As far as I know it's the first of its kind.
It is certainly not. The function
$$f(x)=\begin{cases}0 & \text{ if } x \text{ is prime}\\ 1& \text{otherwise}\end{cases}$$
is also a function for which $f(x)=0$ if and only if $x$ is prime.
Also, replacing $4$ with $2$ seems to maintain the property.
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$.